diff --git a/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java b/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java deleted file mode 100644 index 4c43ac30c5..0000000000 --- a/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable.cts.resource; - -/** - * A simple JavaBean class to be used as a custom resource type. - */ -public class Dog implements java.io.Serializable { - public static final String DOG_NAME = "wangwang"; - - public static final int DOG_AGE = 2; - - private static Dog instance = new Dog(); - - private int age = DOG_AGE; - - private String name = DOG_NAME; - - public Dog() { - } - - public static Dog getInstance() { - return instance; - } - - public int getAge() { - return age; - } - - public void setAge(int age) { - this.age = age; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public String toString() { - String retValue; - retValue = super.toString() + ", name=" + name + ", age=" + age; - return retValue; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int PRIME = 31; - int result = 1; - result = PRIME * result + ((name == null) ? 0 : name.hashCode()); - result = PRIME * result + age; - return result; - } - - @Override - public boolean equals(Object anObject) { - if (this == anObject) { - return true; - } - if (anObject instanceof Dog) { - Dog anotherDog = (Dog) anObject; - return (this.age == anotherDog.age && this.name.equals(anotherDog.name)); - } - return false; - } - -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/EETest.java b/common/src/main/java/com/sun/ts/lib/harness/EETest.java deleted file mode 100644 index e4a6d9760e..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/EETest.java +++ /dev/null @@ -1,985 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.harness; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.util.TestUtil; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.PrintStream; -import java.io.PrintWriter; -import java.io.Serializable; -import java.lang.annotation.Annotation; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.Enumeration; -import java.util.Properties; -import java.util.Vector; - -/** - * This abstract class must be extended by all clients of all J2EE-TS tests. All - * implementations of this class must define a setup, cleanup, and - * runtest(method names of runtest methods must match the 'testname' tag. EETest - * uses reflection to invoke these methods which in turn, run the test(s) to - * completion. Tests are assumed to pass, unless a Fault is thrown. - * - * @author Kyle Grucci - */ -public abstract class EETest implements Serializable { - - /* - * Please do NOT change this class in an incompatible manner with respect to - * serialization. Please see the serialization specification to determine what - * is a compatible change versus incompatible. If you do need to change this - * class in an incompatible manner you will need to rebuild the compat tests. - * You should also increment the serialVersionUID field to denote that this - * class is incompatible with older versions. - */ - static final long serialVersionUID = -4235235600918875382L; - - transient protected PrintStream log; - - transient protected PrintStream err; - - protected String sTestCase; - - transient Status sTestStatus = Status.passed(""); - - Class testClass = this.getClass(); - - Object testClInst; - - // nCl is true if the test class is different from the client class. - boolean nCl; - - boolean bUtilAlreadyInitialized; - - Vector vLeftOverTestArgs; - - protected int iLogDelaySeconds; - - // get the props from the args - protected Properties getTestPropsFromArgs(String[] argv) { - Properties p = new Properties(); - Properties ap; - String sProp; - String sVal; - boolean bRunIndividualTest = false; - vLeftOverTestArgs = new Vector(); - // load a props object if used with -p - for (int ii = 0; ii < argv.length; ii++) { - if (argv[ii].startsWith("-p") || argv[ii].startsWith("-ap")) { - ap = initializeProperties(argv[++ii]); - // add additional props to "p" - Enumeration e = ap.propertyNames(); - String key; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - p.put(key, ap.getProperty(key)); - } - } else if (argv[ii].startsWith("-d")) { - sProp = argv[ii].substring(2, argv[ii].indexOf('=')); - sVal = argv[ii].substring(argv[ii].indexOf('=') + 1); - p.put(sProp, sVal); - } else if (argv[ii].equalsIgnoreCase("-t")) { - sTestCase = argv[++ii]; - bRunIndividualTest = true; - } else { - // there must be args that the test needs, - // so pass these on - vLeftOverTestArgs.addElement(argv[ii]); - } - } - if (bRunIndividualTest) - p.setProperty("testName", sTestCase); - return p; - } - - private Method getSetupMethod(Class testClass, Method runMethod) { - String[] s = {}; - Class[] setupParameterTypes = { s.getClass(), - (new Properties()).getClass() }; - Method setupMethod = null; - - // first check for @SetupMethod annotation on run method - Annotation annotation = runMethod.getAnnotation(SetupMethod.class); - String testSetupMethodName = null; - if (annotation != null) { - try { - TestUtil - .logTrace("getSetupMethod - getting setup method from annotation"); - SetupMethod setupAnnotation = (SetupMethod) annotation; - testSetupMethodName = setupAnnotation.name(); - setupMethod = testClass.getMethod(setupAnnotation.name(), - setupParameterTypes); - TestUtil.logTrace( - "getSetupMethod - setup method name: " + setupAnnotation.name()); - } catch (NoSuchMethodException e) { - setTestStatus(Status.failed( - "Could not find annotation defined test setup method (" + testSetupMethodName + ") for testcase: " - + sTestCase), - e); - } - } else { - TestUtil.logTrace("No setupMethod annotation present"); - try { - // get setup method - TestUtil.logTrace( - "getSetupMethod - checking for testcase specific setup method: " - + sTestCase + "_setup"); - setupMethod = testClass.getMethod(sTestCase + "_setup", - setupParameterTypes); - } catch (NoSuchMethodException e2) { - TestUtil.logTrace( - "getSetupMethod - checking for default class specific setup method"); - - // try calling the generic setup method - try { - setupMethod = testClass.getMethod("setup", setupParameterTypes); - - } catch (NoSuchMethodException e3) { - setTestStatus( - Status.failed( - "Could not find setup method for" + "testcase: " + sTestCase), - e3); - } - } catch (RuntimeException re) { - setTestStatus( - Status.failed("Could not access the test case: " + sTestCase), re); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - } - return setupMethod; - } - - private Method getRunMethod(Class testClass) { - Method runMethod = null; - try { - // get run method - TestUtil.logTrace("** IN getRunMethod: testClass=" + testClass.getName()); - TestUtil.logTrace("** IN getRunMethod: testname=" + sTestCase); - runMethod = testClass.getMethod(sTestCase, (java.lang.Class[]) null); - } catch (NoSuchMethodException e) { - setTestStatus( - Status.failed( - "Could not find the run method" + "for test case: " + sTestCase), - e); - } catch (RuntimeException e) { - setTestStatus( - Status.failed("Could not access the test case: " + sTestCase), e); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - return runMethod; - } - - private Method getCleanupMethod(Class testClass, Method runMethod) { - Method cleanupMethod = null; - - // first check for @CleanupMethod annotation on run method - Annotation annotation = runMethod.getAnnotation(CleanupMethod.class); - - if (annotation != null) { - try { - TestUtil.logTrace( - "getCleanupMethod - getting cleanup method from annotation"); - CleanupMethod cleanupAnnotation = (CleanupMethod) annotation; - cleanupMethod = testClass.getMethod(cleanupAnnotation.name(), - (java.lang.Class[]) null); - TestUtil.logTrace("getCleanupMethod - cleanup method name: " - + cleanupAnnotation.name()); - } catch (NoSuchMethodException e) { - setTestStatus(Status.failed( - "Could not find annotation defined cleanup method for testcase: " - + sTestCase), - e); - } - } else { - TestUtil.logTrace("No cleanupMethod annotation present"); - try { - // get cleanup method - TestUtil.logTrace( - "getCleanupMethod - checking for testcase specific cleanup method: " - + sTestCase + "_cleanup"); - cleanupMethod = testClass.getMethod(sTestCase + "_cleanup", - (java.lang.Class[]) null); - } catch (NoSuchMethodException e2) { - TestUtil.logTrace( - "getCleanupMethod - checking for default class specific cleanup method"); - - // try calling the generic cleanup method - try { - cleanupMethod = testClass.getMethod("cleanup", - (java.lang.Class[]) null); - - } catch (NoSuchMethodException e3) { - setTestStatus(Status.failed( - "Could not find cleanup method for" + "testcase: " + sTestCase), - e3); - } - } catch (RuntimeException re) { - setTestStatus( - Status.failed("Could not access the test case: " + sTestCase), re); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - } - return cleanupMethod; - } - - protected Properties initializeProperties(String sPropertiesFile) { - FileInputStream propertyFileInputStream = null; - Properties props = null; - try { - propertyFileInputStream = new FileInputStream(sPropertiesFile); - props = new Properties(); - props.load(propertyFileInputStream); - } catch (FileNotFoundException e) { - TestUtil.logHarness("Could not find specified props file", e); - } catch (IOException e) { - TestUtil.logHarness("IOException while reading props file", e); - } catch (Exception e) { - TestUtil.logHarness("Exception while reading props file", e); - } finally { - try { - if (propertyFileInputStream != null) - propertyFileInputStream.close(); - } catch (IOException ex) { - TestUtil.logHarness("IOException while closing props file", ex); - } - } - return props; - } - - /** - *

- * This method is only called when test are run outside of JavaTest. If a - * testcase name is passed within argv, then that testcase is run. Otherwise, - * all testcases within this implementation of EETest are run. - *

- * - * @param argv - * an array of arguments that a test may use - * @param log - * Stream passed to TestUtil for standard loggin - * @param err - * Writer passed to TestUtil for error logging - * @return a Javatest {@link Status} object (passed or failed) - */ - public Status run(String[] argv, PrintStream log, PrintStream err) { - return run(argv, new PrintWriter(log, true), new PrintWriter(err, true)); - } - - /** - * This method is only called when tests are run outside of JavaTest or if the - * test is being run in the same VM as the harness. If a testcase name is - * passed within argv, then that testcase is run. Otherwise, all testcases - * within this implementation of EETest are run. - * - * @param argv - * an array of arguments that a test may use - * @param log - * Writer passed to TestUtil for standard loggin - * @param err - * Writer passed to TestUtil for error logging - * @return a Javatest {@link Status} object (passed or failed) - */ - public Status run(String[] argv, PrintWriter log, PrintWriter err) { - Properties props; - Status retStatus = Status.failed("No status set yet"); - // assign log and reference output streams - // this.err = err; - // this.log = log; - props = getTestPropsFromArgs(argv); - // get the # of secs we should delay to allow reporting to finish - try { - String delayseconds = TestUtil.getProperty(props, "harness.log.delayseconds", "0"); - iLogDelaySeconds = Integer.parseInt(delayseconds) * 1000; - } catch (NumberFormatException e) { - // set the default if a number was not set - iLogDelaySeconds = 0; - } - if (props.isEmpty()) - return Status.failed( - "FAILED: An error occurred while trying to load the test properties"); - // copy leftover args to an array and pass them on - int iSize = vLeftOverTestArgs.size(); - if (iSize == 0) { - argv = null; - } else { - argv = new String[iSize]; - for (int ii = 0; ii < iSize; ii++) { - argv[ii] = (String) vLeftOverTestArgs.elementAt(ii); - } - } - props.put("line.separator", System.getProperty("line.separator")); - if (sTestCase == null) - return runAllTestCases(argv, props, log, err); - else { - // need to pass these streams to the Local Reporter - TestUtil.setCurrentTest(sTestCase, log, err); - TestUtil.initClient(props); - retStatus = getPropsReady(argv, props); - try { - Thread.sleep(iLogDelaySeconds); - } catch (InterruptedException e) { - logErr("Exception: " + e); - } - return retStatus; - } - } - - protected void setTestStatus(Status s, Throwable t) { - // only set the status for the first failure - if (sTestStatus.getType() == Status.PASSED) - sTestStatus = s; - if (t != null) { - TestUtil.logErr(s.getReason()); - TestUtil.logErr("Exception at: ", t); - } - } - - protected Status runAllTestCases(String[] argv, Properties p, PrintWriter log, - PrintWriter err) { - String[] sTestCases; - int iPassedCount = 0; - int iFailedCount = 0; - TestUtil.initClient(p); - try { - sTestCases = getAllTestCases(p); - } catch (Exception e) { - e.printStackTrace(); - return Status - .failed("An error occurred trying to get all" + "testcase methods."); - } - for (int ii = 0; ii < sTestCases.length; ii++) { - sTestCase = sTestCases[ii]; - p.setProperty("testName", sTestCase); - TestUtil.setCurrentTest(sTestCase, log, err); - bUtilAlreadyInitialized = true; - sTestStatus = Status.passed(""); - TestUtil.separator2(); - TestUtil.logMsg("Beginning Test: " + sTestCases[ii]); - TestUtil.separator2(); - sTestStatus = getPropsReady(argv, p); - try { - Thread.sleep(iLogDelaySeconds); - } catch (InterruptedException e) { - logErr("Exception: " + e); - } - if (sTestStatus.getType() == Status.PASSED) { - sTestCases[ii] += "...........PASSED"; - iPassedCount++; - } else { - TestUtil.logMsg(sTestStatus.getReason()); - sTestCases[ii] += "...........FAILED"; - iFailedCount++; - } - TestUtil.separator2(); - TestUtil.logMsg("End Test: " + sTestCases[ii]); - TestUtil.separator2(); - } - TestUtil.separator2(); - TestUtil.logMsg("Completed running " + sTestCases.length + " tests."); - TestUtil.logMsg("Number of Tests Passed = " + iPassedCount); - TestUtil.logMsg("Number of Tests Failed = " + iFailedCount); - TestUtil.separator2(); - for (int ii = 0; ii < sTestCases.length; ii++) { - TestUtil.logMsg(sTestCases[ii]); - } - if (iFailedCount > 0) - return Status.failed("FAILED"); - else - return Status.passed("PASSED"); - } - - /** - * This method is only called from JavaTest to run a single testcase. All - * properties are determined from the source code tags. - * - * @param argv - * an array of arguments that a test may use - * @param p - * properties that are used by the testcase - * @param log - * stream passed to TestUtil for standard logging - * @param err - * stream passed to TestUtil for error logging - * @return a Javatest Status object (passed or failed) - */ - public Status run(String[] argv, Properties p, PrintWriter log, - PrintWriter err) { - // need to pass these streams to the Local Reporter - sTestCase = TestUtil.getProperty(p, "testName"); - TestUtil.setCurrentTest(sTestCase, log, err); - TestUtil.initClient(p); - return getPropsReady(argv, p); - } - - protected Status getPropsReady(String[] argv, Properties p) { - // we only do this if we're in the Harness VM. If we're on the server, - // that means that we're executing a service test within a generic - // vehicle. In that case, we just invoke the setup, run, and cleanup - // methods. - // trim any whitespace around the property values - Enumeration enum1 = p.propertyNames(); - String key; - String value; - while (enum1.hasMoreElements()) { - key = (String) enum1.nextElement(); - value = p.getProperty(key); - if (value != null) { - p.put(key, value.trim()); - } - // TestUtil.logTrace("Trimming prop: " + key + ". Value = " + value); - } - // set testname just to be sure - sTestCase = TestUtil.getProperty(p, "testName"); - // The code below is to allow JCK service tests to be run from - // ejb vehicles that have been bundled with an appclient - // Need to get the setup(), run() and cleanup() methods in the - // individual test classes -- not from the APIClient.class. - // TestUtil.logTrace("**Got current testclass : " + - // this.getClass().getName()); - // TestUtil.logTrace("*** Got testclass property : " + - // p.getProperty("test_classname")); - String sClass_name = TestUtil.getProperty(p, "test_classname"); - if (sClass_name != null) { - String finder = TestUtil.getProperty(p, "finder"); - if (finder.trim().equals("jck")) { - if (!((this.getClass().getName()).equals((sClass_name.trim())))) { - try { - testClInst = Class.forName(sClass_name).newInstance(); - testClass = testClInst.getClass(); - nCl = true; - } catch (Exception te) { - te.printStackTrace(); - } - } - } - } - // set the harness.host prop so the server can initialize the - // the TestUtil logging - - if(p.getProperty("harness.host") == null ) { - p.setProperty("harness.host", "localhost"); - // InetAddress.getLocalHost().getHostAddress()); - } - return run(argv, p); - } - - // public RemoteStatus run(String[] argv, Properties p, int iDummy) - // { - // return new RemoteStatus(run(argv, p)); - // } - /** - * This run method is the one that actually invokes reflection to figure out - * and invoke the testcase methods. - * - * @param argv - * an array of arguments that a test may use - * @param p - * properties that are used by the testcase - * @return a Javatest Status object (passed or failed) - */ - public Status run(String[] argv, Properties p) { - sTestStatus = Status.passed(""); - // Make sure we set the testname if we're in a generic vehicle - sTestCase = TestUtil.getProperty(p, "testName"); - // Class testClass = this.getClass(); - Method setupMethod, runMethod, cleanupMethod; - - // commented out as it's not currently used - // Class testArgTypes[] = {}; - Object testArgs[] = { argv, p }; - TestUtil.logTrace("*** in EETest.run(argv,p)"); - if (sTestCase == null || sTestCase.equals("")) { - // TestUtil.logTrace("*** in EETestrun(): testCase=null)"); - return Status.failed("Invalid test case name: " + sTestCase); - } else { - // The code below is to allow JCK service tests to be run from - // ejb vehicles that have been bundled with an appclient - // Need to get the setup(), run() and cleanup() methods in the - // individual test classes -- not from the APIClient.class. - // TestUtil.logTrace("**Got current testclass : " + - // this.getClass().getName()); - // TestUtil.logTrace("*** Got testclass property : " + - // p.getProperty("test_classname")); - // if ( p.getProperty("test_classname") != null ) - // if ( - // !((this.getClass().getName()).equals((p.getProperty("test_classname").trim())))) - // { - // try { - // testClInst=Class.forName(p.getProperty("test_classname")).newInstance(); - // testClass=testClInst.getClass(); - // nCl=true; - // }catch ( Exception te ) { - // te.printStackTrace(); - // } - // } - TestUtil.logTrace("TESTCLASS=" + testClass.getName()); - runMethod = getRunMethod(testClass); - if (runMethod == null) - return Status.failed("Invalid test case name as test run Method ( " + sTestCase + ") could not be found in " + testClass.getName()); - else { - TestUtil.logTrace("** GOT RUN METHOD!"); - TestUtil.logTrace("**runmethod=" + runMethod.getName()); - } - TestUtil.logTrace("ABOUT TO GET SETUP METHOD!"); - setupMethod = getSetupMethod(testClass, runMethod); - if (setupMethod == null) - return Status.failed("Invalid test case name as test setupMethod could not be found ( Test setup method: " + - getSetupMethodName(runMethod) + ", testName:" + sTestCase + ") " + - "in test class " + testClass.getName() + "(test class was loaded from: " + testClass.getClassLoader().getName() + ")"); - else - TestUtil.logTrace("GOT SETUP METHOD: " + setupMethod.getName() + " for " + testClass.getName()); - - cleanupMethod = getCleanupMethod(testClass, runMethod); - if (cleanupMethod == null) - return Status.failed("Invalid test case name as test cleanupMethod Method ( for " + sTestCase + ") could not be found in " + testClass.getName()); - else - TestUtil.logTrace("GOT CLEANUP METHOD: " + cleanupMethod.getName() + " for " + testClass.getName()); - try { - TestUtil.logTrace("ABOUT TO INVOKE SETUP METHOD!"); - // if new classname is true, use that class name instead of - // "this" class. - if (nCl) - setupMethod.invoke(testClInst, testArgs); - else - setupMethod.invoke(this, testArgs); - TestUtil.logTrace("INVOKED SETUP METHOD!"); - } catch (IllegalAccessException e) { - setTestStatus(Status.failed( - "Could not execute setup method" + "for test case: " + sTestCase), - e); - } catch (InvocationTargetException e) { - setTestStatus(Status.failed( - "Test case throws exception: " + e.getTargetException().toString()), - e.getTargetException()); - } catch (RuntimeException e) { - setTestStatus( - Status.failed("Could not access the test case: " + e.toString()), - e); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - if (sTestStatus.getType() == Status.PASSED) { - TestUtil.logTrace("ABOUT TO INVOKE EETEST RUN METHOD!"); - try { - // if new classname is true, use that class name instead of - // "this" class. - if (nCl) - runMethod.invoke(testClInst, (java.lang.Object[]) null); - else - runMethod.invoke(this, (java.lang.Object[]) null); - } catch (IllegalAccessException e) { - setTestStatus(Status.failed( - "Could not execute run method" + "for test case: " + sTestCase), - e); - } catch (InvocationTargetException e) { - setTestStatus( - Status.failed("Test case throws exception: " - + e.getTargetException().getMessage()), - e.getTargetException()); - } catch (RuntimeException e) { - setTestStatus( - Status.failed("Could not access the test case: " + e.toString()), - e); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - } - // call cleanup no matter what - try { - // if new classname is true, use that class name instead of - // "this" class. - if (nCl) - cleanupMethod.invoke(testClInst, (java.lang.Object[]) null); - else - cleanupMethod.invoke(this, (java.lang.Object[]) null); - } catch (IllegalAccessException e) { - setTestStatus( - Status.failed( - "Could not execute cleanup method for test case: " + sTestCase), - e); - } catch (InvocationTargetException e) { - setTestStatus(Status.failed("Test case throws exception: " - + e.getTargetException().getMessage()), e.getTargetException()); - // Throwable t = e.getTargetException(); - } catch (RuntimeException e) { - setTestStatus( - Status.failed("Could not access the test case: " + e.toString()), - e); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { - setTestStatus(Status.failed("Unexpected Throwable: " + t), t); - } - } - return sTestStatus; - } - - private String getSetupMethodName(Method runMethod) { - Annotation annotation = runMethod.getAnnotation(SetupMethod.class); - if (annotation != null) { - SetupMethod setupAnnotation = (SetupMethod) annotation; - return setupAnnotation.name(); - } - return ""; - } - - private String[] getAllTestCases(Properties p) throws SetupException { - Vector tests = new Vector(); - String[] testMethods; - try { - // read in exclude list once per VM - ExcludeListProcessor.readExcludeList(TestUtil.getSystemProperty("exclude.list")); - // setup a testname in a format that will macth the exclude list - String sJavaTestName = ""; - String sVehicle; - sVehicle = TestUtil.getProperty(p, "vehicle"); - if (sVehicle != null) { - // tack on "_from_" - sVehicle = "_from_" + sVehicle; - } - // for all tests, prepend the relative path and - // .java file - String sClientClassName = this.getClass().getName(); - String sClientJavaName = sClientClassName - .substring(sClientClassName.lastIndexOf('.') + 1) + ".java"; - String sCurrentDir = TestUtil.getSystemProperty("current.dir"); - sCurrentDir = sCurrentDir.replace(File.separatorChar, '/'); - String sRelativeTestDir = sCurrentDir - .substring(sCurrentDir.indexOf("tests/")); - sRelativeTestDir = sRelativeTestDir - .substring(sRelativeTestDir.indexOf("/") + 1); - // make sure we have a trailing "/" - if (!sRelativeTestDir.endsWith("/")) - sRelativeTestDir += "/"; /* - * Get public methods for this class Loop - * through them to get methods that return - * void, have no parameters, and contain "Test" - * in their name. - */ - - Method[] methods = testClass.getMethods(); - for (int ii = 0; ii < methods.length; ii++) { - Class[] paramTypes = methods[ii].getParameterTypes(); - - // commented out as this is not currently used - // Class returnType = methods[ii].getReturnType(); - - // test that the parameter types match - if ((paramTypes.length == 0)) - // && - // Void.class.isAssignableFrom(returnType)) - { - String sName = methods[ii].getName(); - // test for our name requirements - if ((sName.indexOf("Test") != -1 || sName.indexOf("test") != -1) - && (sName.indexOf("Setup") == -1 && sName.indexOf("setup") == -1) - && (sName.indexOf("Cleanup") == -1 - && sName.indexOf("cleanup") == -1)) { - // check here for excluded tests when running - // outside of JavaTest - sJavaTestName = sName + sVehicle; - // construct the JavaTest recognizable testname - sJavaTestName = sRelativeTestDir + sClientJavaName + "#" - + sJavaTestName; - // for all tests, check to see if it's excluded - if (!ExcludeListProcessor.isTestExcluded(sJavaTestName)) - tests.addElement(sName); - else - System.out.println(sJavaTestName + " is excluded."); - sJavaTestName = ""; - } - } - } - } catch (SecurityException e) { - throw new SetupException("Failed while getting all test methods: ", e); - } - /* - * Check size of vector, if <= 0, no methods match signature if > 0, copy - * values into testMethods array - */ - if (tests.size() <= 0) - throw new SetupException( - "No methods match signature: " + "\"public void methodName()\""); - testMethods = new String[tests.size()]; - for (int ii = 0; ii < testMethods.length; ii++) { - testMethods[ii] = (String) tests.elementAt(ii); - } - return testMethods; - } - - /** - * prints a string to the TestUtil log stream. All tests should use this - * method for standard logging messages - * - * @param msg - * string to print to the log stream - */ - public void logMsg(String msg) { - TestUtil.logMsg(msg); - } - - /** - * prints a debug string to the TestUtil log stream. All tests should use this - * method for verbose logging messages. Whether or not the string is printed - * is determined by the last call to the TestUtil setTrace method. - * - * @param msg - * string to print to the log stream - */ - public void logTrace(String msg) { - TestUtil.logTrace(msg); - } - - public void logTrace(String msg, Throwable e) { - TestUtil.logTrace(msg, e); - } - /** - * prints a string to the TestUtil error stream. All tests should use this - * method for error messages - * - * @param msg - * string to print to the error stream - */ - public void logErr(String msg) { - TestUtil.logErr(msg); - } - - /** - * prints a string to the TestUtil error stream. All tests should use this - * method for error messages - * - * @param msg - * string to print to the error stream - * @param e - * a Throwable whose stacktrace gets printed - */ - public void logErr(String msg, Throwable e) { - TestUtil.logErr(msg, e); - } - - /** - * This exception must be thrown by all implentations of EETest to signify a - * test failure. Overrides 3 printStackTrace methods to preserver the original - * stack trace. Using setStackTraceElement() would be more elegant but it is - * not available prior to j2se 1.4. - * - * @author Kyle Grucci - */ - public static class Fault extends Exception { - private static final long serialVersionUID = -1574745208867827913L; - - public Throwable t; - - /** - * creates a Fault with a message - */ - public Fault(String msg) { - super(msg); - TestUtil.logErr(msg); - } - - /** - * creates a Fault with a message. - * - * @param msg - * the message - * @param t - * prints this exception's stacktrace - */ - public Fault(String msg, Throwable t) { - super(msg); - this.t = t; - // TestUtil.logErr(msg, t); - } - - /** - * creates a Fault with a Throwable. - * - * @param t - * the Throwable - */ - public Fault(Throwable t) { - super(t); - this.t = t; - } - - /** - * Prints this Throwable and its backtrace to the standard error stream. - * - */ - public void printStackTrace() { - if (this.t != null) { - this.t.printStackTrace(); - } else { - super.printStackTrace(); - } - } - - /** - * Prints this throwable and its backtrace to the specified print stream. - * - * @param s - * PrintStream to use for output - */ - public void printStackTrace(PrintStream s) { - if (this.t != null) { - this.t.printStackTrace(s); - } else { - super.printStackTrace(s); - } - } - - /** - * Prints this throwable and its backtrace to the specified print writer. - * - * @param s - * PrintWriter to use for output - */ - public void printStackTrace(PrintWriter s) { - if (this.t != null) { - this.t.printStackTrace(s); - } else { - super.printStackTrace(s); - } - } - - @Override - public Throwable getCause() { - return t; - } - - @Override - public synchronized Throwable initCause(Throwable cause) { - if (t != null) - throw new IllegalStateException("Can't overwrite cause"); - if (!Exception.class.isInstance(cause)) - throw new IllegalArgumentException("Cause not permitted"); - this.t = (Exception) cause; - return this; - } - } - - /** - * This exception is used only by EETest. Overrides 3 printStackTrace methods - * to preserver the original stack trace. Using setStackTraceElement() would - * be more elegant but it is not available prior to j2se 1.4. - * - * @author Kyle Grucci - */ - public static class SetupException extends Exception { - private static final long serialVersionUID = -7616313680616499158L; - - public Exception e; - - /** - * creates a Fault with a message - */ - public SetupException(String msg) { - super(msg); - } - - /** - * creates a SetupException with a message - * - * @param msg - * the message - * @param e - * prints this exception's stacktrace - */ - public SetupException(String msg, Exception e) { - super(msg); - this.e = e; - } - - /** - * Prints this Throwable and its backtrace to the standard error stream. - * - */ - public void printStackTrace() { - if (this.e != null) { - this.e.printStackTrace(); - } else { - super.printStackTrace(); - } - } - - /** - * Prints this throwable and its backtrace to the specified print stream. - * - * @param s - * PrintStream to use for output - */ - public void printStackTrace(PrintStream s) { - if (this.e != null) { - this.e.printStackTrace(s); - } else { - super.printStackTrace(s); - } - } - - /** - * Prints this throwable and its backtrace to the specified print writer. - * - * @param s - * PrintWriter to use for output - */ - public void printStackTrace(PrintWriter s) { - if (this.e != null) { - this.e.printStackTrace(s); - } else { - super.printStackTrace(s); - } - } - - @Override - public Throwable getCause() { - return e; - } - - @Override - public synchronized Throwable initCause(Throwable cause) { - if (e != null) - throw new IllegalStateException("Can't overwrite cause"); - if (!Exception.class.isInstance(cause)) - throw new IllegalArgumentException("Cause not permitted"); - this.e = (Exception) cause; - return this; - } - } - -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java b/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java deleted file mode 100644 index bfed6209b4..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.harness; - -import java.util.Vector; -import java.util.StringTokenizer; -import java.io.File; -import java.io.FileReader; -import java.io.BufferedReader; -import java.io.PrintWriter; -import java.io.FileWriter; -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.FileNotFoundException; - -public class ExcludeListProcessor { - - // pass in a string which has the filename#testname - public static boolean isTestExcluded(String fileName) { - // check to see if it exists in the exclude list - return fileNameList.contains(fileName); - } - - public static void readExcludeList(String fileName) { - BufferedReader d = null; - try { - d = new BufferedReader(new FileReader(fileName)); - String line; - while ((line = d.readLine()) != null) { - line = line.trim(); - if (line.length() > 0 && !line.startsWith("#")) { - String entry = new String(line); - fileNameList.addElement(entry.trim()); - } - } - d.close(); - } catch (FileNotFoundException e) { - System.out.println(e.toString()); - e.printStackTrace(); - } catch (IOException e) { - System.out.println(e.toString()); - e.printStackTrace(); - } - } - - /*----------- Private Members of this class -------------*/ - private static Vector fileNameList = new Vector(); - -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java b/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java deleted file mode 100644 index 6af8b54868..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.harness; - -import com.sun.ts.lib.deliverable.PropertyManagerInterface; -import com.sun.ts.lib.util.TestUtil; - -public class ExecutionMode { - public final static int DEPLOY_RUN_UNDEPLOY = 0; - - public final static int DEPLOY = 1; - - public final static int RUN = 2; - - public final static int UNDEPLOY = 3; - - public final static int DEPLOY_RUN = 4; - - public final static int LIST = 5; - - public final static int DEFAULT = DEPLOY_RUN_UNDEPLOY; - - private ExecutionMode() { - } - - /** - * gets the current execution mode from PropertyManagerInterface or from a - * system property if overridden on the commandline. Note that current - * execution mode is not cached since harness.executeMode property may change - * between test executions. - * - * @param propMgr - * an implementation of PropertyManagerInterface. - * @return an int representing one of the 5 modes - */ - public static int getExecutionMode(PropertyManagerInterface propMgr) { - int mode = (Integer.getInteger("harness.executeMode", -1)).intValue(); - - if (mode == -1) { - if (propMgr != null) { - String modeS = propMgr.getProperty("harness.executeMode", ""); - try { - mode = Integer.parseInt(modeS); - } catch (Exception e) { - mode = DEFAULT; - } - } else { - throw new Error( - "PropertyManager is null. Please pass in a valid PropertyManager"); - } - - } - - if (mode < DEPLOY_RUN_UNDEPLOY || mode > LIST) { - TestUtil.logHarness("harness.executeMode in ts.jte: " + mode - + " is not valid. Will use default " + DEFAULT + "."); - mode = DEFAULT; - } - - TestUtil.logHarness("harness.executeMode is set to \"" + mode + "\""); - return mode; - } - -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java b/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java deleted file mode 100644 index a0dc49cf7a..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.harness; - -import java.io.*; -import java.rmi.Remote; -import java.rmi.RemoteException; -import com.sun.ts.lib.util.*; -import java.util.*; -import com.sun.ts.lib.harness.Status; -import com.sun.ts.tests.common.vehicle.*; -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.porting.*; -import com.sun.ts.lib.deliverable.*; -import java.net.*; - -/** - * This abstract class must be extended by all clients of tests of J2EE service - * apis; for example, JDBC, RMI-IIOP, JavaMail, JMS, etc. When a service test is - * encountered by the JavaTest Client, the instance is passed to a J2EE server - * component and run from that remote location. Using this model to develop - * tests allows the same test to be run from different locations within the - * scope of the J2EE Application Programming Model. - * - * @author Kyle Grucci - */ -public abstract class ServiceEETest extends EETest { - - /* - * Please do NOT change this class in an incompatible manner with respect to - * serialization. Please see the serialization specification to determine what - * is a compatible change versus incompatible. If you do need to change this - * class in an incompatible manner you will need to rebuild the compat tests. - * You should also increment the serialVersionUID field to denote that this - * class is incompatible with older versions. - */ - // static final long serialVersionUID = -1396452037848185296L; - - String[] sVehicles; - - private Object theSharedObject; - - private Object theSharedObjectArray[]; - - /** - * Returns any additional properties that may need to be set by a subclass of - * ServiceEETest for use by a specific vehicle. This method was created due to - * a need for clients of the JBIVehicle to set the name of the object to - * lookup in the rmiregistry. By rule, this value should match the id name for - * the component specified in the JBI installation descriptor. This impl - * returns an empty properties object by default. - * - * @param p - * user configured properties used by the test - * @return Properties Additional properties that may need to be set by a - * subclass of ServiceEETest for use by a specific vehicle. - */ - public Properties getVehicleSpecificClientProps(Properties p) { - return new Properties(); - } - - /** - * When called within the harness VM, this method passes an instance of itself - * to the appropriate J2EE server component. When called from within that - * server component, EETest's run method is called and the test is run. - * - * @param argv - * an array of arguments that a test may use - * @param p - * user configured properties used by this test - * @return a Javatest Status object (passed or failed) - */ - public Status run(String[] argv, Properties p) { - Status status = null; - boolean inTestHarness = TestUtil.iWhereAreWe == TestUtil.VM_HARNESS; - TestUtil.logTrace("Check if called from within test process, inTestHarness= " + inTestHarness); - boolean isVehicleClient = false; - URL thisURL = getClass().getProtectionDomain().getCodeSource().getLocation(); - TestUtil.logTrace("in ServiceEETest.run(), this URL is: " + thisURL); - try { - Class vcClass = getClass().getClassLoader().loadClass("com.sun.ts.tests.common.vehicle.VehicleClient"); - URL vcClassURL = vcClass.getProtectionDomain().getCodeSource().getLocation(); - TestUtil.logTrace("VehicleClient URL is: " + vcClassURL); - isVehicleClient = vcClass.isAssignableFrom(getClass()); - TestUtil.logTrace("VehicleClient class check if is vehicle class = " + - (isVehicleClient? "yes, is a com.sun.ts.tests.common.vehicle.VehicleClient" - : "no, is not com.sun.ts.tests.common.vehicle.VehicleClient class")); - if (inTestHarness && !isVehicleClient) { - String sVehicle = TestUtil.getProperty(p, "vehicle"); - if("stateless3".equals(sVehicle) || "stateful3".equals(sVehicle) - || "appmanaged".equals(sVehicle) || "appmanagedNoTx".equals(sVehicle)) { - isVehicleClient = true; - TestUtil.logTrace("Using appclient vehicle so set is vehicle client to true"); - } - } - } catch (ClassNotFoundException e) { - TestUtil.logTrace("VehicleClient class not found, so not a vehicle client."); - } - if (inTestHarness && isVehicleClient) { - TestUtil.logTrace("in ServiceEETest.run() method"); - String sVehicle = TestUtil.getProperty(p, "vehicle"); - String className = this.getClass().getName(); - // use this name for the context root or jndi name to eliminate - // naming conflicts for apps deployed at the same time - // comment out unused: String sVehicleEarName = TestUtil.getProperty(p, "vehicle_ear_name"); - TestUtil.logTrace("Vehicle to be used for this test is: " + sVehicle); - // call to the Deliverable to run in deliverable specific vehicles - // This should never be called on the server, so there is - // no need to pass in the deliverable.class system property - try { - VehicleRunnable runner = VehicleRunnerFactory - .getVehicleRunner(sVehicle); - p.putAll((Map) getVehicleSpecificClientProps(p)); - status = runner.run(argv, p); - } catch (Throwable e) { - e.printStackTrace(); - return Status.failed("Vehicle runner failed."); - } - - return status; - } else { - // we're on the server in a custom vehicle, so just call on EETest - TestUtil.logTrace("in custom vehicle so call on EETest."); - return super.run(argv, p); - } - } - - protected Properties getTestPropsFromArgs(String[] argv) { - Properties p = new Properties(); - Properties ap = new Properties(); - String sProp = null; - String sVal = null; - boolean bRunIndividualTest = false; - vLeftOverTestArgs = new Vector(); - - if (TestUtil.harnessDebug) - TestUtil.logHarnessDebug("ServiceEETest: " + argv.length + " args: " - + Arrays.asList(argv).toString()); - // load a props object if used with -p - boolean tFound = false; - String argItem = null; - for (int ii = 0; ii < argv.length; ii++) { - argItem = argv[ii]; - if (argItem.equals("-p") || argItem.equals("-ap")) { - ap = initializeProperties(argv[++ii]); - // add additional props to "p" - Enumeration e = ap.propertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - p.put(key, (String) ap.getProperty(key)); - } - } else if (argItem.startsWith("-d") && argItem.indexOf('=') != -1) { - int equalSign = argItem.indexOf('='); - sProp = argItem.substring(2, equalSign); - sVal = argItem.substring(equalSign + 1); - p.put(sProp, sVal); - } - // the first -t specifies test name and should be consumed by harness. - // Any subsequent -t is to be passed along to test. - else if (argItem.equalsIgnoreCase("-t") && !tFound) { - sTestCase = argv[++ii]; - tFound = true; - bRunIndividualTest = true; - } else if (argItem.equalsIgnoreCase("-vehicle")) { - sVehicles = new String[1]; - sVehicles[0] = argv[++ii]; - } else { - // there must be args that the test needs, - // so pass these on - vLeftOverTestArgs.addElement(argItem); - } - } - if (bRunIndividualTest) - p.setProperty("testName", sTestCase); - return p; - } - - public Status run(String[] argv, PrintWriter log, PrintWriter err) { - Status s = Status.passed("OK"); - Properties props; - props = getTestPropsFromArgs(argv); - // get the # of secs we should delay to allow reporting to finish - try { - String delayseconds = TestUtil.getProperty(props, "harness.log.delayseconds", "1"); - iLogDelaySeconds = Integer.parseInt(delayseconds) * 1000; - } catch (NumberFormatException e) { - // set the default if a number was not set - iLogDelaySeconds = 1000; - } - if (sVehicles == null) { - if (TestUtil.harnessDebug) - TestUtil.logHarnessDebug("ServiceEETest.run(): vehicles = null"); - sVehicles = getVehicles(props); - } - if (props.isEmpty()) - return Status.failed( - "FAILED: An error occurred while trying to load the test properties"); - // copy leftover args to an array and pass them on - int iSize = vLeftOverTestArgs.size(); - if (iSize == 0) { - argv = null; - } else { - argv = new String[iSize]; - for (int ii = 0; ii < iSize; ii++) { - argv[ii] = (String) vLeftOverTestArgs.elementAt(ii); - } - } - if (sTestCase == null) - return runAllTestCases(argv, props, log, err); - else { - for (int ii = 0; ii < sVehicles.length; ii++) { - props.put("vehicle", sVehicles[ii]); - // need to pass these streams to the Local Reporter - TestUtil.setCurrentTest(sTestCase, new PrintWriter(log, true), - new PrintWriter(err, true)); - TestUtil.initClient(props); - s = getPropsReady(argv, props); - try { - Thread.sleep(iLogDelaySeconds); - TestUtil.logTrace("SLEPT FOR: " + iLogDelaySeconds); - } catch (InterruptedException e) { - logErr("Exception: " + e); - } - } - } - return s; - } - - // overridden to allow service tests to run in standalone - // mode outside of javatest - protected Status runAllTestCases(String[] argv, Properties p, PrintStream log, - PrintStream err) { - if (sVehicles == null) { - if (TestUtil.harnessDebug) - TestUtil.logHarnessDebug( - "ServiceEETest.runAllTestCases(): vehicles = null"); - sVehicles = getVehicles(p); - } - Status s = Status.passed("OK"); - for (int ii = 0; ii < sVehicles.length; ii++) { - p.put("vehicle", sVehicles[ii]); - s = super.runAllTestCases(argv, p, new PrintWriter(log, true), - new PrintWriter(err, true)); - log.println("Completed running tests in " + sVehicles[ii] + " vehicle."); - } - return s; - } - - private String[] getVehicles(Properties p) { - String[] sReturn = null; - String sVal = null; - String sVehiclesToUse = null; - StringTokenizer st = null; - try { - // get vehicles property (DEFAULT to all) - sVal = TestUtil.getProperty(p, "service_eetest.vehicles"); - } catch (Exception e) { - // got an exception looking up the prop, so set defaults - sVal = ""; - sVal = "ejb servlet jsp"; - } - if (sVal == null || sVal.equals("")) { - sVehiclesToUse = "ejb servlet jsp"; - if (TestUtil.harnessDebug) - TestUtil - .logHarnessDebug("getVehicles: " + "Using default - all vehicles"); - } else { - sVehiclesToUse = sVal; - if (TestUtil.harnessDebug) - TestUtil.logHarnessDebug( - "getVehicles: using vehicle(s) - " + sVehiclesToUse); - } - st = new StringTokenizer(sVehiclesToUse); - int iCount = st.countTokens(); - sReturn = new String[iCount]; - for (int ii = 0; ii < iCount; ii++) { - // create 1 desc for each vehicle to be tested - sReturn[ii] = st.nextToken().trim(); - } - return sReturn; - } - - /* - * Set shared object - */ - public void setSharedObject(Object o) { - theSharedObject = o; - } - - /* - * Get shared object - */ - public Object getSharedObject() { - return theSharedObject; - } -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java b/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java deleted file mode 100644 index edc3e378fd..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.harness; - -import com.sun.ts.lib.util.*; -import java.util.*; -import java.io.*; - -/** - * This class is used by the TS harness to figure out which keywords should be - * associated with directories of tests. Keywords are read in by the - * TSTestFinder and written out to the test decriptions. - * - * A singleton class not intended for concurrent access. - * - * - */ -public class TSKeywords { - public final static String KEYWORD_PROP_FILE_NAME = "keyword.properties"; - - private Properties mapping; - - private String[] keys; // sorted ascending - - private String relativeTestDir; - - private boolean loaded; - - // an uninitialized singleton instance - private static TSKeywords instance = new TSKeywords(); - - private TSKeywords() { - } - - public static TSKeywords getInstance(File path) { - if (instance == null) { - instance = new TSKeywords(); - } - instance.init(path); - return instance; - } - - private void init(File file) { - if (!loaded) { - mapping = ConfigUtil.loadPropertiesFor(KEYWORD_PROP_FILE_NAME); - keys = ConfigUtil.loadKeysFrom(mapping); - loaded = true; - } - if (mapping != null) { - this.relativeTestDir = TestUtil.getRelativePath(file.getPath()); - } - } - - /** - * This method gets the current set of keywords to be used for a given - * directory path. - * - * @return a String array of the keywords that this test should be run in - */ - public String[] getKeywordSet() { - if (mapping == null || keys == null) { - return TestUtil.EMPTY_STRING_ARRAY; - } - - String[] result = ConfigUtil.getMappingValue(this.mapping, this.keys, - this.relativeTestDir); - return result; - } -} diff --git a/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java b/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java deleted file mode 100644 index dcd110d73b..0000000000 --- a/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.harness; - -import com.sun.ts.lib.util.*; -import java.util.*; -import java.io.*; - -/** - * This class is used by the TS harness to figure out which vehicles are to be - * used by the Service tests in the TS. These defaults can be overridden by - * editing appropriate properties file. However, this override mechanism is only - * to be used for debugging purposes. When testing for J2EE certification, the - * defaults specified in this class must be used. - * - * A singleton class not intended for concurrent access. - * - * @author Kyle Grucci - */ -public class VehicleVerifier { - public final static String VEHICLE_PROP_FILE_NAME = "vehicle.properties"; - - public final static String EXCLUDE_KEY = "exclude.dir"; - - private static Properties mapping; - - private static String[] keys; // sorted ascending - - private static String[] excludes; - - private String relativeTestDir; - - private String testName; - - private static boolean loaded; - - // an uninitialized singleton instance - private static VehicleVerifier instance = new VehicleVerifier(); - - private VehicleVerifier() { - } - - public static VehicleVerifier getInstance(File path) { - if (instance == null) { - instance = new VehicleVerifier(); - } - instance.init(path, null); - return instance; - } - - public static VehicleVerifier getInstance(File path, String sTestName) { - if (instance == null) { - instance = new VehicleVerifier(); - } - instance.init(path, sTestName); - return instance; - } - - private void loadExcludes() { - if (this.mapping == null) { - excludes = TestUtil.EMPTY_STRING_ARRAY; - } else { - excludes = ConfigUtil.stringToArray((String) mapping.remove(EXCLUDE_KEY)); - } - } - - private void init(File file, String sTest) { - if (!loaded) { - mapping = ConfigUtil.loadPropertiesFor(VEHICLE_PROP_FILE_NAME); - loadExcludes(); - keys = ConfigUtil.loadKeysFrom(mapping); - loaded = true; - } - testName = sTest; - if (mapping != null) { - this.relativeTestDir = TestUtil.getRelativePath(file.getPath()); - if (testName != null) { - this.relativeTestDir += "#" + testName; - TestUtil.logHarnessDebug( - "VehicleVerifier.init: relative dir = " + this.relativeTestDir); - - } - } - // if mapping is null, it means this tck uses no vehicles and - // vehicle.properties - // does not exist. So don't bother to convert testDir to relative path. - } - - private boolean isExcluded() { - for (int i = 0; i < excludes.length; i++) { - if (relativeTestDir.startsWith(excludes[i])) { - TestUtil.logHarnessDebug( - "VehicleVerifier: This test dir is excluded from those listed in vehicle.properties."); - TestUtil.logHarnessDebug( - "VehicleVerifier: Please check your exclude list in the vehicle.properties file."); - return true; - } - } - return false; - } - - /** - * This method gets the current set of vehicles to be used for a given - * directory path. - * - * @return a String array of the vehicles that this test should be run in - */ - public String[] getVehicleSet() { - if (mapping == null || keys == null) { - return TestUtil.EMPTY_STRING_ARRAY; - } - if (isExcluded()) { - return TestUtil.EMPTY_STRING_ARRAY; - } - String[] result = ConfigUtil.getMappingValue(this.mapping, this.keys, - this.relativeTestDir); - return result; - } - - public static void main(String args[]) { - File testDir = null; - if (args.length == 0) { - testDir = new File(System.getProperty("user.dir")); - } else { - testDir = new File(args[0]); - } - VehicleVerifier ver = VehicleVerifier.getInstance(testDir); - String[] result = ver.getVehicleSet(); - System.out - .println(testDir.getPath() + " : " + Arrays.asList(result).toString()); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java b/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java deleted file mode 100644 index f63cc936b2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java +++ /dev/null @@ -1,111 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.util; - -import java.util.Vector; - -/** - * Implementation class of Log interface, to be used as a verification mechanism - * for connector tests. This class is implemented as a Singleton. The TS - * whitebox resource adapter writes the log, and the TS test reads the log. The - * whitebox will return an instance of this log to the calling test. - */ -public class ConnectorStatus implements Log { - - private static ConnectorStatus status = new ConnectorStatus(); - - private Vector log = new Vector(); - - private Vector statelog = new Vector(); - - private boolean logFlag = false; - - /** - * Singleton constructor - */ - private ConnectorStatus() { - } - - /** - * Singleton accessor - */ - public static ConnectorStatus getConnectorStatus() { - return status; - } - - // -------------------------- - // Log method implementations - // -------------------------- - - /** - * Adds elements to the log. This is called by the Resource Adapter. - * - */ - public void logAPI(String raAPI, String inParams, String outParams) { - String logString = new String(raAPI + ":" + inParams + ":" + outParams); - if (logFlag) - log.addElement(logString); - } - - /** - * Adds elements to the State log. This is called by the Resource Adapter. - * - */ - public void logState(String state) { - statelog.addElement(state); - } - - /** - * Purges the log store - */ - public void purge() { - log.clear(); - } - - /** - * Purges the log store - */ - public void purgeStateLog() { - statelog.clear(); - } - - /** - * Retrieves the entire log as a String - */ - public Vector getLogVector() { - return log; - } - - /** - * Retrieves the entire log as a String - */ - public Vector getStateLogVector() { - return statelog; - } - - /** - * Sets the logging to true/false - */ - public void setLogFlag(boolean b) { - logFlag = b; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java deleted file mode 100644 index bf82bdf2e3..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java +++ /dev/null @@ -1,1282 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.beans.PropertyDescriptor; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ApplicationServerInternalException; -import jakarta.resource.spi.CommException; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.InvalidPropertyException; -import jakarta.resource.spi.LocalTransaction; -import jakarta.resource.spi.LocalTransactionException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.ResourceAllocationException; -import jakarta.resource.spi.RetryableUnavailableException; -import jakarta.resource.spi.SharingViolationException; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.RetryableWorkRejectedException; -import jakarta.resource.spi.work.WorkCompletedException; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkRejectedException; - -/* - * This class is used to assist with testing API Assertions. - */ -public class APIAssertionTest { - - public APIAssertionTest() { - } - - public static void checkManagedConnectionAPI(ManagedConnection mcon) { - if (mcon == null) { - // should not get here - Debug.trace( - "Error - null MetaData passed into APIAssertionTest.checkMetaData()"); - } - - try { - PrintWriter p = mcon.getLogWriter(); - logAPIPass("ManagedConnection.getLogWriter() passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ManagedConnection.getLogWriter()"); - } - - try { - ManagedConnectionMetaData dd = mcon.getMetaData(); - logAPIPass("ManagedConnection.getMetaData() passed"); - } catch (ResourceException ex) { - // we could get this exception and still be considered passing - logAPIPass("ManagedConnection.getMetaData() passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ManagedConnection.getXAResource()"); - } - - try { - LocalTransaction lt = mcon.getLocalTransaction(); - logAPIPass("ManagedConnection.getLocalTransaction() passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ManagedConnection.getLocalTransaction()"); - } - } - - public static void checkMetaDataAPI(ManagedConnectionMetaData mdata) { - if (mdata == null) { - // should not get here - Debug.trace( - "Error - null MetaData passed into APIAssertionTest.checkMetaData()"); - } - logAPIPass("Connection.getMetaData() passed"); - - try { - String eisProdName = mdata.getEISProductName(); - logAPIPass("ManagedConnectionMetaData.getEISProductName() passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ManagedConnectionMetaData.getEISProductName()"); - } - - try { - String eisProdVer = mdata.getEISProductVersion(); - logAPIPass("ManagedConnectionMetaData.getEISProductVersion() passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ManagedConnectionMetaData.getEISProductVersion()"); - } - - try { - int maxCons = mdata.getMaxConnections(); - logAPIPass("ManagedConnectionMetaData.getMaxConnections() passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ManagedConnectionMetaData.getMaxConnections()"); - } - - try { - String userName = mdata.getUserName(); - logAPIPass("ManagedConnectionMetaData.getUserName() passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ManagedConnectionMetaData.getUserName()"); - } - } - - public void runTests() { - checkNotSupportedException(); - checkResourceException(); - checkLocalTransactionException(); - checkResourceAdapterInternalException(); - checkResourceAllocationException(); - checkSecurityException(); - checkSharingViolationException(); - checkUnavailableException(); - checkWorkException(); - checkWorkCompletedException(); - checkWorkRejectedException(); - checkEISSystemException(); - checkInvalidPropertyException(); - checkApplicationServerInternalException(); - checkCommException(); - checkIllegalStateException(); - checkRetryableUnavailableException(); - checkRetryableWorkRejectedException(); - checkHintsContext(); - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkHintsContext() { - - try { - HintsContext hc = new HintsContext(); - logAPIPass("HintsContext() passed"); - - hc.setName("hintName"); - String strname = hc.getName(); - if ((strname != null) && (strname.equalsIgnoreCase("hintName"))) { - logAPIPass("HintsContext.setName() and HintsContext.getName() passed."); - } - - hc.setDescription("hintDescription"); - String strDesc = hc.getDescription(); - if (strDesc != null) { - // may not be exactly same desc that was set - though it *should* be - logAPIPass( - "HintsContext.setDescription() and HintsContext.getDescription() passed."); - } - - hc.setHint(HintsContext.NAME_HINT, "someHintVal"); - Map m = hc.getHints(); - logAPIPass("HintsContext.setHints() and HintsContext.getHints() passed."); - - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(null)"); - } - - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkInvalidPropertyException() { - - try { - InvalidPropertyException ne = new InvalidPropertyException(); - throw ne; - } catch (InvalidPropertyException ex) { - logAPIPass("InvalidPropertyException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(null)"); - } - - try { - InvalidPropertyException ne = new InvalidPropertyException("message1"); - throw ne; - } catch (InvalidPropertyException ex) { - logAPIPass("InvalidPropertyException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(str)"); - } - - try { - InvalidPropertyException ne = new InvalidPropertyException("message1", - "ERRCODE1"); - throw ne; - } catch (InvalidPropertyException ex) { - logAPIPass("InvalidPropertyException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - InvalidPropertyException ne = new InvalidPropertyException(someThrowable); - throw ne; - } catch (InvalidPropertyException ex) { - logAPIPass("InvalidPropertyException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - InvalidPropertyException ne = new InvalidPropertyException("someString", - someThrowable); - throw ne; - } catch (InvalidPropertyException ex) { - logAPIPass("InvalidPropertyException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(str, throwable)"); - } - - try { - InvalidPropertyException ne = new InvalidPropertyException("message1"); - List beanProps = new ArrayList(); - beanProps.add(new PropertyDescriptor("destinationName", - LocalTxActivationSpec.class)); - beanProps.add(new PropertyDescriptor("destinationType", - LocalTxActivationSpec.class)); - PropertyDescriptor[] pd = (PropertyDescriptor[]) beanProps - .toArray(new PropertyDescriptor[beanProps.size()]); - ne.setInvalidPropertyDescriptors(pd); - Debug.trace("throwing setInvalidPropertyDescriptors(pd)"); - throw ne; - } catch (InvalidPropertyException ex) { - PropertyDescriptor[] pd = (PropertyDescriptor[]) ex - .getInvalidPropertyDescriptors(); - logAPIPass( - "InvalidPropertyException.setInvalidPropertyDescriptors() passed"); - logAPIPass( - "InvalidPropertyException.getInvalidPropertyDescriptors() passed"); - } catch (Exception ex) { - Debug.trace("Error verifying InvalidPropertyException(str)"); - ex.printStackTrace(); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkEISSystemException() { - - try { - EISSystemException ne = new EISSystemException(); - throw ne; - } catch (EISSystemException ex) { - logAPIPass("EISSystemException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying EISSystemException(null)"); - } - - try { - EISSystemException ne = new EISSystemException("message1"); - throw ne; - } catch (EISSystemException ex) { - logAPIPass("EISSystemException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying EISSystemException(str)"); - } - - try { - EISSystemException ne = new EISSystemException("message1", "ERRCODE1"); - throw ne; - } catch (EISSystemException ex) { - logAPIPass("EISSystemException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying EISSystemException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - EISSystemException ne = new EISSystemException(someThrowable); - throw ne; - } catch (EISSystemException ex) { - logAPIPass("EISSystemException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying EISSystemException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - EISSystemException ne = new EISSystemException("someString", - someThrowable); - throw ne; - } catch (EISSystemException ex) { - logAPIPass("EISSystemException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying EISSystemException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkIllegalStateException() { - - try { - jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException(); - throw ne; - } catch (jakarta.resource.spi.IllegalStateException ex) { - logAPIPass("IllegalStateException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying IllegalStateException(null)"); - } - - try { - jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException( - "message1"); - throw ne; - } catch (jakarta.resource.spi.IllegalStateException ex) { - logAPIPass("IllegalStateException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying IllegalStateException(str)"); - } - - try { - jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException( - "message1", "ERRCODE1"); - throw ne; - } catch (jakarta.resource.spi.IllegalStateException ex) { - logAPIPass("IllegalStateException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying IllegalStateException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException( - someThrowable); - throw ne; - } catch (jakarta.resource.spi.IllegalStateException ex) { - logAPIPass("IllegalStateException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying IllegalStateException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException( - "someString", someThrowable); - throw ne; - } catch (jakarta.resource.spi.IllegalStateException ex) { - logAPIPass("IllegalStateException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying IllegalStateException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkCommException() { - - try { - CommException ne = new CommException(); - throw ne; - } catch (CommException ex) { - logAPIPass("CommException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying CommException(null)"); - } - - try { - CommException ne = new CommException("message1"); - throw ne; - } catch (CommException ex) { - logAPIPass("CommException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying CommException(str)"); - } - - try { - CommException ne = new CommException("message1", "ERRCODE1"); - throw ne; - } catch (CommException ex) { - logAPIPass("CommException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying CommException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - CommException ne = new CommException(someThrowable); - throw ne; - } catch (CommException ex) { - logAPIPass("CommException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying CommException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - CommException ne = new CommException("someString", someThrowable); - throw ne; - } catch (CommException ex) { - logAPIPass("CommException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying CommException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkRetryableWorkRejectedException() { - - try { - RetryableWorkRejectedException ne = new RetryableWorkRejectedException(); - throw ne; - } catch (RetryableWorkRejectedException ex) { - logAPIPass("RetryableWorkRejectedException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableWorkRejectedException(null)"); - } - - try { - RetryableWorkRejectedException ne = new RetryableWorkRejectedException( - "message1"); - throw ne; - } catch (RetryableWorkRejectedException ex) { - logAPIPass("RetryableWorkRejectedException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableWorkRejectedException(str)"); - } - - try { - RetryableWorkRejectedException ne = new RetryableWorkRejectedException( - "message1", "ERRCODE1"); - throw ne; - } catch (RetryableWorkRejectedException ex) { - logAPIPass("RetryableWorkRejectedException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableWorkRejectedException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - RetryableWorkRejectedException ne = new RetryableWorkRejectedException( - someThrowable); - throw ne; - } catch (RetryableWorkRejectedException ex) { - logAPIPass("RetryableWorkRejectedException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableWorkRejectedException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - RetryableWorkRejectedException ne = new RetryableWorkRejectedException( - "someString", someThrowable); - throw ne; - } catch (RetryableWorkRejectedException ex) { - logAPIPass("RetryableWorkRejectedException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying RetryableWorkRejectedException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkRetryableUnavailableException() { - - try { - RetryableUnavailableException ne = new RetryableUnavailableException(); - throw ne; - } catch (RetryableUnavailableException ex) { - logAPIPass("RetryableUnavailableException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableUnavailableException(null)"); - } - - try { - RetryableUnavailableException ne = new RetryableUnavailableException( - "message1"); - throw ne; - } catch (RetryableUnavailableException ex) { - logAPIPass("RetryableUnavailableException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableUnavailableException(str)"); - } - - try { - RetryableUnavailableException ne = new RetryableUnavailableException( - "message1", "ERRCODE1"); - throw ne; - } catch (RetryableUnavailableException ex) { - logAPIPass("RetryableUnavailableException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableUnavailableException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - RetryableUnavailableException ne = new RetryableUnavailableException( - someThrowable); - throw ne; - } catch (RetryableUnavailableException ex) { - logAPIPass("RetryableUnavailableException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying RetryableUnavailableException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - RetryableUnavailableException ne = new RetryableUnavailableException( - "someString", someThrowable); - throw ne; - } catch (RetryableUnavailableException ex) { - logAPIPass("RetryableUnavailableException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying RetryableUnavailableException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkApplicationServerInternalException() { - - try { - ApplicationServerInternalException ne = new ApplicationServerInternalException(); - throw ne; - } catch (ApplicationServerInternalException ex) { - logAPIPass("ApplicationServerInternalException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ApplicationServerInternalException(null)"); - } - - try { - ApplicationServerInternalException ne = new ApplicationServerInternalException( - "message1"); - throw ne; - } catch (ApplicationServerInternalException ex) { - logAPIPass("ApplicationServerInternalException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ApplicationServerInternalException(str)"); - } - - try { - ApplicationServerInternalException ne = new ApplicationServerInternalException( - "message1", "ERRCODE1"); - throw ne; - } catch (ApplicationServerInternalException ex) { - logAPIPass("ApplicationServerInternalException(str, str) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ApplicationServerInternalException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - ApplicationServerInternalException ne = new ApplicationServerInternalException( - someThrowable); - throw ne; - } catch (ApplicationServerInternalException ex) { - logAPIPass("ApplicationServerInternalException(throwable) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ApplicationServerInternalException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - ApplicationServerInternalException ne = new ApplicationServerInternalException( - "someString", someThrowable); - throw ne; - } catch (ApplicationServerInternalException ex) { - logAPIPass("ApplicationServerInternalException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ApplicationServerInternalException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkWorkException() { - - try { - WorkException ne = new WorkException(); - throw ne; - } catch (WorkException ex) { - logAPIPass("WorkException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkException(null)"); - } - - try { - WorkException ne = new WorkException("message1"); - throw ne; - } catch (WorkException ex) { - logAPIPass("WorkException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkException(str)"); - } - - try { - WorkException ne = new WorkException("message1", "ERRCODE1"); - throw ne; - } catch (WorkException ex) { - logAPIPass("WorkException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkException ne = new WorkException(someThrowable); - throw ne; - } catch (WorkException ex) { - logAPIPass("WorkException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkException ne = new WorkException("someString", someThrowable); - throw ne; - } catch (WorkException ex) { - logAPIPass("WorkException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkWorkCompletedException() { - - try { - WorkCompletedException ne = new WorkCompletedException(); - throw ne; - } catch (WorkCompletedException ex) { - logAPIPass("WorkCompletedException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkCompletedException(null)"); - } - - try { - WorkCompletedException ne = new WorkCompletedException("message1"); - throw ne; - } catch (WorkCompletedException ex) { - logAPIPass("WorkCompletedException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkCompletedException(str)"); - } - - try { - WorkCompletedException ne = new WorkCompletedException("message1", - "ERRCODE1"); - throw ne; - } catch (WorkCompletedException ex) { - logAPIPass("WorkCompletedException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkCompletedException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkCompletedException ne = new WorkCompletedException(someThrowable); - throw ne; - } catch (WorkCompletedException ex) { - logAPIPass("WorkCompletedException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkCompletedException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkCompletedException ne = new WorkCompletedException("someString", - someThrowable); - throw ne; - } catch (WorkCompletedException ex) { - logAPIPass("WorkCompletedException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkCompletedException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkWorkRejectedException() { - - try { - WorkRejectedException ne = new WorkRejectedException(); - throw ne; - } catch (WorkRejectedException ex) { - logAPIPass("WorkRejectedException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkRejectedException(null)"); - } - - try { - WorkRejectedException ne = new WorkRejectedException("message1"); - throw ne; - } catch (WorkRejectedException ex) { - logAPIPass("WorkRejectedException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkRejectedException(str)"); - } - - try { - WorkRejectedException ne = new WorkRejectedException("message1", - "ERRCODE1"); - throw ne; - } catch (WorkRejectedException ex) { - logAPIPass("WorkRejectedException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkRejectedException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkRejectedException ne = new WorkRejectedException(someThrowable); - throw ne; - } catch (WorkRejectedException ex) { - logAPIPass("WorkRejectedException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkRejectedException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - WorkRejectedException ne = new WorkRejectedException("someString", - someThrowable); - throw ne; - } catch (WorkRejectedException ex) { - logAPIPass("WorkRejectedException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying WorkRejectedException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkUnavailableException() { - - try { - UnavailableException ne = new UnavailableException(); - throw ne; - } catch (UnavailableException ex) { - logAPIPass("UnavailableException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying UnavailableException(null)"); - } - - try { - UnavailableException ne = new UnavailableException("message1"); - throw ne; - } catch (UnavailableException ex) { - logAPIPass("UnavailableException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying UnavailableException(str)"); - } - - try { - UnavailableException ne = new UnavailableException("message1", - "ERRCODE1"); - throw ne; - } catch (UnavailableException ex) { - logAPIPass("UnavailableException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying UnavailableException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - UnavailableException ne = new UnavailableException(someThrowable); - throw ne; - } catch (UnavailableException ex) { - logAPIPass("UnavailableException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying UnavailableException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - UnavailableException ne = new UnavailableException("someString", - someThrowable); - throw ne; - } catch (UnavailableException ex) { - logAPIPass("UnavailableException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying UnavailableException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkSharingViolationException() { - - try { - SharingViolationException ne = new SharingViolationException(); - throw ne; - } catch (SharingViolationException ex) { - logAPIPass("SharingViolationException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SharingViolationException(null)"); - } - - try { - SharingViolationException ne = new SharingViolationException("message1"); - throw ne; - } catch (SharingViolationException ex) { - logAPIPass("SharingViolationException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SharingViolationException(str)"); - } - - try { - SharingViolationException ne = new SharingViolationException("message1", - "ERRCODE1"); - throw ne; - } catch (SharingViolationException ex) { - logAPIPass("SharingViolationException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SharingViolationException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - SharingViolationException ne = new SharingViolationException( - someThrowable); - throw ne; - } catch (SharingViolationException ex) { - logAPIPass("SharingViolationException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SharingViolationException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - SharingViolationException ne = new SharingViolationException("someString", - someThrowable); - throw ne; - } catch (SharingViolationException ex) { - logAPIPass("SharingViolationException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SharingViolationException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkSecurityException() { - - try { - jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException(); - throw ne; - } catch (jakarta.resource.spi.SecurityException ex) { - logAPIPass("SecurityException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SecurityException(null)"); - } - - try { - jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException( - "message1"); - throw ne; - } catch (jakarta.resource.spi.SecurityException ex) { - logAPIPass("SecurityException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SecurityException(str)"); - } - - try { - jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException( - "message1", "ERRCODE1"); - throw ne; - } catch (jakarta.resource.spi.SecurityException ex) { - logAPIPass("SecurityException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SecurityException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException( - someThrowable); - throw ne; - } catch (jakarta.resource.spi.SecurityException ex) { - logAPIPass("SecurityException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SecurityException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException( - "someString", someThrowable); - throw ne; - } catch (jakarta.resource.spi.SecurityException ex) { - logAPIPass("SecurityException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying SecurityException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkResourceAllocationException() { - - try { - ResourceAllocationException ne = new ResourceAllocationException(); - throw ne; - } catch (ResourceAllocationException ex) { - logAPIPass("ResourceAllocationException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAllocationException(null)"); - } - - try { - ResourceAllocationException ne = new ResourceAllocationException( - "message1"); - throw ne; - } catch (ResourceAllocationException ex) { - logAPIPass("ResourceAllocationException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAllocationException(str)"); - } - - try { - ResourceAllocationException ne = new ResourceAllocationException( - "message1", "ERRCODE1"); - throw ne; - } catch (ResourceAllocationException ex) { - logAPIPass("ResourceAllocationException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAllocationException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceAllocationException ne = new ResourceAllocationException( - someThrowable); - throw ne; - } catch (ResourceAllocationException ex) { - logAPIPass("ResourceAllocationException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAllocationException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceAllocationException ne = new ResourceAllocationException( - "someString", someThrowable); - throw ne; - } catch (ResourceAllocationException ex) { - logAPIPass("ResourceAllocationException(str, throwable) passed"); - } catch (Exception ex) { - Debug - .trace("Error verifying ResourceAllocationException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkResourceAdapterInternalException() { - - try { - ResourceAdapterInternalException ne = new ResourceAdapterInternalException(); - throw ne; - } catch (ResourceAdapterInternalException ex) { - logAPIPass("ResourceAdapterInternalException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAdapterInternalException(null)"); - } - - try { - ResourceAdapterInternalException ne = new ResourceAdapterInternalException( - "message1"); - throw ne; - } catch (ResourceAdapterInternalException ex) { - logAPIPass("ResourceAdapterInternalException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAdapterInternalException(str)"); - } - - try { - ResourceAdapterInternalException ne = new ResourceAdapterInternalException( - "message1", "ERRCODE1"); - throw ne; - } catch (ResourceAdapterInternalException ex) { - logAPIPass("ResourceAdapterInternalException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceAdapterInternalException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceAdapterInternalException ne = new ResourceAdapterInternalException( - someThrowable); - throw ne; - } catch (ResourceAdapterInternalException ex) { - logAPIPass("ResourceAdapterInternalException(throwable) passed"); - } catch (Exception ex) { - Debug - .trace("Error verifying ResourceAdapterInternalException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceAdapterInternalException ne = new ResourceAdapterInternalException( - "someString", someThrowable); - throw ne; - } catch (ResourceAdapterInternalException ex) { - logAPIPass("ResourceAdapterInternalException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace( - "Error verifying ResourceAdapterInternalException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: - * - * - */ - private void checkLocalTransactionException() { - - try { - LocalTransactionException ne = new LocalTransactionException(); - throw ne; - } catch (LocalTransactionException ex) { - logAPIPass("LocalTransactionException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying LocalTransactionException(null)"); - } - - try { - LocalTransactionException ne = new LocalTransactionException("message1"); - throw ne; - } catch (LocalTransactionException ex) { - logAPIPass("LocalTransactionException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying LocalTransactionException(str)"); - } - - try { - LocalTransactionException ne = new LocalTransactionException("message1", - "ERRCODE1"); - throw ne; - } catch (LocalTransactionException ex) { - logAPIPass("LocalTransactionException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying LocalTransactionException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - LocalTransactionException ne = new LocalTransactionException( - someThrowable); - throw ne; - } catch (LocalTransactionException ex) { - logAPIPass("LocalTransactionException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying LocalTransactionException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - LocalTransactionException ne = new LocalTransactionException("someString", - someThrowable); - throw ne; - } catch (LocalTransactionException ex) { - logAPIPass("LocalTransactionException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying LocalTransactionException(str, throwable)"); - } - } - - /* - * used to assist with verifying assertions: Connector:JAVADOC:1, - * Connector:JAVADOC:2, Connector:JAVADOC:3, Connector:JAVADOC:4, - * Connector:JAVADOC:5 - */ - private void checkNotSupportedException() { - - try { - NotSupportedException ne = new NotSupportedException(); - throw ne; - } catch (NotSupportedException ex) { - logAPIPass("NotSupportedException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying NotSupportedException(null)"); - } - - try { - NotSupportedException ne = new NotSupportedException("message1"); - throw ne; - } catch (NotSupportedException ex) { - logAPIPass("NotSupportedException(str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying NotSupportedException(str)"); - } - - try { - NotSupportedException ne = new NotSupportedException("message1", - "ERRCODE1"); - throw ne; - } catch (NotSupportedException ex) { - logAPIPass("NotSupportedException(str, str) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying NotSupportedException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - NotSupportedException ne = new NotSupportedException(someThrowable); - throw ne; - } catch (NotSupportedException ex) { - logAPIPass("NotSupportedException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying NotSupportedException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - NotSupportedException ne = new NotSupportedException("someString", - someThrowable); - throw ne; - } catch (NotSupportedException ex) { - logAPIPass("NotSupportedException(str, throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying NotSupportedException(str, throwable)"); - } - } - - /* - * used to assist with testing api assertions: Connector:JAVADOC:7, - * Connector:JAVADOC:9, Connector:JAVADOC:10, Connector:JAVADOC:11, - * Connector:JAVADOC:12, Connector:JAVADOC:13, Connector:JAVADOC:14, - * Connector:JAVADOC:15 - */ - private void checkResourceException() { - - try { - ResourceException ne = new ResourceException(); - throw ne; - } catch (ResourceException ex) { - logAPIPass("ResourceException(null) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceException(null)"); - } - - try { - ResourceException ne = new ResourceException("message1"); - ne.setErrorCode("ERRCODE2"); - throw ne; - } catch (ResourceException ex) { - logAPIPass("ResourceException(str) passed"); - if ((ex.getErrorCode() != null)) { - String str = ex.getErrorCode().toUpperCase(); - if (str.indexOf("ERRCODE2") != -1) { - logAPIPass("ResourceException.setErrorCode(str) passed"); - } - } else { - Debug.trace("Error verifying ResourceException(str, str)"); - } - - } catch (Exception ex) { - Debug.trace("Error verifying ResourceException(str)"); - } - - try { - ResourceException ne = new ResourceException("message1", "ERRCODE1"); - throw ne; - } catch (ResourceException ex) { - logAPIPass("ResourceException(str, str) passed"); - if ((ex.getErrorCode() != null)) { - String str = ex.getErrorCode().toUpperCase(); - if (str.indexOf("ERRCODE1") != -1) { - logAPIPass("ResourceException.getErrorCode() passed"); - } - } else { - Debug.trace("Error verifying ResourceException(str, str)"); - } - } catch (Exception ex) { - Debug.trace("Error verifying ResourceException(str, str)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceException ne = new ResourceException(someThrowable); - throw ne; - } catch (ResourceException ex) { - logAPIPass("ResourceException(throwable) passed"); - } catch (Exception ex) { - Debug.trace("Error verifying ResourceException(throwable)"); - } - - try { - Exception someThrowable = new Exception("test"); - ResourceException ne = new ResourceException("someString", someThrowable); - throw ne; - } catch (ResourceException ex) { - logAPIPass("ResourceException(str, someThrowable) passed"); - if (ex.getMessage() != null) { - logAPIPass("ResourceException.getMessage() passed"); - } else { - Debug.trace("Error verifying ResourceException(str, someThrowable)"); - } - - } catch (Exception ex) { - Debug.trace("Error verifying ResourceException(str, throwable)"); - } - } - - private static void logAPIPass(String outStr) { - ConnectorStatus.getConnectorStatus().logState(outStr); - Debug.trace(outStr); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java deleted file mode 100755 index 39e25497ae..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.ArrayList; -import java.util.List; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkContext; -import jakarta.resource.spi.work.WorkContextProvider; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -/* - * this class is used to help facilitate the testing of both nested - * work objects/instances as well as nested (work) contexts. In - * order to properly use this class to test nested work and contexts, - * you should create an instance of this class, add a context to it - * by using the addWorkContext() method, then add a NestedWork - * instance to it - where the NestedWork instance will need to - * have its own context assigned to it BEFOR it gets added into - * this class. - * - */ -public class ContextWork implements Work, WorkContextProvider { - - private List contextsList = new ArrayList(); - - private WorkManager wm; - - private NestWork nw = null; - - private String name = "ContextWork.name"; - - private String description = "ContextWork.description"; - - public ContextWork(WorkManager wm) { - this.wm = wm; - Debug.trace("WorkImpl.constructor"); - } - - public void addNestedWork(NestWork val) { - nw = val; - } - - public NestWork getNestWork() { - return nw; - } - - public WorkManager getWorkManager() { - return wm; - } - - @Override - public List getWorkContexts() { - return contextsList; - } - - public void setWorkContexts(List val) { - contextsList = val; - } - - public void addWorkContext(WorkContext ic) { - contextsList.add(ic); - } - - @Override - public void release() { - Debug.trace("WorkImpl.release"); - } - - public String getName() { - return name; - } - - public String getDescription() { - return description; - } - - public void run() { - try { - Debug.trace("ContextWork.run"); - if (nw != null) { - wm.doWork(nw); - } - - // we expect nw to be executed with no SIC and thus an unauthenticated - // user...but what the work manager chooses to do with that is not - // defined. - Debug.trace( - "ContextWork.run: just executed wm.doWork(nw) where nw has no SIC"); - if ((nw != null) && (nw.hasContextEntry())) { - String str = "(ContextWork) "; - str += "It appears that Security context is being inherited from parent SIC."; - Debug.trace(str); - } - - } catch (WorkException we) { - Debug.trace( - "ContextWork.run: got WorkException - which is fine since child had no SIC"); - if ((nw != null) && (!nw.hasContextEntry())) { - // excellant - this is what we expected (for Connector:SPEC:305) - // this verifies that nw did not inherit the SIC from - // this (ie its parent) work class. - String str = "Security Context info not inherited from parent Work"; - ConnectorStatus.getConnectorStatus().logState(str); - Debug.trace(str); - } else if ((nw != null) && (nw.hasContextEntry())) { - // this verified Connector:SPEC:210 becaue we should have - // a SIC with invalid creds that could not be authenticated - String str = "Security Context info had invalid creds."; - ConnectorStatus.getConnectorStatus().logState(str); - Debug.trace(str); - } - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java deleted file mode 100644 index e0c99eb381..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -/* - * This class is used to assist with testing of work context notifications - * and the calling order. There is a static counter in this class that will - * get incremented everytime someone creates an instance of this class. - * The idea is to print the call order out during notifications of work - * context releated calls of: workAccepted(), workStarted(), workCompleted(), - * and contextSetupComplete(). - * - * This class should NOT be used by other tests as it could throw the - * count off. So unless you are sure you know what you're doing, refrain - * from using this class. - * - * @see com.sun.ts.tests.com.sun.common.connector.whitebox.WorkListenerImpl2 - * @see com.sun.ts.tests.com.sun.common.connector.whitebox.TSSICWithListener - * - */ -public class Counter { - - public enum Action { - INCREMENT, DECREMENT, DO_NOTHING - }; - - private static int count = 0; - - private static Action action = Action.DO_NOTHING; - - public Counter() { - } - - /* - * We are forcing the users to explicitly indicate if they want to increment, - * decrement, or do nothing. The reasoning is to ensure that the user knows - * exactly what they are doing when using this class/method. - * - * Since the primary use of this class/method is to record the current count - * (usually during a work context notification call) we expect the users to - * call this as: getCount(Counter.INCREMENT) so that the count is incremented - * each time its called/used. The other Action types are only there for - * completeness but no current use of them is expected. - * - */ - public int getCount(Action val) { - - Counter.action = val; - - if (action == Action.INCREMENT) { - count++; - } else if (action == Action.DECREMENT) { - // this is allowed - but not likely so offer caution - debug( - "CAUTION: user invoked Counter(Action.DECREMENT) - verify this is correct."); - count--; - } else if (action == Action.DO_NOTHING) { - // this is allowed - but not likely so offer caution - debug( - "CAUTION: user invoked Counter(Action.NOTHING) - verify this is correct."); - } - - return count; - } - - public void setCount(int val) { - count = val; - } - - public int increment() { - return count++; - } - - public int decrement() { - return count--; - } - - public static void resetCount() { - count = 0; - action = Action.DO_NOTHING; - } - - private void debug(String str) { - Debug.trace(str); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java deleted file mode 100644 index 0785c3ecfa..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)DataElement.java 1.0 06/06/02 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.Xid; - -/** - * A DataElement in the Enterprise Information System(TSeis). - * - * @version 1.0, 06/06/02 - * @author Binod P.G - */ -public class DataElement { - - /** Status indicating that the DataElement object is committed **/ - static final int COMMITTED = 1; - - /** Status indicating that the DataElement object prepared for 2PC **/ - static final int PREPARED = 2; - - /** Status indicating that the DataElement object is deleted **/ - static final int DELETED = 3; - - /** - * Status indicating that the DataElement object is in the uncommitted state - **/ - static final int INSERTED = 4; - - /** - * Status indicating that the DataElement object is in the uncommitted state - **/ - static final int UPDATED = 5; - - /** Current status of DataElement **/ - private int status; - - /** Key of this DataElement **/ - private String key; - - /** Actual Data of this DataElement **/ - private String data; - - /** Prepared Data of this DataElement **/ - private DataElement preparedData; - - /** Xid used to prepare this element **/ - private Xid xid; - - /** Version of this DataElement **/ - private int version; - - /** - * If key and value is inserted, this constructor will be used to construct - * the DataElement object. - * - * @param key - * Key of the DataElement object. - * @param data - * Value of the DataElement object. - */ - public DataElement(String key, String data) { - this.key = key; - this.data = data; - version = 1; - } - - /** - * If only key is inserted, this constructor will be used to construct the - * DataElement object. - * - * @param key - * Key of the DataElement object. - */ - public DataElement(String key) { - this.key = key; - version = 1; - } - - /** - * Sets the status of the object to the value provided. - * - * @param status - * Status to be set. - */ - public void setStatus(int status) { - this.status = status; - } - - /** - * Get the status of the element. - * - * @return Current status of the DataElement object. - */ - public int getStatus() { - return status; - } - - /** - * Get the key of the DataElement object. - * - * @retrun Key of the DataElement object. - */ - public String getKey() { - return key; - } - - /** - * Get the data in the DataElement object. - * - * @retrun Value of the DataElement object. - */ - public String getValue() { - return data; - } - - /** - * Set the value of DataElement object. - * - * @param value - * Value. - */ - public void setValue(String value) { - this.data = value; - } - - /** - * Prepare the value for 2PC commit. - * - * @param value - * Value to be prepared. - */ - public void prepare(DataElement value, Xid xid) { - this.preparedData = value; - this.xid = xid; - this.status = PREPARED; - } - - /** - * Get the prepared data in the DataElement object. - * - * @retrun Prepared of the DataElement object. - */ - public DataElement getPreparedValue() { - return preparedData; - } - - /** - * Get the version of the data. - * - * @return version. - */ - public int getVersion() { - return version; - } - - /** - * Updates the version of the element. - */ - public void updateVersion() { - version++; - } - - /** - * Get the xid used to do the prepare. - * - * @return Xid. - */ - public Xid getXid() { - return xid; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java deleted file mode 100644 index cdd9edb748..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import com.sun.ts.lib.util.TestUtil; - -public class Debug { - - private static String debuggingProp = null; - - private static boolean bDebug = true; // debugging on by default - - private static int iDebugLevel = 0; // no debugging by default - - /** - * Constructor - */ - public Debug(String str) { - debuggingProp = TestUtil.getSystemProperty(str); - if ((debuggingProp != null) && (debuggingProp.equals("ON"))) { - setDebugStatus(true); // turn tracing on - trace("Debugging enabled"); - } else if ((debuggingProp != null) && (debuggingProp.equals("OFF"))) { - trace("Debugging messages being disabled"); - setDebugStatus(false); - } - } - - public static void trace(String str) { - if (getDebugStatus()) { - // debugging is enabled so print info out - System.out.println(str); - } - } - - /** - * This is used to turn debugging off or on. This is off by default and must - * be explicitly set to true in order to turn on debugging. - * - * @param bVal: - * True means turn debugging on. - */ - public static void setDebugStatus(boolean bVal) { - bDebug = bVal; - } - - /* - * This is a convenience method used to test if we are running in debug mode. - * If so, we will print the strack trace. If not, we do nothing. - * - * @exception none. - * - * @param none - * - * @version 1.32 07/31/00 - * - * @return void - */ - public static void printDebugStack(Exception ex) { - if (getDebugStatus() == true) { - ex.printStackTrace(); - } - } - - /** - * This gets the status of the debugging functionality. false means that - * debugging is disabled, true means it is enabled. - * - * @return boolean: True means turn debugging on. - */ - public static boolean getDebugStatus() { - return bDebug; - } - - /** - * This gets the current level of debugging we are using. - * - * @return int: 0=none, 1=errors, 2=errors+warnings, 3=all - */ - - public static int getDebugLevel() { - return iDebugLevel; - } - - /** - * This sets the current level of debugging we are using. - * - * @param val: - * 0=none, 1=errors, 2=errors+warnings, 3=all - * @return none. - */ - public static void setDebugLevel(int val) { - iDebugLevel = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java deleted file mode 100644 index bac10eb29c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.LocalTransaction; - -public class LocalTransactionImpl implements LocalTransaction { - - private TSManagedConnection mc; - - /* - * @name LocalTransactionImpl - * - * @desc LocalTransactionImpl constructor - * - * @param TSManagedConnection - */ - public LocalTransactionImpl(TSManagedConnection mc) { - this.mc = mc; - } - - /* - * @name begin - * - * @desc sends the event that local transaction has started - * - * @exception ResourceException - * - */ - @Override - public void begin() throws ResourceException { - try { - TSConnection con = mc.getTSConnection(); - ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.begin", "", - ""); - con.setAutoCommit(false); - System.out.println("LocalTransaction.begin"); - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name commit - * - * @desc Sends an event that local transaction has been commited. - * - * @exception ResourceException - */ - @Override - public void commit() throws ResourceException { - TSConnection con = null; - try { - con = mc.getTSConnection(); - ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.commit", "", - ""); - System.out.println("LocalTransaction.commit"); - con.commit(); - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } finally { - try { - if (con != null) { - con.setAutoCommit(true); - } - } catch (Exception ex) { - ex.getMessage(); - } - } - } - - /* - * @name rollback - * - * @desc Sends an event to rollback the transaction - * - * @exception ResourceException - */ - @Override - public void rollback() throws ResourceException { - TSConnection con = null; - try { - con = mc.getTSConnection(); - ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.rollback", - "", ""); - con.rollback(); - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } finally { - try { - if (con != null) { - con.setAutoCommit(true); - } - } catch (Exception ex) { - } - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java deleted file mode 100644 index 74adea7232..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.ResourceAdapter; - -public class LocalTxActivationSpec - implements ActivationSpec, java.io.Serializable { - - private String destinationName; - - private String destinationType; - - private ResourceAdapter resourceAdapter; - - private int counter = 0; - - /** - * Default constructor. - */ - public LocalTxActivationSpec() { - - } - - public String getDestinationName() { - System.out.println( - "LocalTxActivationSpec.getDestinationName :" + this.destinationName); - return this.destinationName; - } - - public void setDestinationName(String name) { - this.destinationName = name; - System.out.println("LocalTxActivationSpec.setDestinationName :" + name); - } - - public String getDestinationType() { - System.out.println( - "LocalTxActivationSpec.getDestinationType :" + this.destinationType); - return this.destinationType; - } - - public void setDestinationType(String type) { - System.out.println("LocalTxActivationSpec.setDestinationType :" + type); - this.destinationType = type; - } - - @Override - public ResourceAdapter getResourceAdapter() { - return this.resourceAdapter; - } - - @Override - public void setResourceAdapter(ResourceAdapter ra) { - counter++; - ConnectorStatus.getConnectorStatus() - .logState("LocalTxActivationSpec setResourceAdapter " + counter); - System.out.println("LocalTxActivationSpec.setResourceAdatper called"); - this.resourceAdapter = ra; - } - - @Override - public void validate() { - throw new UnsupportedOperationException(); - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java deleted file mode 100644 index dc5bf3faf5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -@SuppressWarnings("unused") -public class LocalTxManagedConnectionFactory - implements ManagedConnectionFactory, ResourceAdapterAssociation, - Serializable, jakarta.resource.Referenceable { - - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String password; - - private String user; - - private String userName; - - private String TSRValue; - - /* - * @name LocalTxManagedConnectionFactory - * - * @desc Default conctructor - */ - public LocalTxManagedConnectionFactory() { - } - - public String getUser() { - return user; - } - - public void setUser(String val) { - user = val; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String val) { - userName = val; - } - - public String getPassword() { - return password; - } - - public void setPassword(String val) { - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - - @Override - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "LocalTxManagedConnectionFactory.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - - @Override - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "LocalTxManagedConnectionFactory.createConnectionFactory", "", - "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - @Override - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "LocalTxManagedConnectionFactory setResourceAdapter " - + count; - System.out.println(newStr1); - ConnectorStatus.getConnectorStatus().logState(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - @Override - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - @Override - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "LocalTxManagedConnectionFactory.createManagedConnection", - "subject|info", "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - System.out.println( - "LocalTxManagedConnectionFactory.createManagedConnection(): pc == null"); - System.out.println("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - System.out.println( - "LocalTxManagedConnectionFactory.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - System.out.println( - "LocalTxManagedConnectionFactory.createManagedConnection() with pc.getUserName()=" - + pc.getUserName() + " pc.getPassword()=" - + new String(pc.getPassword())); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - TSManagedConnection tcon = new TSManagedConnection(this, pc, null, con, - false, true); - - // just send some info to the log to assist with API assertion checks - APIAssertionTest.checkMetaDataAPI(tcon.getMetaData()); - APIAssertionTest.checkManagedConnectionAPI(tcon); - return tcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - @Override - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "LocalTxManagedConnectionFactory.matchManagedConnection", - "connectionSet|subject|info", "TSEISDataSource"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - @Override - public void setLogWriter(PrintWriter out) throws ResourceException { - ConnectorStatus.getConnectorStatus() - .logAPI("LocalTxManagedConnectionFactory.setLogWriter", "out", ""); - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - @Override - public PrintWriter getLogWriter() throws ResourceException { - ConnectorStatus.getConnectorStatus() - .logAPI("LocalTxManagedConnectionFactory.getLogWriter", "", ""); - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - @Override - public boolean equals(Object obj) { - if ((obj == null) || !(obj instanceof LocalTxManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - LocalTxManagedConnectionFactory that = (LocalTxManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.TSRValue, that.getTSRValue())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - - @Override - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - @Override - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - @Override - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void setTSRValue(String name) { - this.TSRValue = name; - } - - public String getTSRValue() { - return TSRValue; - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java deleted file mode 100644 index 4bfe93d4fd..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.XAException; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.XATerminator; -import jakarta.resource.spi.work.WorkEvent; -import jakarta.resource.spi.work.WorkListener; - -public class LocalTxMessageListener implements WorkListener { - - private XidImpl xid; - - private BootstrapContext bsc; - - public LocalTxMessageListener(XidImpl xid, BootstrapContext bsc) { - this.xid = xid; - this.bsc = bsc; - } - - @Override - public void workAccepted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxMessageListener.workAccepted"); - System.out.println("LocalTxMessageListener.workAccepted"); - } - - @Override - public void workRejected(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxMessageListener.workRejected"); - System.out.println("LocalTxMessageListener.workRejected"); - } - - @Override - public void workStarted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxMessageListener.workStarted"); - System.out.println("LocalTxMessageListener.workStarted"); - } - - @Override - public void workCompleted(WorkEvent e) { - try { - XATerminator xt = bsc.getXATerminator(); - xt.commit(this.xid, true); - System.out.println("LocalTxMessageListener.workCompleted"); - System.out.println( - "XID getting used in XATerminator [ " + xid.getFormatId() + " ]"); - ConnectorStatus.getConnectorStatus() - .logState("LocalTxMessageListener committed Xid"); - } catch (XAException ex) { - ex.printStackTrace(); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java deleted file mode 100644 index 5bf5a676d8..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java +++ /dev/null @@ -1,325 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkContext; -import jakarta.resource.spi.work.WorkContextProvider; - -public class LocalTxMessageWork implements Work, WorkContextProvider { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource( - "LocalTxMessageXAResource"); - - private MessageEndpoint ep2; - - private List contextsList = new ArrayList(); - - private BootstrapContext ctx = null; - - /* - * XXXX private WorkManager wm = null; private XATerminator xa; private String - * sicUser = ""; // this should correspond to ts.jte's 'user' property private - * String sicPwd = ""; // this should correspond to ts.jte's 'password' - * property private String eisUser = ""; // this should correspond to ts.jte's - * 'user1' property private String eisPwd = ""; // this should correspond to - * ts.jte's 'password' property - */ - private final String SICFAIL = "mdb not executed with proper SIC principal"; - - private final String SICPASS = "mdb executed with proper SIC principal"; - - public LocalTxMessageWork(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - - /* - * XXXX this.sicUser = System.getProperty("j2eelogin.name"); this.sicPwd = - * System.getProperty("j2eelogin.password"); this.eisUser = - * System.getProperty("eislogin.name"); this.eisPwd = - * System.getProperty("eislogin.password"); - */ - debug("LocalTxMessageWork.constructor"); - } - - public void setBootstrapContext(BootstrapContext bsc) { - this.ctx = bsc; - /* - * XXXX this.wm = bsc.getWorkManager(); this.xa = ctx.getXATerminator(); - */ - } - - /* - * This is a privaet convenience method that is use for sending a message that - * contains some role information to the mdb. The mdb will be looking for a - * msg that begins with the string "ROLE". Once the mdb encounters this msg, - * it will perform a specific test and then send back a response to us via a - * AppException that we will want to log. This method is used to assist with - * checking assertions Connector:SPEC:232 and Connector:SPEC:233. (This is - * used in conjunction with connector/mdb/MessageBean.java) - */ - private void doSICMsgCheck(MessageEndpoint ep, Method onMessage) { - - try { - - ep.beforeDelivery(onMessage); - String message = "ROLE: ADM"; - - ((TSMessageListenerInterface) ep).onMessage(message); - } catch (AppException ex) { - String str = ex.getMessage(); - debug("str = " + str); - if ((str != null) && (str.equals("MDB-SIC SUCCESS"))) { - debug(SICPASS); - ConnectorStatus.getConnectorStatus().logState(SICPASS); - } else { - debug( - "MDB-SIC FAILED due to AppException with msg: " + ex.getMessage()); - debug(SICFAIL); - ex.printStackTrace(); - ConnectorStatus.getConnectorStatus().logState(SICFAIL); - } - } catch (Exception e) { - // problem if here - we had some problem with msg exchange with MDB. - debug("MDB-SIC FAILED due to Exception with msg: " + e.getMessage()); - debug(SICFAIL); - e.printStackTrace(); - ConnectorStatus.getConnectorStatus().logState(SICFAIL); - } finally { - try { - ep.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - } - - public void run() { - - while (!stop) { - try { - debug("Inside the LocalTxMessageWork run "); - // Createing ep and ep1 for comparison - - MessageEndpoint ep = factory.createEndpoint(null); - MessageEndpoint ep1 = factory.createEndpoint(null); - - ep2 = factory.createEndpoint(null); - // creating xaep to check if the message delivery is transacted. - MessageEndpoint xaep = factory.createEndpoint(msgxa); - - if ((ep != null) && (!ep.equals(ep1))) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTx Unique MessageEndpoint returned"); - } - - chkMessageEndpointImpl(ep); - - Method onMessage = getOnMessageMethod(); - ep.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep).onMessage("LocalTx Message To MDB"); - ep.afterDelivery(); - ConnectorStatus.getConnectorStatus().logState("LocalTx Message To MDB"); - - doSICMsgCheck(ep, onMessage); - - Method onMessagexa = getOnMessageMethod(); - xaep.beforeDelivery(onMessagexa); - ((TSMessageListenerInterface) xaep) - .onMessage("LocalTx Non Transacted Message To MDB1"); - xaep.afterDelivery(); - - ConnectorStatus.getConnectorStatus() - .logState("LocalTx Non Transacted Message To MDB1"); - - System.out.println("Calling sysExp()"); - - callSysExp(); - callAppExp(); - - boolean de = factory.isDeliveryTransacted(onMessagexa); - - if (!de) { - System.out.println("MDB1 delivery is not transacted"); - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB1 delivery is not transacted"); - } - - break; - } catch (AppException ex) { - - ex.printStackTrace(); - } catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (NoSuchMethodException nse) { - nse.printStackTrace(); - } catch (ResourceException re) { - re.printStackTrace(); - } - - } - - } - - public void callSysExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw EJBException from NotSupported"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (NoSuchMethodException e) { - debug("LocalTxMessageWork: NoSuchMethodException"); - e.getMessage(); - e.printStackTrace(); - } catch (UnavailableException e) { - debug("LocalTxMessageWork: UnavailableException"); - e.printStackTrace(); - } catch (ResourceException re) { - debug("LocalTxMessageWork: ResourceException"); - re.printStackTrace(); - } catch (AppException ae) { - debug("LocalTxMessageWork: AppException"); - ae.printStackTrace(); - } catch (Exception e) { - // if we are in here, we assume our exception is expected and is of type - // ejb - // but it could also be from a non-ejb POJO - thus we use this Exception - // type. - debug("EJBException thrown by NotSupported MDB"); - ConnectorStatus.getConnectorStatus() - .logState("EJBException thrown by NotSupported"); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - - } - - public void callAppExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw AppException from NotSupported"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (AppException ejbe) { - debug("AppException thrown by NotSupported MDB"); - ConnectorStatus.getConnectorStatus() - .logState("AppException thrown by NotSupported"); - } catch (NoSuchMethodException ns) { - ns.printStackTrace(); - } catch (ResourceException re) { - re.printStackTrace(); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - private void chkMessageEndpointImpl(MessageEndpoint ep) { - if (ep instanceof MessageEndpoint - && ep instanceof TSMessageListenerInterface) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MessageEndpoint interface implemented"); - ConnectorStatus.getConnectorStatus() - .logState("LocalTx TSMessageListener interface implemented"); - } else { - ConnectorStatus.getConnectorStatus().logState( - "MessageEndpoint and TSMessageListenerInterface not implemented"); - } - } - - @Override - public List getWorkContexts() { - return contextsList; - } - - public void addWorkContext(WorkContext ic) { - contextsList.add(ic); - } - - @Override - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - - private void debug(String val) { - Debug.trace(val); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java deleted file mode 100644 index 27f02fb209..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java +++ /dev/null @@ -1,205 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.lang.reflect.Method; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; - -public class LocalTxMessageWork1 implements Work { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource( - "LocalTxMessageXAResource1"); - - private MessageEndpoint xaep; - - private MessageEndpoint ep2; - - public LocalTxMessageWork1(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - System.out.println("LocalTxMessageWork1.constructor"); - - } - - public void run() { - - while (!stop) { - try { - System.out.println("Inside the LocalTxMessageWork1 run "); - // creating xaep to check if the message delivery is transacted. - xaep = factory.createEndpoint(msgxa); - - ep2 = factory.createEndpoint(null); - - Method onMessagexa = getOnMessageMethod(); - xaep.beforeDelivery(onMessagexa); - ((TSMessageListenerInterface) xaep) - .onMessage("LocalTx MDB2 Transacted Message To MDB"); - xaep.afterDelivery(); - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB2 Transacted Message To MDB"); - - callSysExp(); - callAppExp(); - - System.out.println("LocalTx MDB2 Transacted Message To MDB"); - - boolean de = factory.isDeliveryTransacted(onMessagexa); - - if (de) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB2 delivery is transacted"); - System.out.println("LocalTx MDB2 delivery is transacted"); - } - break; - } catch (AppException ex) { - ex.printStackTrace(); - } - - catch (NoSuchMethodException e) { - e.printStackTrace(); - } - - catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (ResourceException re) { - re.printStackTrace(); - } - - } - - } - - public void callSysExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw EJBException from Required"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (NoSuchMethodException e) { - System.out.println("LocalTxMessageWork1: NoSuchMethodException"); - e.getMessage(); - e.printStackTrace(); - } catch (UnavailableException e) { - System.out.println("LocalTxMessageWork1: UnavailableException"); - e.printStackTrace(); - } catch (ResourceException re) { - System.out.println("LocalTxMessageWork1: ResourceException"); - re.printStackTrace(); - } catch (AppException ae) { - System.out.println("LocalTxMessageWork1: AppException"); - ae.printStackTrace(); - } catch (Exception e) { - // if we are in here, we will assume that our exception was of type ejb - // but it - // could also be from a non-ejb POJO - thus we use this Exception type. - System.out.println("EJBException thrown by Required"); - ConnectorStatus.getConnectorStatus() - .logState("EJBException thrown by Required"); - e.printStackTrace(); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - - } - - public void callAppExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw AppException from Required"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (AppException ejbe) { - System.out.println("AppException thrown by Required MDB"); - ConnectorStatus.getConnectorStatus() - .logState("AppException thrown by Required"); - } catch (NoSuchMethodException ns) { - ns.printStackTrace(); - } catch (ResourceException re) { - re.printStackTrace(); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - @Override - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java deleted file mode 100644 index f39d368780..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.lang.reflect.Method; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; - -public class LocalTxMessageWork2 implements Work { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource( - "LocalTxMessageXAResource2"); - - public LocalTxMessageWork2(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - System.out.println("LocalTxMessageWork2.constructor"); - } - - public void run() { - - while (!stop) { - try { - - // creating xaep to check if the message delivery is transacted. - MessageEndpoint xaep = factory.createEndpoint(msgxa); - MessageEndpoint xaep1 = factory.createEndpoint(msgxa); - MessageEndpoint xaep2 = factory.createEndpoint(msgxa); - - Method onMessagexa = getOnMessageMethod(); - ((TSMessageListenerInterface) xaep) - .onMessage("LocalTx MDB2 Transacted Message1"); - ((TSMessageListenerInterface) xaep1) - .onMessage("LocalTx MDB2 Transacted Message2"); - ((TSMessageListenerInterface) xaep2) - .onMessage("LocalTx MDB2 Transacted Message3"); - - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB2 Transacted Message1"); - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB2 Transacted Message2"); - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MDB2 Transacted Message3"); - - break; - } catch (AppException ex) { - ex.printStackTrace(); - } catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - @Override - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java deleted file mode 100644 index 50d4cfaef9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -/** - * Be careful..... This class will log a variety of message strings that will be - * used by client side tests. If you change any strings in this class, it is - * likely to result in test failures unless you are sure you know what tests you - * are affecting. - */ -public class LocalTxMessageXAResource implements XAResource { - String sHeader = "SomeDefault"; - - public LocalTxMessageXAResource() { - Debug.trace("LocalTxMessageXAResource constructor"); - } - - /* - * This constructor takes a string val. The passed in string is a unique - * string that will be used in client side test verifications. Making changes - * to the passed in string val is likely to result in test failures - so don't - * muck with the value unless you know exactly what tests you are affecting.. - */ - public LocalTxMessageXAResource(String val) { - sHeader = val; - Debug.trace(sHeader + " constructor"); - } - - private void handleResourceException(Exception ex) throws XAException { - - XAException xae = new XAException(ex.toString()); - xae.errorCode = XAException.XAER_RMERR; - throw xae; - } - - @Override - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - String str1 = sHeader + ".commit"; - ConnectorStatus.getConnectorStatus().logState(str1); - Debug.trace(str1); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - @Override - public void start(Xid xid, int flags) throws XAException { - try { - String str1 = sHeader + ".start"; // e.g. "LocalTxMessageXAResource.start" - Debug.trace(str1); - ConnectorStatus.getConnectorStatus().logState(str1); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - @Override - public void end(Xid xid, int flags) throws XAException { - try { - String str1 = sHeader + ".end"; // e.g. "LocalTxMessageXAResource.end" - Debug.trace(str1); - ConnectorStatus.getConnectorStatus().logState(str1); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - @Override - public void forget(Xid xid) throws XAException { - String str1 = sHeader + ".forget"; // e.g. "LocalTxMessageXAResource.forget" - Debug.trace(str1); - } - - @Override - public int getTransactionTimeout() throws XAException { - return 1; - } - - @Override - public boolean isSameRM(XAResource other) throws XAException { - String str1 = sHeader + ".isSameRM"; // e.g. - // "LocalTxMessageXAResource.isSameRM" - Debug.trace(str1); - return false; - } - - @Override - public int prepare(Xid xid) throws XAException { - String str1 = sHeader + ".prepare"; // e.g. - // "LocalTxMessageXAResource.prepare" - ConnectorStatus.getConnectorStatus().logAPI(str1, "", ""); - Debug.trace(str1); - try { - return XAResource.XA_OK; - } catch (Exception ex) { - handleResourceException(ex); - return XAException.XAER_RMERR; - } - } - - @Override - public Xid[] recover(int flag) throws XAException { - String str1 = sHeader + ".recover"; // e.g. - // "LocalTxMessageXAResource.recover" - Debug.trace(str1); - return null; - } - - @Override - public void rollback(Xid xid) throws XAException { - try { - Debug.trace(sHeader + ".rollback"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - @Override - public boolean setTransactionTimeout(int seconds) throws XAException { - return true; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java deleted file mode 100644 index da39d9b5ce..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.Serializable; -import java.lang.reflect.Method; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.DistributableWorkManager; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -public class LocalTxResourceAdapterImpl - implements ResourceAdapter, Serializable { - /** - * - */ - private static final long serialVersionUID = 1L; - // IMPORTANT: for compliance, if you add non-transient member data - // here, be sure to add respective entry to equals() method below. - - private transient TestWorkManager twm; - - private transient TestBootstrapContext tbs; - - private transient LocalTxMessageListener ml; - - private String RAName; // value from ra's xml file - - private Boolean useSecurityMapping = null; // value from ra's xml file - - private int counter = 0; - - private transient LocalTxMessageWork work1; - - private transient LocalTxMessageWork1 work2; - - private transient LocalTxMessageWork2 work3; - - private transient WorkManager wm; - - private int mefcount = 0; - - private transient MessageEndpointFactory mef1; - - private transient MessageEndpointFactory mef2; - - private transient BootstrapContext bsc; - - private String sicUser = ""; // this should correspond to ts.jte's 'user' - // property - - private String sicPwd = ""; // this should correspond to ts.jte's 'password' - // property - - private String eisUser = ""; // this should correspond to ts.jte's 'user1' - // property - - private String eisPwd = ""; // this should correspond to ts.jte's 'password' - // property - - public LocalTxResourceAdapterImpl() { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxResourceAdapterImpl Constructor "); - Debug.trace("LocalTxResourceAdapterImpl Constructor "); - - this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); - } - - @Override - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - Debug.trace("LocalTxResourceAdapter Started " + counter); - String str1 = "LocalTxResourceAdapter Started " + counter; - ConnectorStatus.getConnectorStatus().logState(str1); - - // get WorkManager reference - - wm = bsc.getWorkManager(); - - if (bsc != null) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxResourceAdapter BootstrapContext Not Null "); - } - - if (wm != null) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxResourceAdapter WorkManager Not Null "); - - if (wm instanceof DistributableWorkManager) { - Debug.trace("wm supports DistributableWorkManager"); - ConnectorStatus.getConnectorStatus() - .logState("wm supports DistributableWorkManager"); - } else { - Debug.trace("wm Does NOT support DistributableWorkManager"); - ConnectorStatus.getConnectorStatus() - .logState("wm Does NOT support DistributableWorkManager"); - } - - } - try { - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - wm = ctx.getWorkManager(); - // Create TestWorkManager object - twm = new TestWorkManager(ctx); - if (this.useSecurityMapping.booleanValue() == true) { - // values from our RA xml file indicate we want to establish Case 2 - // security for the RA. This means we need security mappings. - Debug.trace( - " LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); - ConnectorStatus.getConnectorStatus().logState( - " LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); - twm.setUseSecurityMapping(true); - } else { - // use Case 1 security thus do NO mapping of identities - Debug.trace( - " LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); - ConnectorStatus.getConnectorStatus().logState( - " LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); - twm.setUseSecurityMapping(false); - } - twm.runTests(); - - // Create TestBootstrap object - tbs = new TestBootstrapContext(ctx); - tbs.runTests(); - } - - @Override - public void stop() { - // Set the TestWorkManager to null upon resource adapter shutdown. - - if (work1 != null) { - work1.stop(); - } - if (work2 != null) { - work2.stop(); - } - - if (work3 != null) { - work3.stop(); - } - } - - @Override - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - try { - mefcount++; - - // check if endpointActivation has been called - Debug.trace("LocalTxResourceAdapter.endpointActivation called"); - Method onMessagexa = getOnMessageMethod(); - boolean de = mef.isDeliveryTransacted(onMessagexa); - - // For MDB with Not Supported transaction attribute - if (!de) { - mef1 = mef; - String destinationName = ((LocalTxActivationSpec) as) - .getDestinationName(); - Debug.trace("LocalTxResourceAdapter preparing work1"); - - if (mef1 != null) { - Debug.trace("mef1 is not null"); - } - - work1 = new LocalTxMessageWork(destinationName, mef1); - work1.setBootstrapContext(bsc); - - // perform some msging to test SIC - TSSecurityContext sic = new TSSecurityContextWithListener(sicUser, - sicPwd, eisUser, this.useSecurityMapping.booleanValue()); - work1.addWorkContext(sic); - - Debug.trace("LocalTxResourceAdapter work1 created"); - wm.scheduleWork(work1, WorkManager.INDEFINITE, null, null); - Debug.trace("LocalTxResourceAdapter work1 scheduled"); - } else // For MDB with Required transaction attribute - { - // Endpoint requires a tranaction but no incoming transaction - mef2 = mef; - Debug.trace("LocalTxResourceAdapter preparing work2"); - String destinationName = ((LocalTxActivationSpec) as) - .getDestinationName(); - Debug.trace("Before Destination name"); - Debug.trace("Destination name is " + destinationName); - - if (mef2 != null) { - Debug.trace("mef2 is not null"); - } - - work2 = new LocalTxMessageWork1(destinationName, mef2); - - Debug.trace("LocalTxResourceAdapter work2 created"); - wm.scheduleWork(work2, WorkManager.INDEFINITE, null, null); - Debug.trace("LocalTxResourceAdapter work2 scheduled"); - - // Endpoint requires a tranaction and there is an incoming transaction - work3 = new LocalTxMessageWork2(destinationName, mef2); - XidImpl myid = new XidImpl(); - ExecutionContext ec = new ExecutionContext(); - int idcount = myid.getFormatId(); - Debug.trace("XID getting used [ " + idcount + " ]"); - ec.setXid(myid); - ml = new LocalTxMessageListener(myid, this.bsc); - wm.scheduleWork(work3, WorkManager.INDEFINITE, ec, ml); - } - - if (mefcount == 2) { - chkUniqueMessageEndpointFactory(); - } - - } catch (Throwable ex) { - ex.printStackTrace(); - } - - } - - @Override - public XAResource[] getXAResources(ActivationSpec[] as) { - return null; - } - - private Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - if ((mef1 != null) && (!mef1.equals(mef2))) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTx MessageEndpointFactory is Unique"); - - // Also checking if the equals on the MEF is implemented correctly. - // Normally MEF equals should not be over ridden but if it is - // it should be implemented correctly. - ConnectorStatus.getConnectorStatus().logState( - "LocalTx MessageEndpointFactory equals implemented correctly"); - } - } - - @Override - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - mefcount--; - - if ((mef1 != null) && (mef1.equals(mef))) { - mef1 = null; - - } else if ((mef2 != null) && (mef2.equals(mef))) { - mef2 = null; - - } else { - // possible issue so dump some debugging/trace info - String str = "WARNING: LocalTxResourceAdapterImpl.endpointDeactivation(): "; - str += "unexpected MEF passed in"; - Debug.trace(str); - if (mef == null) { - Debug.trace("NULL MEF passed into endpointDeactivation()"); - } else { - Debug.trace("Unrecognize mef passed into endpointDeactivation()"); - } - } - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof LocalTxResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - LocalTxResourceAdapterImpl that = (LocalTxResourceAdapterImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (this.mefcount != that.getMefcount()) { - return false; - } - - if (!Util.isEqual(this.sicUser, that.getSicUser())) - return false; - - if (!Util.isEqual(this.sicPwd, that.getSicPwd())) - return false; - - if (!Util.isEqual(this.eisUser, that.getEisUser())) - return false; - - if (!Util.isEqual(this.eisPwd, that.getEisPwd())) - return false; - - if (!Util.isEqual(this.RAName, that.getRAName())) - return false; - - if (this.getUseSecurityMapping().booleanValue() != that - .getUseSecurityMapping().booleanValue()) { - return false; - } - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRAName(String name) { - ConnectorStatus.getConnectorStatus() - .logState("LocalTxResourceAdapter.setRAName"); - this.RAName = name; - } - - public String getRAName() { - Debug.trace("LocalTxResourceAdapter.getRAName"); - return RAName; - } - - public void setUseSecurityMapping(Boolean val) { - this.useSecurityMapping = val; - } - - public Boolean getUseSecurityMapping() { - return this.useSecurityMapping; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - - public void setMefcount(int val) { - this.mefcount = val; - } - - public int getMefcount() { - return this.mefcount; - } - - public void setSicUser(String val) { - this.sicUser = val; - } - - public String getSicUser() { - return this.sicUser; - } - - public void setSicPwd(String val) { - this.sicPwd = val; - } - - public String getSicPwd() { - return this.sicPwd; - } - - public void setEisUser(String val) { - this.eisUser = val; - } - - public String getEisUser() { - return this.eisUser; - } - - public void setEisPwd(String val) { - this.eisPwd = val; - } - - public String getEisPwd() { - return this.eisPwd; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java deleted file mode 100644 index da24f2a32c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.IllegalStateException; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.security.PasswordCredential; - -public class MetaDataImpl implements ManagedConnectionMetaData { - - private TSManagedConnection mc; - - public MetaDataImpl(TSManagedConnection mc) { - this.mc = mc; - } - - /* - * @name getEISProductName - * - * @desc Gets product name of underlying EIS. - * - * @return String - * - * @exception ResourceException - */ - @Override - public String getEISProductName() throws ResourceException { - try { - String str = "Simple TS EIS"; - return str; - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name getEISProductVersion - * - * @desc Gets product version of underlying EIS. - * - * @return String - * - * @exception ResourceException - */ - @Override - public String getEISProductVersion() throws ResourceException { - try { - String str = "1.0"; - return str; - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name getMaxConnections - * - * @desc Returns maximum limit on number of active concurrent connections that - * an EIS instance can support across client processes. - * - * @return int - * - * @exception ResourceException - */ - @Override - public int getMaxConnections() throws ResourceException { - try { - int i = 0; - return i; - } catch (Exception ex) { - ResourceException re = new EISSystemException(ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name getUserName - * - * @desc Return name of the user currently associated with ManagedConnection - * instance. The returned username corresponds to the resource principal under - * whose security context the connection to the EIS instance has been - * established. - * - * @return String - * - * @exception ResourceException - */ - @Override - public String getUserName() throws ResourceException { - if (mc.isDestroyed()) { - throw new IllegalStateException("ManagedConnection has been destroyed"); - } - - PasswordCredential pc = null; - String str = null; - - pc = mc.getPasswordCredential(); - if (pc != null) { - str = pc.getUserName(); - } - - if (pc != null && str != null && !str.equals("")) - return str; - else - return null; - - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java deleted file mode 100644 index 5a30db518b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -public class NoTxManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - - private ResourceAdapter resourceAdapter; - - private javax.naming.Reference reference; - - private int count; - - private String password; - - private String user; - - private String userName; - - /* - * @name NoTxManagedConnectionFactory - * - * @desc Default conctructor - */ - public NoTxManagedConnectionFactory() { - } - - public String getUser() { - System.out - .println("NoTxManagedConnectionFactory.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - System.out - .println("NoTxManagedConnectionFactory.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - System.out.println( - "NoTxManagedConnectionFactory.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - System.out.println( - "NoTxManagedConnectionFactory.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - System.out.println( - "NoTxManagedConnectionFactory.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - System.out.println( - "NoTxManagedConnectionFactory.setPassword() with val = " + val); - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - @Override - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "NoTxManagedConnectionFactory.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - - @Override - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "NoTxManagedConnectionFactory setResourceAdapter " + count; - System.out.println(newStr1); - ConnectorStatus.getConnectorStatus().logState(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - - @Override - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - - @Override - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "NoTxManagedConnectionFactory.createConnectionFactory", "", - "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - - @Override - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - TSConnection con = null; - String userName = null; - ConnectorStatus.getConnectorStatus().logAPI( - "NoTxManagedConnectionFactory.createManagedConnection", "", - "TSManagedConnection"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - con = new TSConnectionImpl().getConnection(); - } else { - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - return new TSManagedConnection(this, pc, null, con, false, false); - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - @Override - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "NoTxManagedConnecitonFactory.matchManagedConnection", - "connectionSet|subject|info", "TSEISDataSource"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc sets the log writer - * - * @param PrinterWriter out - * - * @exception ResourceException - */ - @Override - public void setLogWriter(PrintWriter out) throws ResourceException { - - } - - /* - * @name getLogWriter - * - * @desc gets the log writer - * - * @return PrinterWriter out - * - * @exception ResourceException - */ - @Override - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - @Override - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof NoTxManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - NoTxManagedConnectionFactory that = (NoTxManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - @Override - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - @Override - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - @Override - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java deleted file mode 100644 index 58b9011ed4..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java +++ /dev/null @@ -1,288 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.Serializable; -import java.lang.reflect.Method; -import java.util.Vector; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -public class NoTxResourceAdapterImpl implements ResourceAdapter, Serializable { - // IMPORTANT: for compliance, if you add non-transient member data - // here, be sure to add respective entry to equals() method below. - - private transient TestWorkManager twm; - - private transient TestBootstrapContext tbs; - - private transient LocalTxMessageListener ml; - - private String RAName; // value from ra's xml file - - private Boolean useSecurityMapping = null; // value from ra's xml file - - private int counter = 0; - - private transient javax.transaction.xa.XAResource xaresource; - - private transient WorkManager wm; - - private int mefcount = 0; - - private transient MessageEndpointFactory mef1; - - private transient MessageEndpointFactory mef2; - - private transient BootstrapContext bsc; - - public NoTxResourceAdapterImpl() { - ConnectorStatus.getConnectorStatus() - .logState("NoTxResourceAdapterImpl Constructor"); - System.out.println("NoTxResourceAdapterImpl Constructor"); - } - - @Override - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - System.out.println("NoTxResourceAdapter Started " + counter); - String str1 = "NoTxResourceAdapter Started " + counter; - ConnectorStatus.getConnectorStatus().logState(str1); - - // get WorkManager reference - - WorkManager wm = bsc.getWorkManager(); - - if (bsc != null) { - ConnectorStatus.getConnectorStatus() - .logState("NoTxResourceAdapter BootstrapContext Not Null "); - } - - if (wm != null) { - ConnectorStatus.getConnectorStatus() - .logState("NoTxResourceAdapter WorkManager Not Null "); - } - - try { - checkAssociation(); - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - wm = ctx.getWorkManager(); - // Create TestWorkManager object - twm = new TestWorkManager(ctx); - if (this.useSecurityMapping.booleanValue() == true) { - // values from our RA xml file indicate we want to establish Case 2 - // security for the RA. This means we need security mappings. - Debug.trace( - "NoTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); - twm.setUseSecurityMapping(true); - } else { - // use Case 1 security thus do NO mapping of identities - Debug.trace( - "NoTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); - twm.setUseSecurityMapping(false); - } - twm.runTests(); - - // Create TestBootstrap object - tbs = new TestBootstrapContext(ctx); - tbs.runTests(); - } - - @Override - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - @Override - public void stop() { - // Set the TestWorkManager to null upon resource adapter shutdown. - // twm = null; - } - - @Override - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - - } - - @Override - public XAResource[] getXAResources(ActivationSpec[] as) { - return null; - } - - private Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - if ((mef1 != null) && (!mef1.equals(mef2))) { - Debug.trace("NoTx MessageEndpointFactory is Unique"); - Debug.trace("NoTx MessageEndpointFactory equals implemented correctly"); - } - } - - /* - * This method is used to assist in the verification process of assertion - * Connector:SPEC:245 This method must be called befor the work instances - * 'run' method is called. This method checks if the setResourceAdapter() - * method was called and if so, then this method logs a message to indicate - * that it was called prior to the 'run' method of the run method. - */ - public void checkAssociation() { - Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); - String toCheck1 = "NoTxManagedConnectionFactory setResourceAdapter 1"; - - for (int i = 0; i < vLog.size(); i++) { - String str = (String) vLog.elementAt(i); - if (str.startsWith(toCheck1)) { - ConnectorStatus.getConnectorStatus().logState( - "NoTxResourceAdapter - association exists between RA and work"); - break; - } - } - - } - - public void setRAName(String name) { - ConnectorStatus.getConnectorStatus() - .logState("NoTxResourceAdapter.setRAName"); - this.RAName = name; - } - - public String getRAName() { - Debug.trace("NoTxResourceAdapter.getRAName"); - return RAName; - } - - public void setUseSecurityMapping(Boolean val) { - this.useSecurityMapping = val; - } - - public Boolean getUseSecurityMapping() { - return this.useSecurityMapping; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - - public void setMefcount(int val) { - this.mefcount = val; - } - - public int getMefcount() { - return this.mefcount; - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof NoTxResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - NoTxResourceAdapterImpl that = (NoTxResourceAdapterImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (this.mefcount != that.getMefcount()) { - return false; - } - - if (!Util.isEqual(this.RAName, that.getRAName())) - return false; - - if (this.getUseSecurityMapping().booleanValue() != that - .getUseSecurityMapping().booleanValue()) { - return false; - } - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java deleted file mode 100644 index 23972aad04..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.security.Principal; - -/** - * @author Raja Perumal - */ -public class SimplePrincipal implements Principal, java.io.Serializable { - private String name = null; // username - - private String password = null; // password - - public SimplePrincipal(String val) { - name = val; - } - - public SimplePrincipal(String val, String pwd) { - name = val; - password = pwd; - } - - // required to satisfy Principal interface - @Override - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof SimplePrincipal)) { - return false; - } - if (obj == this) { - return true; - } - - SimplePrincipal that = (SimplePrincipal) obj; - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.name, that.getName())) - return false; - - return true; - } - - // required to satisfy Principal interface - @Override - public String getName() { - return name; - } - - public void setName(String val) { - name = val; - } - - public void setPassword(String val) { - password = val; - } - - // required to satisfy Principal interface - @Override - public String toString() { - return name; - } - - // required to satisfy Principal interface - @Override - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - // may want to change this later if tests call for it - // this is normally bad but for testing purposes we dont care - public String getPassword() { - return password; - } -} // end of class SimulateRuntime diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java deleted file mode 100644 index d63d3caf0f..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Hashtable; -import java.util.Vector; - -/** - * A Pooled object interface. - * - * @version 2.0, 06/06/02 - * @author Gursharan Singh/Binod P.G - */ -public interface TSConnection { - - /** - * Insert a key and value in Test Information System (TSEIS). - * - * @param key - * Key to insert. - * @param value - * value to insert. - * @throws Exception - * If the key is already present in the EIS. - */ - public void insert(String key, String value) throws Exception; - - /** - * Delete the key and value from Test Information System (TSEIS). - * - * @param key - * Key to delete. - * @throws Exception - * If the key is not present in the EIS. - */ - public void delete(String key) throws Exception; - - /** - * Update the key and value in Test Information System (TSEIS). - * - * @param key - * Key to update. - * @param value - * value to update. - * @throws Exception - * If the key is not present in the EIS. - */ - public void update(String key, String value) throws Exception; - - /** - * Read the value for the key. - * - * @param key - * Key to read. - * @return String value. - * @throws Exception - * If the key is not present in the EIS. - */ - public String readValue(String key) throws Exception; - - /** - * Drops all data in the EIS. - * - * @throws Exception - * If there is any exception while droppping. - */ - public void dropTable() throws Exception; - - /** - * Rolls back all the operations. - */ - public void rollback(); - - /** - * Commits all the operations. - * - * @throws Exception - * If commit fails. - */ - public void commit() throws Exception; - - public void begin() throws Exception; - - /** - * Closes this connection. - * - * @throws Exception - * If close fails. - */ - public void close() throws Exception; - - /** - * Sets the auto-commit flag to the value passed in. True indicates that all - * the operation will be committed. If a false is passed, EIS will wait until - * an explicit commit is executed. - * - * @param flag - * True or False - */ - public void setAutoCommit(boolean flag); - - /** - * Get the auto-commt flag value. - * - * @return the boolean value indicating auto-commit. - */ - public boolean getAutoCommit(); - - /** - * Get all the data in the TSEis. Only Data is returned. Keys are not. - * - * @return Vector containing all the data values. - * @throws Exception - * If read fails. - */ - public Vector readData() throws Exception; - - /** - * Get the data cache of the connection accumulated during a transaction. - * - * @returns Data cache of operations on the connection. - */ - public Hashtable getTempTable(); -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java deleted file mode 100644 index 830e4950b2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Vector; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.ConnectionEvent; -import jakarta.resource.spi.ConnectionEventListener; -import jakarta.resource.spi.ManagedConnection; - -public class TSConnectionEventListener implements ConnectionEventListener { - - private Vector listeners; - - private ManagedConnection mcon; - - /* - * @name TSConnectionEventListener - * - * @desc TSConnectionEventListener constructor - * - * @param ManagedConnection mcon - */ - - public TSConnectionEventListener(ManagedConnection mcon) { - listeners = new Vector(); - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionEventListener.constructor", "mcon", ""); - this.mcon = mcon; - } - - /* - * @name sendEvent - * - * @desc send event notifications - * - * @param int eventType, Exception ex, Object connectionHandle - */ - public void sendEvent(int eventType, Exception ex, Object connectionHandle) { - Vector list = (Vector) listeners.clone(); - ConnectionEvent ce = null; - if (ex == null) { - ce = new ConnectionEvent(mcon, eventType); - } else { - ce = new ConnectionEvent(mcon, eventType, ex); - } - if (connectionHandle != null) { - ce.setConnectionHandle(connectionHandle); - } - int size = list.size(); - for (int i = 0; i < size; i++) { - ConnectionEventListener l = (ConnectionEventListener) list.elementAt(i); - switch (eventType) { - case ConnectionEvent.CONNECTION_CLOSED: - l.connectionClosed(ce); - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.sendEvent", "CONNECTION_CLOSED", ""); - System.out - .println("TSConnectionEventListener.sendEvent:CONNECTION_CLOSED"); - break; - case ConnectionEvent.LOCAL_TRANSACTION_STARTED: - l.localTransactionStarted(ce); - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.sendEvent", "LOCAL_TRANSACTION_STARTED", - ""); - break; - case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED: - l.localTransactionCommitted(ce); - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.sendEvent", "LOCAL_TRANSACTION_COMMITED", - ""); - break; - case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK: - l.localTransactionRolledback(ce); - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.sendEvent", - "LOCAL_TRANSACTION_ROLLEDBACK", ""); - break; - case ConnectionEvent.CONNECTION_ERROR_OCCURRED: - l.connectionErrorOccurred(ce); - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.sendEvent", "CONNECTION_ERROR_OCCURED", - ""); - break; - default: - throw new IllegalArgumentException("Illegal eventType: " + eventType); - } - } - } - - public void localTransactionRolledback(ConnectionEvent event) { - - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionEventListener.localTransactionRolledBack", "", ""); - System.out.println("TSConnectionEventListener.localTransactionRolledback"); - } - - public void localTransactionCommitted(ConnectionEvent event) { - - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionEventListener.localTransactionCommitted", "", ""); - System.out.println("TSConnectionEventListener.localTransactionCommited"); - } - - public void localTransactionStarted(ConnectionEvent event) { - - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionEventListener.localTransactionStarted", "", ""); - System.out.println("TSConnectionEventListener.localTransactionStarted"); - } - - /* - * @name addConnectorListener - * - * @desc add a connector event listener - * - * @param ConnectionEventListener - */ - public void addConnectorListener(ConnectionEventListener l) { - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.addConnectorListener", - "connectionEventListener", ""); - listeners.addElement(l); - } - - /* - * @name removeConnectorListener - * - * @desc remove a connector event listener - * - * @param ConnectionEventListener - */ - public void removeConnectorListener(ConnectionEventListener l) { - ConnectorStatus.getConnectorStatus().logAPI( - "TSConnectionEventListener.removeConnectorListener", - "connectionEventListener", ""); - listeners.removeElement(l); - } - - /* - * @name connectionClosed - * - * @desc - * - * @param ConnectionEvent - */ - public void connectionClosed(ConnectionEvent event) { - // do nothing. The event is sent by the TSEISConnection wrapper - } - - /* - * @name connectionErrorOccured - * - * @desc add a connector event listener - * - * @param ConnectionEvent - */ - public void connectionErrorOccurred(ConnectionEvent event) { - ConnectorStatus.getConnectorStatus().logAPI( - "TSEISConnectionEventListener.connectionErrorOccured", - "connectionEvent", ""); - sendEvent(ConnectionEvent.CONNECTION_ERROR_OCCURRED, event.getException(), - null); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java deleted file mode 100644 index d8d614829c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java +++ /dev/null @@ -1,195 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Hashtable; -import java.util.Vector; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -public class TSConnectionImpl implements TSConnection { - - private boolean inuse = false; - - private boolean autocommit = true; - - private Hashtable tempTable = new Hashtable(); - - public TSConnectionImpl() { - - } - - public TSConnection getConnection() throws Exception { - try { - - TSConnection ctscon = TSeis.getTSeis().getConnection(); - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionImpl.getConnection", "", ""); - return ctscon; - } catch (Exception ex) { - ex.printStackTrace(); - ex.getMessage(); - return null; - } - } - - public TSConnection getConnection(String user, char[] passwd) - throws Exception { - try { - - System.out.println("TSConnectionImpl.getConnection(u,p): user=" + user - + " passwd = " + passwd); - - TSConnection ctscon = TSeis.getTSeis().getConnection(user, passwd); - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionImpl.getConnection", "", ""); - return ctscon; - } catch (Exception ex) { - ex.printStackTrace(); - ex.getMessage(); - return null; - } - } - - public synchronized boolean lease() { - if (inuse) { - return false; - } else { - inuse = true; - return true; - } - } - - protected void expireLease() { - inuse = false; - } - - @Override - public void insert(String key, String value) throws Exception { - try { - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.insert", "", - ""); - TSeis.getTSeis().insert(key, value, this); - System.out.println("TSConnectionImpl.insert"); - } catch (Exception ex) { - throw ex; - } - } - - @Override - public void delete(String str) throws Exception { - try { - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.delete", "", - ""); - TSeis.getTSeis().delete(str, this); - System.out.println("TSConnectionImpl.delete"); - } catch (Exception ex) { - throw ex; - } - } - - @Override - public void update(String key, String value) throws Exception { - try { - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.update", "", - ""); - TSeis.getTSeis().update(key, value, this); - System.out.println("TSConnectionImpl.update"); - } catch (Exception ex) { - throw ex; - } - } - - @Override - public Hashtable getTempTable() { - return tempTable; - } - - public boolean inUse() throws Exception { - return inuse; - } - - @Override - public void setAutoCommit(boolean flag) { - autocommit = flag; - } - - @Override - public boolean getAutoCommit() { - return autocommit; - } - - @Override - public void dropTable() throws Exception { - - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.dropTable", - "", ""); - TSeis.getTSeis().dropTable(); - tempTable.clear(); - } - - @Override - public void begin() throws Exception { - - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.begin", "", - ""); - TSeis.getTSeis().begin(); - } - - @Override - public void rollback() { - - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.rollback", "", - ""); - tempTable.clear(); - } - - @Override - public void commit() throws Exception { - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.commit", "", - ""); - TSeis.getTSeis().commit(this); - tempTable.clear(); - } - - @Override - public void close() throws Exception { - TSeis.getTSeis().returnConnection(this); - System.out.println("TSConnectionImpl.close"); - } - - @Override - public Vector readData() throws Exception { - Vector table = TSeis.getTSeis().readData(); - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.readData", "", - ""); - return table; - } - - @Override - public String readValue(String key) throws Exception { - String value = TSeis.getTSeis().readValue(key, this); - ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.readValue", - "", ""); - return value; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java deleted file mode 100644 index 05e54dc9a7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import jakarta.resource.spi.ConnectionRequestInfo; - -public class TSConnectionRequestInfo implements ConnectionRequestInfo { - - private String user; - - private String password; - - /* - * @name TSConnectionRequestInfo - * - * @desc TSConnectionRequestInfo constructor - * - * @param String, String - */ - public TSConnectionRequestInfo(String user, String password) { - this.user = user; - this.password = password; - } - - /* - * @name getUser - * - * @desc Gets the user name - * - * @return String - */ - public String getUser() { - return user; - } - - /* - * @name getPassword - * - * @desc Gets the Password - * - * @return String - */ - public String getPassword() { - return password; - } - - /* - * @name equals - * - * @desc Compares the given object with ConnectionRequestInfo. - * - * @param Object - * - * @return boolean - */ - @Override - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof TSConnectionRequestInfo)) { - return false; - } - if (obj == this) { - return true; - } - - TSConnectionRequestInfo that = (TSConnectionRequestInfo) obj; - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Returns the Object hashcode. - * - * @return int - */ - @Override - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name isEqual - * - * @desc Compares two Objects. - * - * @return boolean - */ - private boolean isEqual(Object o1, Object o2) { - if (o1 == null) { - return (o2 == null); - } else { - return o1.equals(o2); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java deleted file mode 100644 index a12fea9afc..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)TSEISConnection.java 1.5 02/06/06 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Hashtable; -import java.util.Vector; - -import jakarta.resource.spi.ConnectionEvent; - -public class TSEISConnection implements TSConnection { - - private TSManagedConnection mc; - - private boolean supportsLocalTx; - - /* - * @name TSEISConnection - * - * @desc TSEISConnection constructor - * - * @param TSManagedConnection - */ - public TSEISConnection(TSManagedConnection mc, boolean supportsLocalTx) { - this.mc = mc; - this.supportsLocalTx = supportsLocalTx; - } - - public void insert(String key, String value) throws Exception { - try { - TSConnection con = getTSEISConnection(); - con.insert(key, value); - } catch (Exception ex) { - throw ex; - } - } - - public void delete(String key) throws Exception { - try { - TSConnection con = getTSEISConnection(); - con.delete(key); - } catch (Exception ex) { - throw ex; - } - - } - - public void update(String key, String value) throws Exception { - try { - TSConnection con = getTSEISConnection(); - con.update(key, value); - } catch (Exception ex) { - throw ex; - } - - } - - public Vector readData() throws Exception { - TSConnection con = getTSEISConnection(); - return con.readData(); - - } - - public String readValue(String key) throws Exception { - TSConnection con = getTSEISConnection(); - return con.readValue(key); - - } - - public void setAutoCommit(boolean flag) { - TSConnection con = getTSEISConnection(); - con.setAutoCommit(flag); - } - - public boolean getAutoCommit() { - TSConnection con = getTSEISConnection(); - return con.getAutoCommit(); - - } - - /* - * @name commit - * - * @desc Commit a transaction. - */ - public void commit() throws Exception { - TSConnection con = getTSEISConnection(); - con.commit(); - } - - /* - * @name dropTable - * - * @desc drop a table. - */ - public void dropTable() throws Exception { - TSConnection con = getTSEISConnection(); - System.out.println("TSEISConnectin.dropTable." + con); - con.dropTable(); - } - - /* - * @name begin - * - * @desc begin a transaction. - */ - public void begin() throws Exception { - TSConnection con = getTSEISConnection(); - con.begin(); - } - - /* - * @name rollback - * - * @desc rollback a transaction - */ - public void rollback() { - TSConnection con = getTSEISConnection(); - con.rollback(); - } - - /* - * @name close - * - * @desc close a connection to the EIS. - */ - public void close() throws Exception { - if (mc == null) - return; // already be closed - mc.removeTSConnection(this); - mc.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this); - mc = null; - } - - /* - * @name isClosed - * - * @desc checks if the connection is close. - */ - public boolean isClosed() { - return (mc == null); - } - - /* - * @name associateConnection - * - * @desc associate connection - * - * @param TSManagedConnection newMc - */ - void associateConnection(TSManagedConnection newMc) { - - if (checkIfValid()) { - mc.removeTSConnection(this); - } - newMc.addTSConnection(this); - mc = newMc; - } - - public boolean checkIfValid() { - if (mc == null) { - return false; - } - return true; - } - - /* - * @name getTSEISConnection - * - * @desc get a Jdbc connection - * - * @return Connection - */ - TSConnection getTSEISConnection() { - try { - if (checkIfValid()) { - return mc.getTSConnection(); - } else { - return null; - } - } catch (Exception ex) { - ex.printStackTrace(); - return null; - } - } - - void invalidate() { - mc = null; - } - - public Hashtable getTempTable() { - return getTSEISConnection().getTempTable(); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java deleted file mode 100644 index 655fb8772d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.Serializable; -import java.util.Vector; - -import javax.naming.Reference; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.Referenceable; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.ManagedConnectionFactory; - -public class TSEISDataSource - implements TSDataSource, Serializable, Referenceable { - - private String desc; - - private ManagedConnectionFactory mcf; - - private ConnectionManager cm; - - private Reference reference; - - /* - * @name createTSConnectionFactory - * - * @desc TSConnectionFactory constructor - * - * @param ManagedConnectionFactor, ConnectionManager - */ - public TSEISDataSource(ManagedConnectionFactory mcf, ConnectionManager cm) { - this.mcf = mcf; - if (cm == null) { - - } else { - this.cm = cm; - } - } - - /* - * @name getConnection - * - * @desc Gets a connection to the EIS. - * - * @return Connection - * - * @exception Exception - */ - public TSConnection getConnection() throws Exception { - try { - return (TSConnection) cm.allocateConnection(mcf, null); - } catch (Exception ex) { - throw new Exception(ex.getMessage()); - } - } - - /* - * @name getConnection - * - * @desc Gets a connection to the EIS. - * - * @return Connection - * - * @exception Exception - */ - public TSConnection getConnection(String username, String password) - throws Exception { - try { - ConnectionRequestInfo info = new TSConnectionRequestInfo(username, - password); - return (TSConnection) cm.allocateConnection(mcf, info); - } catch (ResourceException ex) { - throw new Exception(ex.getMessage()); - } - } - - /* - * @name getLog - * - * @desc Returns Log to client. Used for verification of callbacks. - * - * @return Log - */ - @Override - public Vector getLog() { - return (ConnectorStatus.getConnectorStatus().getLogVector()); - } - - /* - * @name getStateLog - * - * @desc Returns Log to client. Used for verification of callbacks. - * - * @return Log - */ - @Override - public Vector getStateLog() { - return (ConnectorStatus.getConnectorStatus().getStateLogVector()); - } - - /* - * @name checkConnectionManager - * - * @desc return true if ConnectionManager is Serializable - * - * @return boolean - */ - public boolean checkConnectionManager() { - - if (cm instanceof Serializable) - return true; - else - return false; - } - - /* - * @name clearLog - * - * @desc Empties the Log - */ - @Override - public void clearLog() { - // In order to support the case where we want to be able to deploy one - // time and then run through all tests, we want to ensure that the log is - // not accidentally deleted by a client side test. (In the past, it was - // acceptable to delete this log at the end of a client tests run because - // rars would be undeployed and then re-deployed, thus re-creating this - // log.) - // but this may not be true for case of standalone connector. - // ConnectorStatus.getConnectorStatus().purge(); - } - - /* - * @name setLogFlag - * - * @desc Turns logging on/off - */ - @Override - public void setLogFlag(boolean b) { - ConnectorStatus.getConnectorStatus().setLogFlag(b); - } - - /* - * @name setReference - * - * @desc - */ - public void setReference(Reference reference) { - this.reference = reference; - } - - /* - * @name getReference - * - * @desc - */ - public Reference getReference() { - return reference; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java deleted file mode 100644 index cb7e81e8c5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java +++ /dev/null @@ -1,443 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.PrintWriter; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionEventListener; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.IllegalStateException; -import jakarta.resource.spi.LocalTransaction; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.SecurityException; -import jakarta.resource.spi.security.PasswordCredential; - -public class TSManagedConnection implements ManagedConnection { - - private TSXAConnection xacon; - - private TSConnection con; - - private TSConnectionEventListener jdbcListener; - - private PasswordCredential passCred; - - private ManagedConnectionFactory mcf; - - private PrintWriter logWriter; - - private boolean supportsXA; - - private boolean supportsLocalTx; - - private boolean destroyed; - - private Set connectionSet; // set of TSEISConnection - - public TSManagedConnection(ManagedConnectionFactory mcf, - PasswordCredential passCred, TSXAConnection xacon, TSConnection con, - boolean supportsXA, boolean supportsLocalTx) { - this.mcf = mcf; - this.passCred = passCred; - this.xacon = xacon; - this.con = con; - this.supportsXA = supportsXA; - this.supportsLocalTx = supportsLocalTx; - connectionSet = new HashSet(); - jdbcListener = new TSConnectionEventListener(this); - if (xacon != null) { - xacon.addConnectionEventListener(jdbcListener); - } - - } - - // XXX should throw better exception - private void throwResourceException(Exception ex) throws ResourceException { - - ResourceException re = new ResourceException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - /* - * @name getConnection - * - * @desc Gets a connection to the underlying EIS. - * - * @param Subject, ConnectionRequestInfo - * - * @return Object - * - * @exception ResourceException - * - * @see - */ - @Override - public Object getConnection(Subject subject, - ConnectionRequestInfo connectionRequestInfo) throws ResourceException { - - PasswordCredential pc = Util.getPasswordCredential(mcf, subject, - connectionRequestInfo); - if (!Util.isPasswordCredentialEqual(pc, passCred)) { - throw new SecurityException( - "Principal does not match. Reauthentication not supported"); - } - checkIfDestroyed(); - TSEISConnection jdbcCon = new TSEISConnection(this, this.supportsLocalTx); - addTSConnection(jdbcCon); - return jdbcCon; - } - - /* - * @name destroy - * - * @desc destroys connection to the underlying EIS. - * - * @exception ResourceException - */ - @Override - public void destroy() throws ResourceException { - try { - if (destroyed) - return; - destroyed = true; - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - TSEISConnection jdbcCon = (TSEISConnection) it.next(); - jdbcCon.invalidate(); - ConnectorStatus.getConnectorStatus() - .logAPI("TSManagedConnection.destroy", "", ""); - } - connectionSet.clear(); - con.close(); - if (xacon != null) - xacon.close(); - } catch (Exception ex) { - throwResourceException(ex); - } - } - - /* - * @name cleanup - * - * @desc recycles the connection from the connection pool which is being - * handed over to the new client. - * - * @exception ResourceException - */ - public void cleanup() throws ResourceException { - try { - checkIfDestroyed(); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - TSEISConnection jdbcCon = (TSEISConnection) it.next(); - jdbcCon.invalidate(); - ConnectorStatus.getConnectorStatus() - .logAPI("TSManagedConnection.cleanup", "", ""); - } - connectionSet.clear(); - if (xacon != null) { - con.close(); - con = xacon.getConnection(); - } else if (con != null) { - con.setAutoCommit(true); - } - } catch (Exception ex) { - throwResourceException(ex); - } - } - - /* - * @name associateConnection - * - * @desc Used by the container to change the association of an - * application-level connection handle with a ManagedConneciton instance. - * - * @param Object - * - * @exception ResourceException - */ - @Override - public void associateConnection(Object connection) throws ResourceException { - - checkIfDestroyed(); - if (connection instanceof TSEISConnection) { - TSEISConnection jdbcCon = (TSEISConnection) connection; - jdbcCon.associateConnection(this); - ConnectorStatus.getConnectorStatus() - .logAPI("TSManagedConnection.associateConnection", "connection", ""); - } else { - throw new IllegalStateException( - "Invalid connection object: " + connection); - } - } - - /* - * @name addConnectionEventListener - * - * @desc Used by the container to change the association of an - * application-level connection handle with a ManagedConneciton instance. - * - * @param ConnectionEventListener - */ - @Override - public void addConnectionEventListener(ConnectionEventListener listener) { - ConnectorStatus.getConnectorStatus().logAPI( - "TSManagedConnection.addConnectionEventListener", "listener", ""); - jdbcListener.addConnectorListener(listener); - } - - /* - * @name removeConnectionEventListener - * - * @desc Removes an already registered connection event listener from the - * ManagedConnection instance. - * - * @param ConnectionEventListener - */ - @Override - public void removeConnectionEventListener(ConnectionEventListener listener) { - ConnectorStatus.getConnectorStatus().logAPI( - "TSManagedConnection.removeConnectionEventListener", "listener", ""); - jdbcListener.removeConnectorListener(listener); - } - - /* - * @name getXAResource - * - * @desc Returns an javax.transaction.xa.XAresource instance. - * - * @return XAResource - * - * @exception ResourceException - */ - @Override - public XAResource getXAResource() throws ResourceException { - if (!supportsXA) { - throw new NotSupportedException("XA transaction not supported"); - } - try { - checkIfDestroyed(); - ConnectorStatus.getConnectorStatus().logAPI( - "TSManagedConnection.getXAResource", "", "xacon.getXAResource"); - return xacon.getXAResource(this); - } catch (Exception ex) { - throwResourceException(ex); - return null; - } - } - - /* - * @name getLocalTransaction - * - * @desc Returns an jakarta.resource.spi.LocalTransaction instance. - * - * @return LocalTransaction - * - * @exception ResourceException - */ - @Override - public LocalTransaction getLocalTransaction() throws ResourceException { - if (!supportsLocalTx) { - throw new NotSupportedException("Local transaction not supported"); - } else { - checkIfDestroyed(); - ConnectorStatus.getConnectorStatus().logAPI( - "TSManagedConnection.getLocalTransaction", "", - "LocalTransactionImpl"); - return new LocalTransactionImpl(this); - } - } - - /* - * @name getMetaData - * - * @desc Gets the metadata information for this connection's underlying EIS - * resource manager instance. - * - * @return ManagedConnectionMetaData - * - * @exception ResourceException - */ - @Override - public ManagedConnectionMetaData getMetaData() throws ResourceException { - checkIfDestroyed(); - return new MetaDataImpl(this); - } - - /* - * @name setLogWriter - * - * @desc Sets the log writer for this ManagedConnection instance. - * - * @param PrintWriter - * - * @exception ResourceException - */ - @Override - public void setLogWriter(PrintWriter out) throws ResourceException { - this.logWriter = out; - } - - /* - * @name getLogWriter - * - * @desc Gets the log writer for this ManagedConnection instance. - * - * @return PrintWriter - * - * @exception ResourceException - */ - @Override - public PrintWriter getLogWriter() throws ResourceException { - return logWriter; - } - - /* - * @name getTSConnection - * - * @desc Returns the Jdbc Connection. - * - * @return PrintWriter - * - * @exception ResourceException - */ - public TSConnection getTSConnection() throws ResourceException { - checkIfDestroyed(); - return con; - } - - /* - * @name isDestroyed - * - * @desc Checks if the connection is destroyed. - * - * @return boolean - */ - - boolean isDestroyed() { - return destroyed; - } - - /* - * @name getPasswordCredential - * - * @desc Gets the PasswordCredential. - * - * @return String - */ - public PasswordCredential getPasswordCredential() { - return passCred; - - } - - /* - * @name sendEvent - * - * @desc Send an Event . - * - * @param int, Exception - */ - void sendEvent(int eventType, Exception ex) { - ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.sendEvent", - "eventType|ex", ""); - jdbcListener.sendEvent(eventType, ex, null); - } - - /* - * @name sendEvent - * - * @desc Send an Event . - * - * @param int, Exception, Object - */ - void sendEvent(int eventType, Exception ex, Object connectionHandle) { - ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.sendEvent", - "eventType|ex|connectionHandle", ""); - jdbcListener.sendEvent(eventType, ex, connectionHandle); - } - - /* - * @name removeTSConnection - * - * @desc Removes a connection from the connection pool. - * - * @param TSEISConnection - */ - public void removeTSConnection(TSEISConnection jdbcCon) { - ConnectorStatus.getConnectorStatus() - .logAPI("TSManagedConnection.removeTSConnection", "jdbcCon", ""); - connectionSet.remove(jdbcCon); - } - - /* - * @name addTSConnection - * - * @desc Add a connection to the connection pool. - * - * @param TSEISConnection - */ - public void addTSConnection(TSEISConnection jdbcCon) { - ConnectorStatus.getConnectorStatus() - .logAPI("TSManagedConnection.addTSConnection", "jdbcCon", ""); - connectionSet.add(jdbcCon); - } - - /* - * @name checkIfDestroyed - * - * @desc Checks if the connection is destroyed. - * - * @param TSEISConnection - */ - private void checkIfDestroyed() throws ResourceException { - if (destroyed) { - throw new IllegalStateException("Managed connection is closed"); - } - } - - /* - * @name getManagedConnectionFactory - * - * @desc Gets a managed connection factory instance. - * - * @return ManagedConnectionFactory - */ - public ManagedConnectionFactory getManagedConnectionFactory() { - ConnectorStatus.getConnectorStatus().logAPI( - "TSManagedConnection.getManagedConnectionFactory", "", - "ManagedConnectionFactory"); - return mcf; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java deleted file mode 100644 index 0ac23b3a80..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)TSResourceManager.java 1.0 06/06/02 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Enumeration; -import java.util.Hashtable; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -/** - * Resource Manager for the TSeis. Completely based on JTS. - * - * @version 1.0, 06/06/02 - * @author Binod P.G - */ -public class TSResourceManager { - - private boolean opened = false; - - private Hashtable association = new Hashtable(); - - /** - * Creates the Resource Manager. - */ - public TSResourceManager() { - openRM(); - } - - /** - * Opens the Resource Manager. - */ - public void openRM() { - if (!opened) { - opened = true; - } - } - - /** - * Closes the Resource Manager. - */ - public void closeRM() { - opened = false; - association.clear(); - } - - /** - * Starts the new Global Transaction branch. transaction can be started in - * three ways. - *

- * 1. With no flags (TMNOFLAGS) : This is starting a new transaction - *

- *

- * 2. With join flag(TMJOIN) : This is joining new transaction - *

- *

- * 3. With resume flag(TRESUME) : This is resuming a suspended transaction - *

- * - * @param xid - * Global Id for the transaction. - * @param flags - * Flags used for Transaction. For more details see JTA spec. - * @param con - * Connection involved in the Global Transaction. - * @throws XAExcpetion - * In case of a failure / Invalid flag / Invalid XA protocol. - */ - public void start(Xid xid, int flags, TSConnection con) throws XAException { - System.out.println("start." + flags + "." + xid + "..." + con); - sanityCheck(xid, flags, "start"); - - if (flags == XAResource.TMNOFLAGS) { - TSXaTransaction txn = new TSXaTransaction(xid); - txn.setStatus(TSXaTransaction.STARTED); - if (con != null) - txn.addConnection(con); - association.put(xid, txn); - } else if (flags == XAResource.TMJOIN) { - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (con != null) - txn.addConnection(con); - association.put(xid, txn); - } else if (flags == XAResource.TMRESUME) { - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - txn.setStatus(TSXaTransaction.STARTED); - association.put(xid, txn); - } - } - - /** - * Ends the Global Transaction branch. - * - * @param xid - * Global Id for the transaction. - * @param flags - * Flags used for Transaction. For more details see JTA spec. - * @throws XAExcpetion - * In case of a failure / Invalid flag / Invalid XA protocol. - */ - public void end(Xid xid, int flags) throws XAException { - sanityCheck(xid, flags, "end"); - - int status = 0; - if (flags == XAResource.TMFAIL) - status = TSXaTransaction.ENDFAILED; - if (flags == XAResource.TMSUSPEND) - status = TSXaTransaction.SUSPENDED; - if (flags == XAResource.TMSUCCESS) - status = TSXaTransaction.ENDSUCCESSFUL; - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - txn.setStatus(status); - association.put(xid, txn); - } - - /** - * Prepare the Global Transaction branch. - * - * @param xid - * Global Id for the transaction. - * @throws XAExcpetion - * In case of a failure / Invalid XA protocol. - */ - public int prepare(Xid xid) throws XAException { - sanityCheck(xid, XAResource.TMNOFLAGS, "prepare"); - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - int ret; - try { - ret = txn.prepare(); - } catch (XAException xe) { - // If an prepare fails, Transaction Manager doesnt need to rollback - // the transaction explicitely. So remove the particular xid. - System.out.println("Self.rollbak"); - txn.rollback(); - association.remove(xid); - throw xe; - } - txn.setStatus(TSXaTransaction.PREPARED); - association.put(xid, txn); - return ret; - } - - /** - * Commits the Global Transaction branch. - * - * @param xid - * Global Id for the transaction. - * @throws XAExcpetion - * In case of a failure / Invalid XA protocol. - */ - public void commit(Xid xid, boolean onePhase) throws XAException { - - if (onePhase) { - sanityCheck(xid, XAResource.TMNOFLAGS, "1pccommit"); - } else { - sanityCheck(xid, XAResource.TMNOFLAGS, "2pccommit"); - } - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - - if (txn != null) { - try { - txn.commit(onePhase); - } catch (XAException eb) { - throw new XAException(XAException.XA_RBROLLBACK); - } catch (Exception e) { - throw new XAException(XAException.XAER_RMERR); - } finally { - association.remove(xid); - } - } - } - - /** - * Rolls back the Global Transaction branch. - * - * @param xid - * Global Id for the transaction. - * @throws XAExcpetion - * In case of a failure / Invalid XA protocol. - */ - public void rollback(Xid xid) throws XAException { - - sanityCheck(xid, XAResource.TMNOFLAGS, "rollback"); - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn != null) { - try { - txn.rollback(); - } catch (Exception e) { - throw new XAException(XAException.XAER_RMERR); - } finally { - association.remove(xid); - } - } - } - - /** - * Get the Transaction status of a Connection. - * - * @param con - * Connection involved. - */ - int getTransactionStatus(TSConnection con) { - Enumeration e = association.keys(); - while (e.hasMoreElements()) { - Xid id = (Xid) e.nextElement(); - TSXaTransaction txn = (TSXaTransaction) association.get(id); - Hashtable connections = txn.getConnections(); - Enumeration e1 = connections.keys(); - while (e1.hasMoreElements()) { - TSConnection temp = (TSConnection) e1.nextElement(); - if (con == temp) { - return txn.getStatus(); - } - } - } - return TSXaTransaction.NOTRANSACTION; - } - - /** - * Reads a particular key in a distributed transaction. - * - * @param key - * Key to be read. - * @param con - * Connection involved. - * @throws TSEIExcpetion - * If an error occurs. - */ - DataElement read(String key, TSConnection con) throws TSEISException { - System.out.println("ResourceManager.read"); - Enumeration e = association.keys(); - while (e.hasMoreElements()) { - Xid xid = (Xid) e.nextElement(); - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - Hashtable connections = txn.getConnections(); - if (connections.containsKey(con)) { - return txn.read(key); - } - } - return null; - } - - /** - * Do the sanity check. - * - * @param xid - * Global Id for the transaction branch. - * @param flags - * Flag sent by the Transaction Manager. - * @throws XAExcpetion - * In case of an invalid XA protocol. - */ - private void sanityCheck(Xid xid, int flags, String operation) - throws XAException { - // Sanity checks for the xa_start operation. - if ((operation != null) && (operation.equals("start"))) { - - if (!(flags == XAResource.TMNOFLAGS || flags == XAResource.TMJOIN - || flags == XAResource.TMRESUME)) { - throw new XAException(XAException.XAER_INVAL); - } - - // For TMNOFLAGS xid should not be known to RM. - if (flags == XAResource.TMNOFLAGS) { - if (association.containsKey(xid)) { - throw new XAException(XAException.XAER_DUPID); - } - } - - // For TMJOIN xid should be known to RM. - if (flags == XAResource.TMJOIN) { - if (!association.containsKey(xid)) { - throw new XAException(XAException.XAER_INVAL); - } - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (!(txn.getStatus() == TSXaTransaction.STARTED - || txn.getStatus() == TSXaTransaction.ENDSUCCESSFUL)) { - throw new XAException(XAException.XAER_PROTO); - } - } - - if (flags == XAResource.TMRESUME) { - if (!association.containsKey(xid)) { - throw new XAException(XAException.XAER_INVAL); - } - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn.getStatus() != TSXaTransaction.SUSPENDED) { - throw new XAException(XAException.XAER_PROTO); - } - } - } - - // End operation. - if ((operation != null) && (operation.equals("end"))) { - - if (!(flags == XAResource.TMSUSPEND || flags == XAResource.TMFAIL - || flags == XAResource.TMSUCCESS)) { - throw new XAException(XAException.XAER_INVAL); - } - - if (!association.containsKey(xid)) { - throw new XAException(XAException.XAER_INVAL); - } - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (!(txn.getStatus() == TSXaTransaction.STARTED - || txn.getStatus() == TSXaTransaction.ENDSUCCESSFUL)) { - throw new XAException(XAException.XAER_PROTO); - } - - } - - // Prepare operation. - if ((operation != null) && (operation.equals("prepare"))) { - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn.getStatus() != TSXaTransaction.ENDFAILED - && txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL) { - throw new XAException(XAException.XAER_PROTO); - } - - } - - // 2PC Commit operation. - if ((operation != null) && (operation.equals("2pccommit"))) { - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn.getStatus() != TSXaTransaction.PREPARED) { - throw new XAException(XAException.XAER_PROTO); - } - - } - - // 1PC Commit operation. - if ((operation != null) && (operation.equals("1pccommit"))) { - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL - && txn.getStatus() != TSXaTransaction.ENDFAILED) { - throw new XAException(XAException.XAER_PROTO); - } - - } - - // Rollback operation. - if ((operation != null) && (operation.equals("rollback"))) { - - TSXaTransaction txn = (TSXaTransaction) association.get(xid); - if (txn != null) { - if (txn.getStatus() != TSXaTransaction.PREPARED - && txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL - && txn.getStatus() != TSXaTransaction.ENDFAILED) { - throw new XAException(XAException.XAER_PROTO); - } - } - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java deleted file mode 100755 index e3d1f27f86..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java +++ /dev/null @@ -1,424 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.security.Principal; -import java.util.ArrayList; -import java.util.List; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.work.SecurityContext; -import jakarta.security.auth.message.callback.CallerPrincipalCallback; -import jakarta.security.auth.message.callback.GroupPrincipalCallback; -import jakarta.security.auth.message.callback.PasswordValidationCallback; - -/* - * This is used to facilitate testing of the SecurityContext class. - * The things to note/remember about this class are: - * - there are two types of security scenarios RA's utilize for - * passing creds: Case-1 and Case-2 security. - * Case-1: use creds that are expected to exist on the Appserver - * Case-2: set up mappings in appserver (to map EIS creds to AS creds) - * then the RA can flow EIS creds to AS and let AS handle mappings. - * - a RA can NOT do case-1 and case-2 at the same time. a RA must be - * configured to do only ONE case at a time. (the configuration is usually - * done by AS ina proprietary way. For RI(GFv3), Case-1 is default, and - * Case-2 is done by specifying mapping in domain.xml. - * - CPC *must* be called after GPC and PVC - * - PVC *should* have same creds as CPC - * - due to spec optimization, GPC can be called without CPC but this - * is somewhat controversial and not recommended. - * - */ -public class TSSecurityContext extends SecurityContext { - - private String userName = null; // server side username - - private String password = null; // server side pwd - - private String eisPrincipalName = null; // eis principal name - - private String description = null; - - private String logOutString = null; - - private boolean translationRequired; // true if case 2 security where we need - // to map identities - - private boolean useCPC = true; - - private boolean useGPC = false; - - private boolean usePVC = false; - - private boolean addPrinToExecSubject = false; - - private boolean expectFailure = false; - - public TSSecurityContext(String userName, String password, - String eisPrincipalName, boolean translationRequired) { - this.userName = userName; - this.password = password; - this.eisPrincipalName = eisPrincipalName; - this.translationRequired = translationRequired; - - this.description = super.getDescription(); - - debug("TSSecurityContext: userName=" + userName + " password=" + password - + " eisPrincipalName=" + eisPrincipalName + " translationRequired=" - + translationRequired); - } - - public void setCallbacks(boolean bCPC, boolean bGPC, boolean bPVC) { - this.useCPC = bCPC; - this.useGPC = bGPC; - this.usePVC = bPVC; - } - - public void setUserName(String val) { - this.userName = val; - } - - public String getUserName() { - return this.userName; - } - - public void setPassword(String val) { - this.password = val; - } - - public String getPassword() { - return this.password; - } - - public void setUseCPC(boolean val) { - this.useCPC = val; - } - - public boolean getUseCPC() { - return this.useCPC; - } - - public void setUseGPC(boolean val) { - this.useGPC = val; - } - - public boolean getUseGPC() { - return this.useGPC; - } - - public void setUsePVC(boolean val) { - this.usePVC = val; - } - - public boolean getUsePVC() { - return this.usePVC; - } - - public void setAddPrinToExecSubject(boolean val) { - this.addPrinToExecSubject = val; - } - - public boolean getAddPrinToExecSubject() { - return this.addPrinToExecSubject; - } - - public void setDescription(String val) { - this.description = val; - } - - public String getDescription() { - return this.description; - } - - public void setLogOutString(String val) { - this.logOutString = val; - } - - public String getLogOutString() { - return this.logOutString; - } - - public boolean isTranslationRequired() { - return translationRequired; - } - - public void setExpectFailure(boolean val) { - this.expectFailure = val; - } - - public boolean getExpectFailure() { - return this.expectFailure; - } - - /* - * This is used to help verify assertion Connector:SPEC:229, which states a - * couple requirements with the following being focused on within this method: - * "The following conditions are applicable to the application server provider - * while calling the setupSecurityContext method: the CallbackHandler - * implementation passed as the argument handler to setupSecurityContext must - * support the following JSR-196 Callbacks: CallerPrincipalCallback, - * GroupPrincipalCallback, and PasswordValidationCallback" - * - * Mostly, this is here to verify that the 3 main callbacks are supported by - * the vendors app server and that they can be used with a a couple different - * scenarios (eg. calling some but not all callbacks, or using null - * principals, etc) - * - * Related notes on testing callbacks: 1. must call CPC after PVC (CPC and PVC - * should use same user identities) 2. PVC is for case-1 security only (not - * case-2 of mapping) 3. It's not spec required but recommended we call CPC - * after GPC though there is allowance for a spec optimization which would - * allow calling GPC without CPC but its a somewhat controversial optimization - * so for now, if you have a GPC, you should follow with a CPC 4. CPC can be - * alone 5. if CPC is called, it basically trumps PVC/GPC so it shouldnt even - * matter what is in PVC/GPC. - * - */ - public void doCallbackVerification(CallbackHandler callbackHandler, - Subject execSubject, Subject serviceSubject) { - - List callbacks = new ArrayList(); - PasswordValidationCallback pvc = null; - GroupPrincipalCallback gpc = null; - CallerPrincipalCallback cpc = null; - String[] gpcGroups = { "phakegrp1", "phakegrp2" }; - - debug("doCallbackVerification(): translationRequired = " - + translationRequired); - - if (addPrinToExecSubject && (userName != null)) { - debug("doCallbackVerification(): adding principal: " + userName - + " to execSubject."); - execSubject.getPrincipals().add(new SimplePrincipal(userName, password)); - } - - if (useGPC) { - // we are passing invalid grps to the GPC but it should not - // matter if the CPC is specified after the GPC. - gpc = new GroupPrincipalCallback(execSubject, gpcGroups); - debug( - "doCallbackVerification(): - GPC with groups={phakegrp1, phakegrp2}"); - callbacks.add(gpc); - } - - if (usePVC && !translationRequired) { - // per JCA 1.6 spec (16.4.2) PVC can be used in Case-1 only. - // NOTE: PVC user should match that of CPC - debug("doCallbackVerification(): initializing PVC"); - char[] pwd = null; - if (password != null) { - // if password is supplied - use that first - pwd = password.toCharArray(); - } - - if (userName != null) { - // if userName is supplied - use that first - pvc = new PasswordValidationCallback(execSubject, userName, pwd); - debug("setting PVC with user [ " + userName + " ] + password [ " - + password + " ]"); - } else { - // the spec is unclear about initializating a PasswordValidationCallback - // with a null - // username so we should probably use something like a fake user name. - // worth noting that the javadoc allows for null pwd. - pvc = new PasswordValidationCallback(execSubject, "fk_usr", null); - debug("setting PVC with user=fk_usr and password=null"); - } - callbacks.add(pvc); - } - - if (usePVC || useCPC) { - if (translationRequired && (eisPrincipalName != null)) { - // lets translate/map EIS to server domain prins - debug("translationRequired, setting CPC with principal : " - + eisPrincipalName); - cpc = new CallerPrincipalCallback(execSubject, - new SimplePrincipal(eisPrincipalName)); - } else if (!translationRequired && (userName != null)) { - debug( - "No translationRequired, setting CPC with userName : " + userName); - cpc = new CallerPrincipalCallback(execSubject, userName); - } else { - debug("setting CPC with null Principal"); - cpc = new CallerPrincipalCallback(execSubject, (Principal) null); - } - - callbacks.add(cpc); - } - - Callback callbackArray[] = new Callback[callbacks.size()]; - try { - callbackHandler.handle(callbacks.toArray(callbackArray)); - - // if we made it here, then no exceptions - we can assume success since - // we got no unsupported callback exceptions. - String sval = ""; - if (this.logOutString != null) { - sval = this.logOutString; - } else { - sval = "setupSecurityContext callbackhandler supports required callback types."; - } - ConnectorStatus.getConnectorStatus().logState(sval); - debug(sval); - - // we shouldn't need to check if authentication succeeded - but for debug - // purposes we will keep this here? - if (!translationRequired && usePVC && (pvc != null) - && (!pvc.getResult())) { - debug("doCallbackVerification(): PVC failed"); - // ConnectorStatus.getConnectorStatus().logState("PVC failed"); - } else if (!translationRequired && usePVC && (pvc != null)) { - debug("doCallbackVerification(): PVC succeeded"); - // ConnectorStatus.getConnectorStatus().logState("PVC succeeded"); - } - - } catch (UnsupportedCallbackException e) { - String sval = ""; - if (this.expectFailure && (this.logOutString != null)) { - sval = "Expected Exception: " + this.logOutString; - } else { - sval = "doCallbackVerification(): callbackhandler does not support a required callback type!"; - } - ConnectorStatus.getConnectorStatus().logState(sval); - debug(sval); - debug("UnsupportedCallbackException message is : " + e.getMessage()); - e.printStackTrace(); - - } catch (Exception e) { - String sval = ""; - if (this.expectFailure && (this.logOutString != null)) { - sval = "Expected Exception: " + this.logOutString; - } else { - sval = "doCallbackVerification(): callbackhandler threw unexpected exception!"; - } - ConnectorStatus.getConnectorStatus().logState(sval); - debug(sval); - e.printStackTrace(); - debug("doCallbackVerification(): exception occured : " + e.getMessage()); - } - - } - - /* - * - * The executionSubject arg must be non-null and it must not be read-only. It - * is expected that this method will populate this executionSubject with - * principals and credentials that would be flown into the application server. - * - * The serviceSubject argument may be null. If it is not null, it must not be - * read-only. (from ee spec, section 16.4.1) Note: this differs from javadoc - * comments and insuch case, spec takes precedence. The serviceSubject - * represents the application server and it may be used by the Work - * implementation to retrieve Principals and credentials necessary to - * establish a connection to the EIS (in the cause of mutual-auth like - * scenarios). If the Subject is not null, the Work implementation may collect - * the server cred as necessary, by using the callback handler passed to them - * . - */ - @Override - public void setupSecurityContext(CallbackHandler callbackHandler, - Subject execSubject, Subject serviceSubject) { - - // validate args are spec compliant - validateCallbackHandler(callbackHandler); - validateExecSubject(execSubject); - validateServiceSubject(serviceSubject); - - // now make sure the 3 callback types are supported by the App Server - doCallbackVerification(callbackHandler, execSubject, serviceSubject); - - } - - /* - * this method is used to perform a simple validation that the callbackHandler - * is spec compliant per assertion Connector:SPEC:229 - */ - private void validateCallbackHandler(CallbackHandler callbackHandler) { - String str = ""; - - // assist with assertion Connector:SPEC:229 - if (callbackHandler != null) { - str = "setupSecurityContext() called with non-null callbackHandler"; - } else { - str = "setupSecurityContext() called with invalid (null) callbackHandler"; - } - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - - } - - /* - * this method is used to perform a simple validation that the execSubject is - * spec compliant per assertion Connector:SPEC:230 - */ - private void validateExecSubject(Subject execSubject) { - String str = ""; - - if ((execSubject != null) && (!execSubject.isReadOnly())) { - str = "setupSecurityContext() called with valid executionSubject"; - } else { - str = "ERROR: setupSecurityContext() called with invalid executionSubject"; - } - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - - } - - /* - * this method is used to perform a simple validation that the serviceSubject - * is spec compliant per assertion Connector:SPEC:231 - */ - private void validateServiceSubject(Subject serviceSubject) { - String str = ""; - - if (serviceSubject == null) { - // this is allowed according to jca spec setion 16.4.1 - str = "setupSecurityContext() called with valid serviceSubject"; - } else if ((serviceSubject != null) && (!serviceSubject.isReadOnly())) { - // this is good: if serviceSubject != null, then it must not be readonly - str = "setupSecurityContext() called with valid serviceSubject"; - } else if ((serviceSubject != null) && (serviceSubject.isReadOnly())) { - // ohoh, serviceSubject !=null but it is readonly and this is not valid! - str = "setupSecurityContext() called with invalid executionSubject"; - } - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - - } - - public String toString() { - StringBuffer toString = new StringBuffer("{"); - toString.append("userName : " + userName); - toString.append(", password : " + password); - toString.append(", eisPrincipalName : " + eisPrincipalName); - toString.append(", translationRequired : " + translationRequired); - toString.append("}"); - return toString.toString(); - } - - public void debug(String message) { - Debug.trace(message); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java deleted file mode 100644 index c958330646..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.ConnectionEventListener; - -public class TSXAConnectionImpl implements TSXAConnection { - - public TSXAConnectionImpl() { - - } - - public XAResource getXAResource(TSManagedConnection mc) throws Exception { - System.out.println("TSXAConnectionImpl.getXAResource"); - XAResourceImpl xaimpl = new XAResourceImpl(mc); - return xaimpl; - } - - public TSConnection getConnection() throws Exception { - try { - - TSConnection ctscon = TSeis.getTSeis().getConnection(); - System.out.println("TSXAConnectionImpl.getConnection"); - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionImpl.getConnection", "", ""); - return ctscon; - } catch (Exception ex) { - ex.getMessage(); - return null; - } - } - - public TSConnection getConnection(String user, char[] password) - throws Exception { - try { - - TSConnection ctscon = TSeis.getTSeis().getConnection(user, password); - ConnectorStatus.getConnectorStatus() - .logAPI("TSConnectionImpl.getConnection", "", ""); - return ctscon; - } catch (Exception ex) { - ex.getMessage(); - return null; - } - } - - public void close() throws Exception { - - } - - public void addConnectionEventListener(ConnectionEventListener listener) { - - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java deleted file mode 100644 index b66031bacf..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)TSXaTransaction.java 1.0 06/06/02 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Enumeration; -import java.util.Hashtable; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -/** - * Class representing one Global Transaction. - * - * @version 1.0, 06/06/02 - * @author Binod P.G - */ -public class TSXaTransaction { - - /** No Transaction . Default status **/ - static final int NOTRANSACTION = 0; - - /** Status indicating that Transaction has started **/ - static final int STARTED = 1; - - /** Status indicating that Transaction has been suspended **/ - static final int SUSPENDED = 2; - - /** Status indicating that Transaction has been ended with a failure **/ - static final int ENDFAILED = 3; - - /** Status indicating that Transaction has been ended with a success **/ - static final int ENDSUCCESSFUL = 4; - - /** Status indicating that Transaction has been prepared **/ - static final int PREPARED = 5; - - /** Field storing the status values **/ - private int status = 0; - - /** Connections involved in one transaction branch. Specifications doesnt **/ - /** stop from having more than one connection in global transaction **/ - private Hashtable connections = new Hashtable(); - - /** Id of the transaction **/ - private Xid xid; - - /** - * Creates a new Global Transaction object. - * - * @param id - * Global Transaction Identifier. - */ - public TSXaTransaction(Xid id) { - this.xid = id; - } - - /** - * Adds the connection to this transaction. - * - * @param con - * Connection involved in the transaction branch. - */ - public void addConnection(TSConnection con) { - connections.put(con, ""); - } - - /** - * Return the connections involved as a hashtable. - * - * @return Connections. - */ - Hashtable getConnections() { - return connections; - } - - /** - * Sets the Status of the transaction. - * - * @param Status - * of the transaction - */ - public void setStatus(int status) { - this.status = status; - } - - /** - * Get the status of the transaction. - * - * @return Status of the transaction. - */ - public int getStatus() { - return this.status; - } - - /** - * Prepare the transaction. - * - * @return The Vote of this branch in this transaction. - * @throws XAException - * If prepare fails. - */ - public int prepare() throws XAException { - System.out.println("TsXaTransaction.prepare"); - Hashtable ht = prepareTempTable(); - - Enumeration e = ht.keys(); - while (e.hasMoreElements()) { - System.out.println("TSXaTransaction.prepare.inTheLoop"); - String key = (String) e.nextElement(); - DataElement de = (DataElement) ht.get(key); - - if (de.getStatus() == DataElement.INSERTED) { - try { - TSeis.getTSeis().prepareInsert(de, xid); - } catch (TSEISException ex) { - throw new XAException(XAException.XA_RBROLLBACK); - } - } - if (de.getStatus() == DataElement.UPDATED - || de.getStatus() == DataElement.DELETED) { - System.out.println("TSXaTransaction.prepare.updatePrepare"); - try { - TSeis.getTSeis().prepareChange(de, xid); - } catch (TSEISException ex) { - throw new XAException(XAException.XA_RBROLLBACK); - } - } - } - return XAResource.XA_OK; - } - - // Creates one temp table for the transaction. - private Hashtable prepareTempTable() { - System.out.println("TSXaTransaction.prepareTempTable"); - Hashtable temptable = new Hashtable(); - - Enumeration e = connections.keys(); - - while (e.hasMoreElements()) { - System.out.println("TSXaTransaction.prepareTempTable.inTheLoop"); - TSConnection con = (TSConnection) e.nextElement(); - Hashtable temp = con.getTempTable(); - - Enumeration e1 = temp.keys(); - while (e1.hasMoreElements()) { - String key = (String) e1.nextElement(); - DataElement de = (DataElement) temp.get(key); - - if (temptable.containsKey(key)) { - DataElement de1 = (DataElement) temptable.get(key); - // Latest version should be used - if (de.getVersion() >= de1.getVersion()) { - temptable.put(key, de); - } - } else { - temptable.put(key, de); - } - } - con.rollback(); - } - - return temptable; - } - - /** - * Commits this Transaction. - * - * @param Boolean - * indicating, whether it is a single-phase or 2-phase commit. - * @throws XAException - * If commit fails. - */ - public void commit(boolean onePhase) throws XAException { - System.out.println("TsXaTransaction.commit." + onePhase); - if (onePhase) { - Hashtable ht = prepareTempTable(); - - Enumeration e = ht.keys(); - while (e.hasMoreElements()) { - String key = (String) e.nextElement(); - DataElement de = (DataElement) ht.get(key); - - if (de.getStatus() == DataElement.INSERTED) { - try { - TSeis.getTSeis().actualInsert(de); - } catch (TSEISException ex) { - throw new XAException(XAException.XA_RBROLLBACK); - } - } - if (de.getStatus() == DataElement.UPDATED) { - try { - TSeis.getTSeis().actualUpdate(de); - } catch (TSEISException ex) { - throw new XAException(XAException.XA_RBROLLBACK); - } - } - if (de.getStatus() == DataElement.DELETED) { - try { - TSeis.getTSeis().actualDelete(de.getKey()); - } catch (TSEISException ex) { - throw new XAException(XAException.XA_RBROLLBACK); - } - } - } - } else { - TSeis.getTSeis().commit(xid); - } - } - - /** - * Rolls back the transaction - */ - public void rollback() { - if (status == PREPARED) { - TSeis.getTSeis().rollback(xid); - } else { - Enumeration e = connections.keys(); - - while (e.hasMoreElements()) { - TSConnection con = (TSConnection) e.nextElement(); - con.rollback(); - } - } - } - - /** - * Check for the key in the transaction. If it is not readable return null. - * - * @param elementkey - * Key to be read. - * @return DataElement object. - * @throws TSEISException - * In case, read fails. - */ - public DataElement read(String elementkey) throws TSEISException { - Hashtable temptable = new Hashtable(); - Enumeration e = connections.keys(); - - while (e.hasMoreElements()) { - TSConnection con = (TSConnection) e.nextElement(); - Hashtable temp = con.getTempTable(); - - Enumeration e1 = temp.keys(); - while (e1.hasMoreElements()) { - String key = (String) e1.nextElement(); - DataElement de = (DataElement) temp.get(key); - - if (temptable.containsKey(key)) { - DataElement de1 = (DataElement) temptable.get(key); - // Latest version should be used - if (de.getVersion() >= de1.getVersion()) { - temptable.put(key, de); - } - } else { - temptable.put(key, de); - } - } - } - - if (temptable.containsKey(elementkey)) { - DataElement de = (DataElement) temptable.get(elementkey); - if (de.getStatus() == DataElement.DELETED) { - throw new TSEISException("Data deleted"); - } else { - return de; - } - } else { - return null; - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java deleted file mode 100644 index 8156363599..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java +++ /dev/null @@ -1,386 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Vector; - -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -public class TSeis { - - private static TSeis eis; - - private Hashtable permtable = new Hashtable(); - - private boolean commitflag = true; - - private TSConnectionImpl con1 = null; - - private TSConnectionImpl con2 = null; - - private TSConnectionImpl con3 = null; - - private TSConnectionImpl con4 = null; - - private TSConnectionImpl con5 = null; - - private Vector conset = null; - - public TSResourceManager rm = new TSResourceManager(); - - /** - * Singleton constructor - */ - private TSeis() { - conset = new Vector(); - con1 = new TSConnectionImpl(); - con2 = new TSConnectionImpl(); - con3 = new TSConnectionImpl(); - con4 = new TSConnectionImpl(); - con5 = new TSConnectionImpl(); - conset.addElement(con1); - conset.addElement(con2); - conset.addElement(con3); - conset.addElement(con4); - conset.addElement(con5); - } - - /** - * Singleton accessor - */ - public static TSeis getTSeis() { - if (eis == null) { - eis = new TSeis(); - } - return eis; - } - - public synchronized TSConnection getConnection() { - ConnectorStatus.getConnectorStatus().logAPI("TSeis.getConnection", "", ""); - TSConnectionImpl con; - - for (int i = 0; i < conset.size(); i++) { - con = (TSConnectionImpl) conset.elementAt(i); - if (con.lease()) { - return con; - } - } - - con = new TSConnectionImpl(); - con.lease(); - conset.addElement(con); - return con; - } - - public synchronized TSConnection getConnection(String usr, char[] passwd) { - ConnectorStatus.getConnectorStatus().logAPI("TSeis.getConnection", - "usr,passwd", ""); - System.out.println("User is " + usr); - if ((usr.equals("cts1") && passwd[0] == 'c' && passwd[1] == 't' - && passwd[2] == 's' && passwd[3] == '1') - || (usr.equals("cts2") && passwd[0] == 'c' && passwd[1] == 't' - && passwd[2] == 's' && passwd[3] == '2')) { - System.out.println("Passwd lenght is " + passwd.length); - - for (int in = 0; in < passwd.length; in++) { - System.out.println("Password 3 is " + passwd[in]); - } - TSConnectionImpl con; - - for (int i = 0; i < conset.size(); i++) { - con = (TSConnectionImpl) conset.elementAt(i); - if (con.lease()) { - return con; - } - } - - con = new TSConnectionImpl(); - con.lease(); - conset.addElement(con); - return con; - } else { - System.out.println("Connection null returned"); - return null; - } - } - - public DataElement read(String key, TSConnection con) throws TSEISException { - - DataElement de = null; - if (permtable.containsKey(key)) { - de = (DataElement) permtable.get(key); - } - - // Lets see if resource manager can read from a distributed transaction? - DataElement element = rm.read(key, con); - - // May be connection is only in a local transaction. So read from - // the connection cache. - DataElement localElement = null; - Hashtable tempTable = con.getTempTable(); - if (tempTable.containsKey(key)) { - localElement = (DataElement) tempTable.get(key); - } - - if (de == null && element == null && localElement == null) { - throw new TSEISException("Data not found."); - } - if (element != null) { - return element; - } else if (localElement != null) { - return localElement; - } else { - return de; - } - } - - public String readValue(String key, TSConnection con) throws TSEISException { - - DataElement de = read(key, con); - return de.getValue(); - } - - public void insert(String key, String value, TSConnection con) - throws TSEISException { - - boolean datapresent = false; - - try { - read(key, con); - datapresent = true; - } catch (TSEISException tse) { - } - - if (datapresent) - throw new TSEISException("Duplicate Key"); - - DataElement de = new DataElement(key, value); - - if ((getResourceManager() - .getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) - && con.getAutoCommit()) { - de.setStatus(DataElement.COMMITTED); - System.out.println("TSeis.insert.permtable"); - permtable.put(key, de); - } else { // if (getResourceManager().getTransactionStatus(con) == - // TSResourceManager.INTRANSACTION) - System.out.println("TSeis.insert.temptable"); - de.setStatus(DataElement.INSERTED); - con.getTempTable().put(key, de); - } - } - - public void update(String key, String value, TSConnection con) - throws TSEISException { - DataElement de = read(key, con); - de.updateVersion(); - de.setValue(value); - if ((getResourceManager() - .getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) - && con.getAutoCommit()) { - de.setStatus(DataElement.COMMITTED); - System.out.println("TSeis.update.permtable"); - permtable.put(key, de); - } else { // if (getResourceManager().getTransactionStatus(con) == - // TSResourceManager.INTRANSACTION) - System.out.println("TSeis.update.temptable"); - if (de.getStatus() != DataElement.INSERTED) { - de.setStatus(DataElement.UPDATED); - } - System.out.println("TSeis.update." + de.getKey() + de.getValue()); - con.getTempTable().put(key, de); - } - } - - public void delete(String key, TSConnection con) throws TSEISException { - DataElement de = read(key, con); - if ((getResourceManager() - .getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) - && con.getAutoCommit()) { - System.out.println("TSeis.delete.permtable"); - permtable.remove(key); - } else { // if (getResourceManager().getTransactionStatus(con) == - // TSResourceManager.INTRANSACTION) - System.out.println("TSeis.delete.temptable"); - de.setStatus(DataElement.DELETED); - con.getTempTable().put(key, de); - } - } - - public void returnConnection(TSConnectionImpl con) { - con.expireLease(); - } - - public void dropTable() { - ConnectorStatus.getConnectorStatus().logAPI("TSeis.dropTable", "", ""); - permtable.clear(); - ConnectorStatus.getConnectorStatus().logAPI("Table Dropped ", "", ""); - } - - public void setAutoCommit(boolean flag) { - commitflag = flag; - } - - public boolean getAutoCommit() { - return commitflag; - } - - public Vector readData() { - System.out.println("TSeis.readData"); - Vector v = new Vector(); - Enumeration e = permtable.keys(); - while (e.hasMoreElements()) { - DataElement de = (DataElement) permtable.get((String) e.nextElement()); - System.out.println("TSeis.readData." + de.getValue()); - v.add(de.getValue()); - } - return v; - } - - private void copyVector(Vector v1, Vector v2) { - int size = v1.size(); - - v2.clear(); - for (int i = 0; i < size; i++) { - String str1 = (String) v1.get(i); - v2.add(i, new String(str1)); - } - } - - // **** Implementing Resource Manager for Local Transaction **********// - - public void begin() { - ConnectorStatus.getConnectorStatus().logAPI("TSeis.begin", "", ""); - } - - public void commit(TSConnection con) throws TSEISException { - Hashtable ht = con.getTempTable(); - Enumeration e = ht.keys(); - while (e.hasMoreElements()) { - String key = (String) e.nextElement(); - DataElement de = (DataElement) ht.get(key); - if (de.getStatus() == DataElement.INSERTED) { - actualInsert(de); - } - if (de.getStatus() == DataElement.UPDATED) { - actualUpdate(de); - } - if (de.getStatus() == DataElement.DELETED) { - actualDelete(de.getKey()); - } - } - } - - void actualInsert(DataElement de) throws TSEISException { - if (permtable.containsKey(de.getKey())) { - throw new TSEISException("Duplicate Key"); - } - de.setStatus(DataElement.COMMITTED); - permtable.put(de.getKey(), de); - } - - void actualUpdate(DataElement de) throws TSEISException { - DataElement element = (DataElement) permtable.get(de.getKey()); - if (element.getStatus() == DataElement.PREPARED) { - throw new TSEISException("Cannot update now. 2PC in progress"); - } - de.setStatus(DataElement.COMMITTED); - permtable.put(de.getKey(), de); - } - - void actualDelete(String key) throws TSEISException { - if (permtable.containsKey(key)) { - DataElement element = (DataElement) permtable.get(key); - if (element.getStatus() == DataElement.PREPARED) { - throw new TSEISException("Cannot update now. 2PC in progress"); - } - permtable.remove(key); - } - } - - void prepareInsert(DataElement de, Xid xid) throws TSEISException { - if (permtable.containsKey(de.getKey())) { - throw new TSEISException("Duplicate Key"); - } - DataElement element = new DataElement(de.getKey(), de.getValue()); - element.prepare(de, xid); - permtable.put(element.getKey(), element); - } - - void prepareChange(DataElement de, Xid xid) throws TSEISException { - DataElement element = (DataElement) permtable.get(de.getKey()); - DataElement prepElement = new DataElement(de.getKey()); - prepElement.prepare(de, xid); - permtable.put(element.getKey(), prepElement); - } - - // ****** Ending implementation for Resource Manager for Local Transaction - // *****// - - // ******Implementating Resource Manager for XA Transaction *****// - - public void commit(Xid xid) { - System.out.println("Tseis.commit.xid"); - Enumeration e = permtable.keys(); - while (e.hasMoreElements()) { - System.out.println("commit.inTheLoop"); - String key = (String) e.nextElement(); - DataElement de = (DataElement) permtable.get(key); - if (de.getStatus() == DataElement.PREPARED && de.getXid() == xid) { - DataElement element = de.getPreparedValue(); - if (element.getStatus() == DataElement.DELETED) { - System.out.println("commit.delete"); - permtable.remove(element.getKey()); - } else { - System.out.println("commit.update"); - element.setStatus(DataElement.COMMITTED); - permtable.put(element.getKey(), element); - } - } - } - } - - public void rollback(Xid xid) { - System.out.println("Tseis.rollback.xid"); - Enumeration e = permtable.keys(); - while (e.hasMoreElements()) { - String key = (String) e.nextElement(); - DataElement de = (DataElement) permtable.get(key); - if (de.getStatus() == DataElement.PREPARED && de.getXid() == xid) { - // Revert the state to commit so that, prepared value becomes unusable - de.setStatus(DataElement.COMMITTED); - permtable.put(de.getKey(), de); - } - } - } - - public TSResourceManager getResourceManager() { - return rm; - } - - // ****** Ending implementation for Resource Manager for XA Transaction - // *****// - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java deleted file mode 100644 index 91dbe99a76..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java +++ /dev/null @@ -1,203 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Timer; - -import javax.transaction.xa.Xid; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.XATerminator; -import jakarta.resource.spi.work.WorkManager; -import jakarta.transaction.TransactionSynchronizationRegistry; - -public class TestBootstrapContext { - - private BootstrapContext bsc; - - private WorkManager wrkmgr; - - private Timer timer1; - - private Timer timer2; - - public TestBootstrapContext(BootstrapContext bsc) { - this.bsc = bsc; - } - - public void runTests() { - Debug.trace("Inside TestBootStrapContext.runTests"); - testTimer(); - testXATerminator(); - testIsContextSupported(); - testTransactionSynchronizationRegistry(); - testTSRLookup(); - } - - public void testTSRLookup() { - try { - // This lookup must work for JavaEE but is not guaranteed to - // be supported in JCA standalone environment. - // the only test that actually checks for this is in the - // src/com/sun/ts/tests/xa/ee/tsr code which is NOT part of - // standalone JCA tck. - TSNamingContext ncxt = new TSNamingContext(); - String tsrStr = "java:comp/TransactionSynchronizationRegistry"; - Object obj = (Object) ncxt.lookup(tsrStr); - if (obj != null) { - ConnectorStatus.getConnectorStatus().logState("TSR Lookup Successful"); - Debug.trace("TSR Lookup Successful"); - } else { - Debug.trace("TSR Null"); - } - } catch (Throwable ex) { - Debug.trace("Exception when calling testTSRLookup()"); - Debug.trace( - "This is okay if JNDI lookup of tsr is not supported in standalone JCA"); - ex.getMessage(); - } - } - - public void testTransactionSynchronizationRegistry() { - try { - // verify server supports TransactionSynchronizationRegistry - // per spec assertion Connector:SPEC:291 - TransactionSynchronizationRegistry tr = bsc - .getTransactionSynchronizationRegistry(); - if (tr != null) { - String str = "getTransactionSynchronizationRegistry supported by Server"; - Debug.trace(str); - ConnectorStatus.getConnectorStatus().logState(str); - } else { - Debug.trace( - "getTransactionSynchronizationRegistry not supported by Server."); - } - - } catch (Throwable ex) { - Debug.trace( - "Exception when calling getTransactionSynchronizationRegistry()"); - ex.getMessage(); - } - } - - private void testTimer() { - try { - timer1 = bsc.createTimer(); - timer2 = bsc.createTimer(); - - Debug.trace("Inside TestBootStrapContext.testTimer()"); - - if (timer1 == null || timer2 == null) { - ConnectorStatus.getConnectorStatus().logState("Timer is Null"); - } else { - if (timer1.equals(timer2)) { - ConnectorStatus.getConnectorStatus() - .logState("Shared Timer Provided by BootstrapContext"); - Debug.trace("Timer is shared or returned the same instance"); - } else { - ConnectorStatus.getConnectorStatus() - .logState("New Timer Provided by BootstrapContext"); - Debug.trace("New Timer Provided by BootstrapContext"); - } - } - - } catch (UnavailableException ex) { - - ConnectorStatus.getConnectorStatus() - .logState("Timer UnavailableException"); - } catch (java.lang.UnsupportedOperationException uex) { - - ConnectorStatus.getConnectorStatus() - .logState("Timer UnsupportedOperationException"); - } - } - - private void testXATerminator() { - try { - XATerminator xt = bsc.getXATerminator(); - wrkmgr = bsc.getWorkManager(); - - TestWorkManager twm = new TestWorkManager(bsc); - - Xid myid = twm.getXid(); - Xid nestxid = twm.getNestXid(); - - if (xt != null) { - ConnectorStatus.getConnectorStatus() - .logState("XATerminator is not null"); - Debug.trace("TestBootStrapContext.testXATerminator XID is " - + myid.getFormatId()); - Debug.trace("TestBootStrapContext.testXATerminator XID is " - + nestxid.getFormatId()); - xt.commit(myid, true); - xt.commit(nestxid, true); - ConnectorStatus.getConnectorStatus().logState("Xid Committed"); - Debug.trace("XATerminator committed xid"); - } - } catch (Throwable ex) { - ex.getMessage(); - } - } - - /* - * This is used to assist in the verification of assertion Connector:SPEC:208 - * this will check that the server supports all 3 types of inflow context of: - * TransactionContext, SecurityContext, and HintsContext. This is verified by - * invoking the servers method of: - * BootstrapContext.isContextSupported(TIC/SIC/HIC). - * - */ - private void testIsContextSupported() { - try { - // verify server supports TransactionContext - Class tic = jakarta.resource.spi.work.TransactionContext.class; - boolean b1 = bsc.isContextSupported(tic); - if (b1) { - Debug.trace("TransactionContext supported by Server."); - ConnectorStatus.getConnectorStatus() - .logState("TransactionContext supported by Server."); - } - - Class sic = jakarta.resource.spi.work.SecurityContext.class; - boolean b2 = bsc.isContextSupported(sic); - if (b2) { - Debug.trace("SecurityContext supported by Server."); - ConnectorStatus.getConnectorStatus() - .logState("SecurityContext supported by Server."); - } - - Class hic = jakarta.resource.spi.work.HintsContext.class; - boolean b3 = bsc.isContextSupported(hic); - if (b3) { - ConnectorStatus.getConnectorStatus() - .logState("HintsContext supported by Server."); - } - - } catch (Throwable ex) { - ex.getMessage(); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java deleted file mode 100644 index eff1c9f23d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java +++ /dev/null @@ -1,783 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.Xid; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.XATerminator; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.WorkCompletedException; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; -import jakarta.resource.spi.work.WorkRejectedException; - -public class TestWorkManager { - - private WorkManager wmgr; - - private static Xid myxid; - - private static Xid mynestxid; - - private XATerminator xa; - - private String sicUser = ""; - - private String sicPwd = ""; - - private String eisUser = ""; - - private LocalTxMessageListener ml; - - private BootstrapContext bsc = null; - - // by default assume Case 1 security where identity is flown-in - // from RA and exists within AppServer security domain - // the alternative is case 2 which requires mapping EIS identity to - // an identity which exists within the AppServer security domain. - private boolean useSecurityMapping = false; - - public TestWorkManager(BootstrapContext val) { - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - this.xa = bsc.getXATerminator(); - - this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - - verifyConfigSettings(); - } - - public void runTests() { - - doWork(); - startWork(); - rogueWork(); - distributableWork(); - scheduleWorkListener(); - scheduleWork(); - submitXidWork(); - submitNestedXidWork(); - - submitSecurityContextWork(); - submitSICWork(); - - testWorkContextProvider(); - testWorkContextLifecycleListener(); - doWorkAndAssoc(); - - doAPITests(); - } - - /* - * There are 2 choices related to establishing Caller identity which need to - * considered when using TSSecurityContextWithListener/TSSecurityContext: - * choice 1: RA flows in an identity to the AppServers security domain. (eg no - * mapping/transalation done the identity is used as-is when passed into the - * App Servers security domain) choice 2: RA flows in an identity that belongs - * to the EIS domain only and a mapping of that identity to an AppServer - * identity then needs to be done to map the EIS id to an id that exists - * within the AppServers security domain. - */ - public void submitSecurityContextWork() { - - if (!useSecurityMapping) { - // case 1: no mappings, identities must exist in security domain. - // PVC is for case 1 only, so do PVC tests in here. - cbTestCPCandNullPrin(); - cbTestAllCallbacksAndPrin(); - cbTestAllCallbacksNullPrin(); - cbTestCPCandPVC(); - cbTestCPCandGPC(); - cbTestCPCandPrin(); - } else { - // case-2: only call this for security mappings tests. - cbTestGPCandCPCFail(); - cbTestEISCPCandPrin(); - } - } - - /* - * Test handling of a CPC - where no principals will be added to the CPC - * subject and the CPC has a non-null principal. This is testing the CPC being - * handled in a case-2 scenario with security-mapping on such that the EIS - * creds need to be used and mapped. - * - */ - public void cbTestEISCPCandPrin() { - String str = "Enterred cbEISTestCPCandPrin() and Testing that A CPC "; - str += "that has nothing added to subject and has a non-null principal is handled"; - debug(str); - - debug("cbTestEISCPCandPrin(): useSecurityMapping SHOULD be true"); - debug( - "cbTestEISCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, useSecurityMapping); - tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString("cbEISTestCPCandPrin: callbacks handled."); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbEISTestCPCandPrin()"); - } - - /* - * Test handling of a CPC - where no principals will be added to the CPC - * subject and the CPC has a non-null principal. (This tests it using Case-1 - * security creds) - */ - public void cbTestCPCandPrin() { - String str = "Enterred cbTestCPCandPrin() and Testing that A CPC "; - str += "that has nothing added to subject and has a null principal is handled"; - debug(str); - - debug("cbTestCPCandPrin(): useSecurityMapping SHOULD be false"); - debug("cbTestCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, - null, useSecurityMapping); - tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString("cbTestCPCandPrin: callbacks handled."); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestCPCandPrin()"); - } - - /* - * Test handling of a CPC - where no principals will be added to the CPC - * execSubject and the CPC has a null principal. Also, this CPC follows a GPC - * and PVC. - */ - public void cbTestAllCallbacksNullPrin() { - - String str = "Enterred cbTestAllCallbacksNullPrin() and Testing a GPC, PVC, and CPC "; - str += "that have nothing added to subject and a null principal are handled"; - debug(str); - - debug("cbTestAllCallbacksNullPrin(): useSecurityMapping SHOULD be false"); - debug("cbTestAllCallbacksNullPrin(): useSecurityMapping IS " - + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(null, null, null, - useSecurityMapping); - tsic.setCallbacks(true, true, true); // CPC=true, GPC=true, PVC=true - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString("cbTestAllCallbacksNullPrin: callbacks handled."); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestAllCallbacksNullPrin()"); - } - - /* - * Test handling of a CPC - where no principals will be added to the CPC - * execSubject and the CPC has a non-null principal. Also, the CPC is done - * after a GPC and PVC. - * - */ - public void cbTestAllCallbacksAndPrin() { - - String str = "Enterred cbTestAllCallbacksAndPrin() and Testing a GPC, PVC, and CPC "; - str += "that have nothing added to subject and a non-null principal are handled"; - debug(str); - - debug("cbTestAllCallbacksAndPrin(): useSecurityMapping SHOULD be false"); - debug("cbTestAllCallbacksAndPrin(): useSecurityMapping IS " - + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, useSecurityMapping); - tsic.setCallbacks(true, true, true); // CPC=true, GPC=true, PVC=true - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString("cbTestAllCallbacksAndPrin: callbacks handled."); - - debug( - "TestWorkManager.cbTestAllCallbacksAndPrin - done calling tsic.setLogOutString()"); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestAllCallbacksAndPrin()"); - } - - /* - * Test handling of a CPC - where no principals will be added to the CPC - * subject and the CPC has a null principal. - * - */ - public void cbTestCPCandNullPrin() { - String str = "Enterred cbTestCPCandNullPrin() and Testing that A CPC "; - str += "that has nothing added to subject and has a null principal is handled"; - debug(str); - - debug("cbTestCPCandNullPrin(): useSecurityMapping SHOULD be false"); - debug( - "cbTestCPCandNullPrin(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(null, null, null, - useSecurityMapping); - tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString( - "cbTestCPCandNullPrin: Case-1 security callbacks handled."); - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestCPCandNullPrin()"); - } - - /* - * Test case where GPC is followed by CPC - no principals are added to the - * execSubject, the CPC (with a non-null principal), and one or more GPC's - * (each non-null group) are handled. - */ - public void cbTestCPCandGPC() { - String str = "Enterred cbTestCPCandGPC() and Testing that "; - str += "GPC (w non-null group) followed by a CPC that has non-null princiapl) is handled"; - debug(str); - - debug("cbTestCPCandPrin(): useSecurityMapping SHOULD be false"); - debug("cbTestCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, useSecurityMapping); - tsic.setCallbacks(true, true, false); // CPC=true, GPC=true, PVC=false - tsic.setAddPrinToExecSubject(false); - tsic.setLogOutString("cbTestCPCandGPC: callbacks handled."); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestCPCandGPC()"); - } - - /* - * Test case where PVC is followed by CPC - no principals are added to the - * execSubject. - */ - public void cbTestCPCandPVC() { - String str = "Enterred cbTestCPCandPVC() and Testing that "; - str += "PVC followed by a CPC that has non-null principal) is handled"; - debug(str); - - debug("cbTestCPCandPVC(): useSecurityMapping SHOULD be false"); - debug("cbTestCPCandPVC(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, useSecurityMapping); - tsic.setCallbacks(true, false, true); // CPC=true, GPC=false, PVC=true - tsic.setLogOutString("cbTestCPCandPVC: callbacks handled."); - tsic.setAddPrinToExecSubject(false); - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestCPCandPVC()"); - } - - /* - * Test that a single (presumably non-group) principal was added to the - * execSubject and the CPC is NOT handled. This uses invalid creds that are - * used in a case-2 scenario (with security mappings). The assumption is that - * this is only called for case-2 security. - */ - public void cbTestGPCandCPCFail() { - String str = "Enterred cbTestGPCandCPCFail() and Testing a GPC, and CPC fail"; - str += "where principal is added to execSubject and CPC is not handled"; - debug(str); - - debug("cbTestGPCandCPCFail(): useSecurityMapping SHOULD be true"); - debug( - "cbTestGPCandCPCFail(): useSecurityMapping IS " + useSecurityMapping); - - TSSecurityContext tsic = new TSSecurityContextWithListener("fakeusr", - "fakepwd", "fakepwd", true); - tsic.setCallbacks(true, true, false); // CPC=true, GPC=true, PVC=false - tsic.setAddPrinToExecSubject(true); - tsic.setExpectFailure(true); - tsic.setLogOutString( - "cbTestGPCandCPCFail: callbacks are NOT handled - as expected."); - - SecurityContext sic = (SecurityContext) tsic; - - testSecurityInflow(sic, true); - - debug("done testing cbTestGPCandCPCFail()"); - } - - /* - * This will need to submit a work object that has SIC set on it and then we - * will need to verify that the work object was recieved by the AppServer (via - * MDB) and we will want to verify the values that got set within the SIC - * setting to confirm the subject info is correct. (note that invoking - * MDB.isCallerInRole() is one thing we can use to assist with credential - * validation. - * - */ - public void submitSICWork() { - - try { - ConnectorStatus.getConnectorStatus().logState("enterred submitSICWork()"); - debug("enterred submitSICWork()"); - - ContextWork w1 = new ContextWork(wmgr); - - debug("creating SIC with user=" + sicUser + " pwd=" + sicPwd - + " eisUser = " + eisUser); - - SecurityContext sic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, this.useSecurityMapping); - - w1.addWorkContext(sic); - - wmgr.doWork(w1, WorkManager.INDEFINITE, null, null); - - ConnectorStatus.getConnectorStatus() - .logState("submitted work with SIC Listener"); - - } catch (WorkCompletedException e) { - // everything seemed to work okay - debug("WorkCompleted calling submitSICWork()"); - - } catch (Exception e) { - debug("got exception in submitSICWork() with user = " + sicUser - + " pwd = " + sicPwd + " principal=" + eisUser); - debug(e.toString()); - Debug.printDebugStack(e); - } - - } - - /* - * This method is testing the order in which notifications occur. (see JCA - * spec assertions 224, 225, 262) This method makes use of a counter and some - * dedicated classes that will use the counter to record the calling order - * order of notifications for workAccepted, workStarted, - * contextSetupCompleted, and workAccepted. - * - */ - public void testWorkContextLifecycleListener() { - - try { - debug("enterred testWorkContextLifecycleListener()"); - - ContextWork workimpl = new ContextWork(wmgr); - - // we want to ensure that WorkListenerImpl notifications - // occur BEFOR the workcontext setup related notifications - // so create new counter obj, and ensure it is set to zero - Counter.resetCount(); // set counter to 0 - WorkListenerImpl2 wl = new WorkListenerImpl2(); - - debug("Submitting Work Object testWorkContextLifecycleListener()."); - - // as part of assert 261, set hint context - which should be unknown - // to the appserver and thus ignored...if its not ignored and any - // contextSetupFailed notification occurs - assert 261 will be flagged - // and detected as failing later on - HintsContext hic = new HintsContext(); - hic.setName("someReallyLongAndUncommonName"); - hic.setHint(HintsContext.NAME_HINT, "someReallyLongAndUncommonHintValue"); - workimpl.addWorkContext(hic); - - SecurityContext sic = new TSSICWithListener(eisUser, eisUser, sicUser, - true); - workimpl.addWorkContext(sic); - wmgr.doWork(workimpl, WorkManager.INDEFINITE, null, wl); - debug("done submitting work obj in testWorkContextLifecycleListener()"); - - } catch (WorkRejectedException ex) { - // we should not get here - debug( - "Problem: testWorkContextLifecycleListener WorkException thrown is " - + ex.getMessage()); - ex.printStackTrace(); - - } catch (WorkException ex) { - // we should not get here (unless WorkCompleted Exception) - debug("testWorkContextLifecycleListener WorkException thrown is " - + ex.getMessage()); - ex.printStackTrace(); - - } catch (Exception ex) { - // we should not get here - debug("Problem: testWorkContextLifecycleListener Exception thrown is " - + ex.getMessage()); - ex.printStackTrace(); - } - - } - - public void testWorkContextProvider() { - - try { - debug("enterred testWorkContextProvider()"); - - // this helps test assertion 221 - ContextWork workimpl = new ContextWork(wmgr); - ExecutionContext ec = new ExecutionContext(); - WorkListenerImpl wl = new WorkListenerImpl(); - - debug( - "Submitting Work Object - which should genetate WorkRejectedException."); - wmgr.doWork(workimpl, 5000, ec, wl); - - } catch (WorkRejectedException we) { - // we expect to get here!!! - String str = "SUCCESS: WorkContextProvider causes expected WorkRejectedException"; - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - - } catch (WorkException we) { - // we should not get here - debug("FAILURE: testWorkContextProvider() WorkException thrown is " - + we.getMessage()); - - } catch (Exception ex) { - // we should not get here - debug("FAILURE: testWorkContextProvider() Exception thrown is " - + ex.getMessage()); - } - - debug("leaving testWorkContextProvider()"); - } - - /* - * This is used to help verify assertion Connector:SPEC:209 - * - * ARGS: - * - * SecurityContext: this is the sic that is passed in. It must be constructed - * befor being passed in. writeToDB: this is used to indicate if we want to - * commit/write our transaction to the db or roll it back. - * - * There are 2 choices related to establishing Caller identity: choice 1: RA - * flows in an identify to the AppServers security domain. (eg no transalation - * is done as the identity is used as is) choice 2: RA flows in an identity - * that belongs to the EIS domain only and a mapping of that identity to an - * AppServer identity then needs to be done to map the EIS id to an id that - * exists within the AppServers security domain. - * - */ - public void testSecurityInflow(SecurityContext sic, boolean writeToDB) { - - try { - ConnectorStatus.getConnectorStatus() - .logState("enterred testSecurityInflow()"); - debug("enterred testSecurityInflow()"); - - ExecutionContext ec = startTx(); - - ContextWork w1 = new ContextWork(wmgr); - - // adding the worklistener along with securityContextWithListener allows - // us to test assertion 223 - WorkListenerImpl wl = new WorkListenerImpl(); - wl.setUidStr("notifications test"); // assists w/ assertion - // Connector:SPEC:223 - - TransactionContext tic = new TransactionContext(); - tic.setXid(ec.getXid()); - w1.addWorkContext(tic); - - w1.addWorkContext(sic); - - wmgr.doWork(w1, WorkManager.INDEFINITE, null, wl); - - if (writeToDB) { - // commit write to DB - with TIC and SIC with Listener. For this, a - // Translation is Required - xa.commit(ec.getXid(), true); - } else { - // rollback a write to DB - with TIC and SIC - xa.rollback(tic.getXid()); - } - - } catch (WorkCompletedException e) { - // everything seemed to work okay - debug("WorkCompleted calling testSecurityInflow()"); - - } catch (Exception e) { - debug( - "got exception in testSecurityInflow() with user = " + sic.getName()); - debug(e.toString()); - Debug.printDebugStack(e); - } - - } - - private ExecutionContext startTx() { - ExecutionContext ec = new ExecutionContext(); - try { - Xid xid = new XidImpl(); - ec.setXid(xid); - ec.setTransactionTimeout(5 * 1000); // 5 seconds - } catch (Exception ex) { - Debug.printDebugStack(ex); - } - return ec; - } - - public void scheduleWork() { - try { - ScheduleWork sw = new ScheduleWork(); - wmgr.scheduleWork(sw); - debug("Schedule work called"); - ConnectorStatus.getConnectorStatus().logState("Schedule Work Called"); - } catch (WorkException we) { - debug("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - public void scheduleWorkListener() { - try { - ScheduleWork sw = new ScheduleWork(); - ExecutionContext ec = new ExecutionContext(); - wmgr.scheduleWork(sw, 5000, ec, null); - debug("Schedule work listener called"); - ConnectorStatus.getConnectorStatus() - .logState("Schedule Work Listener Called"); - } catch (WorkException we) { - debug("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - /* - * this will try to test API assertions which basically means we are testing - * the API. - */ - public void doAPITests() { - APIAssertionTest apiTest = new APIAssertionTest(); - apiTest.runTests(); - } - - public void doWork() { - try { - WorkImpl workimpl = new WorkImpl(wmgr); - ExecutionContext ec = new ExecutionContext(); - debug("doWork(): Creating WorkListener"); - WorkListenerImpl wl = new WorkListenerImpl(); - ConnectorStatus.getConnectorStatus().logState("Work Object Submitted"); - wmgr.doWork(workimpl, WorkManager.INDEFINITE, ec, wl); - } catch (WorkException we) { - debug("TestWorkManager WorkException thrown is " + we.getMessage()); - } - } - - // this is used to test Connector:spec:245 - public void doWorkAndAssoc() { - try { - // using WorkAndAssocImpl allows us to test Connector:spec:245 - WorkAndAssocImpl workimpl = new WorkAndAssocImpl(wmgr); - ExecutionContext ec = new ExecutionContext(); - debug("doWorkAndAssoc(): Creating WorkListener"); - WorkListenerImpl wl = new WorkListenerImpl(); - ConnectorStatus.getConnectorStatus().logState("Work Object Submitted"); - wmgr.doWork(workimpl, wmgr.INDEFINITE, ec, wl); - - } catch (WorkException we) { - debug("TestWorkManager WorkException thrown is " + we.getMessage()); - we.printStackTrace(); - } - } - - public void startWork() { - try { - WorkImpl workimpl = new WorkImpl(wmgr); - ExecutionContext ec = new ExecutionContext(); - debug("startWork: Creating WorkListener"); - WorkListenerImpl wl = new WorkListenerImpl(); - long value = wmgr.startWork(workimpl, 1000, ec, wl); - - debug("startWork: WorkManager value = " + value); - - ConnectorStatus.getConnectorStatus() - .logState("WorkManager value returned " + value); - debug("WorkManager value returned " + value); - - } catch (WorkException we) { - debug( - "TestWorkManager.startWork() Exception thrown is " + we.getMessage()); - } - } - - public void rogueWork() { - try { - RogueWorkImpl rwi = new RogueWorkImpl(); - wmgr.doWork(rwi); - } catch (WorkCompletedException wx) { - ConnectorStatus.getConnectorStatus() - .logState("Rogue work throws WorkCompletedException"); - } catch (WorkException we) { - debug("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - public void distributableWork() { - try { - DistributedWorkImpl dwi = new DistributedWorkImpl(wmgr); - // wmgr.doWork(dwi); - ExecutionContext ec = new ExecutionContext(); - debug("distributableWork(): Creating WorkListener"); - WorkListenerImpl wl = new WorkListenerImpl(); - long value = wmgr.startWork(dwi, 1000, ec, wl); - ConnectorStatus.getConnectorStatus() - .logState("DistributedWork Object Submitted"); - - if (value >= -1) { - ConnectorStatus.getConnectorStatus() - .logState("WorkManagers DistributedWork value returned " + value); - debug("WorkManagers DistributedWork value returned " + value); - } - } catch (WorkCompletedException wx) { - ConnectorStatus.getConnectorStatus() - .logState("Rogue work throws WorkCompletedException"); - } catch (WorkException we) { - debug("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - public void setXid(Xid xid) { - this.myxid = xid; - } - - public Xid getXid() { - return this.myxid; - } - - public void setNestXid(Xid xid) { - this.mynestxid = xid; - } - - public Xid getNestXid() { - return this.mynestxid; - } - - /* - * JCA 1.6 spec 9section 16.3 and 16.4 state there are two types of security a - * RA can use: "Case 1" and "Case 2". Case 1 is when the RA passes in an - * identity and that identity is assumed to exist within the app server - * security domain. "Case 2" takes and EIS identity, which will not exist in - * AppServer domain, so this case requires a mapping/translation from and - * EIS-Identity to an i AppServer-Identity. - * - * set useSecurityMapping to true to specify we want Case 2 security mapping - * use. set useSecurityMapping to false to indicate Case 1 security. - */ - public void setUseSecurityMapping(boolean val) { - this.useSecurityMapping = val; - } - - public boolean getUseSecurityMapping() { - return this.useSecurityMapping; - } - - public void submitXidWork() { - try { - XidImpl myid = new XidImpl(); - - // setting up the xid so that it can be retrieved by the TestBootstrap to - // commit the xid work object. - setXid(myid); - - WorkXid workid = new WorkXid(); - ExecutionContext ec = new ExecutionContext(); - ec.setXid(myid); - debug("TestWorkManager.submitXidWork XID IS " + myid.getFormatId()); - wmgr.doWork(workid, wmgr.INDEFINITE, ec, null); - debug("WorkXid Submitted"); - ConnectorStatus.getConnectorStatus().logState("WorkXid Submitted"); - } catch (WorkException we) { - Debug.printDebugStack(we); - } - } - - public void submitNestedXidWork() { - try { - XidImpl myid = new XidImpl(); - WorkXid1 workid = new WorkXid1(wmgr, myid); - // setting up the xid so it can be commited later. - setNestXid(myid); - - debug("TestWorkManager.submitNestedXidWork XID IS " + myid.getFormatId()); - - ExecutionContext ec = new ExecutionContext(); - ec.setXid(myid); - wmgr.doWork(workid, wmgr.INDEFINITE, ec, null); - debug("WorkXid1 submitted"); - - } catch (WorkException we) { - Debug.printDebugStack(we); - } - } - - /* - * verify we can find config properties that should be set as part of our - * configuration process. (See ts.jte prop for values.) - */ - private void verifyConfigSettings() { - String err = "WARNING - TestWorkManager could not find required system property: "; - - if (sicUser == null) { - err += "j2eelogin.name"; - debug(err); - sicUser = "j2ee"; // try to set to a default - } - - if (sicPwd == null) { - err += "j2eelogin.password"; - debug(err); - sicUser = "j2ee"; // try to set to a default - } - - if (eisUser == null) { - err += "j2eelogin.password"; - debug(err); - sicUser = "cts1"; // try to set to a default - } - } - - private void debug(String str) { - Debug.trace(str); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java deleted file mode 100644 index 0652e9158e..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.SecurityException; -import jakarta.resource.spi.security.PasswordCredential; - -public class Util { - static public PasswordCredential getPasswordCredential( - final ManagedConnectionFactory mcf, final Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - if (subject == null) { - if (info == null) { - return null; - } else { - TSConnectionRequestInfo myinfo = (TSConnectionRequestInfo) info; - PasswordCredential pc = new PasswordCredential(myinfo.getUser(), - myinfo.getPassword().toCharArray()); - pc.setManagedConnectionFactory(mcf); - return pc; - } - } else { - PasswordCredential pc = (PasswordCredential) AccessController - .doPrivileged(new PrivilegedAction() { - public Object run() { - Set creds = subject - .getPrivateCredentials(PasswordCredential.class); - Iterator iter = creds.iterator(); - while (iter.hasNext()) { - PasswordCredential temp = (PasswordCredential) iter.next(); - if (temp.getManagedConnectionFactory().equals(mcf)) { - return temp; - } - } - return null; - } - }); - if (pc == null) { - throw new SecurityException("No PasswordCredential found"); - } else { - return pc; - } - } - } - - static public boolean isEqual(String a, String b) { - if (a == null) { - return (b == null); - } else { - return a.equals(b); - } - } - - static public boolean isPasswordCredentialEqual(PasswordCredential a, - PasswordCredential b) { - if (a == b) - return true; - if ((a == null) && (b != null)) - return false; - if ((a != null) && (b == null)) - return false; - if (!isEqual(a.getUserName(), b.getUserName())) - return false; - String p1 = null; - String p2 = null; - if (a.getPassword() != null) { - p1 = new String(a.getPassword()); - } - if (b.getPassword() != null) { - p2 = new String(b.getPassword()); - } - return (isEqual(p1, p2)); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java deleted file mode 100644 index 57f74518ee..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Vector; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.work.WorkManager; - -/* - * This class is used to assist in testing with assertion Connector:SPEC:245. - * This tests the association between the resource adapter instance and the - * Work instance before the exection of the Work instance has been started - */ -public class WorkAndAssocImpl extends WorkImpl - implements ResourceAdapterAssociation { - private int count = 0; - - protected String callingClassName = "WorkAndAssocImpl"; - - private ResourceAdapter resourceAdapter; - - public WorkAndAssocImpl(WorkManager wm) { - super(wm, "WorkAndAssocImpl"); - } - - public void run() { - - // do check for setResourceAdapter call - checkAssociation(); - - try { - ConnectorStatus.getConnectorStatus().logState("WorkAndAssocImpl.run"); - debug("WorkAndAssocImpl.run"); - } catch (Exception ex) { - } - - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this work instance - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "WorkAndAssocImpl setResourceAdapter " + count; - debug(newStr1); - ConnectorStatus.getConnectorStatus().logState(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this work instance - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * This method is used to assist in the verification process of assertion - * Connector:SPEC:245 This method must be called befor the work instances - * 'run' method is called. This method checks if the setResourceAdapter() - * method was called and if so, then this method logs a message to indicate - * that it was called prior to the 'run' method of the run method. - */ - public void checkAssociation() { - Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); - String toCheck1 = "WorkAndAssocImpl setResourceAdapter 1"; - - for (int i = 0; i < vLog.size(); i++) { - String str = (String) vLog.elementAt(i); - if (str.startsWith(toCheck1)) { - String str2 = "LocalTx - association exists between RA and work"; - ConnectorStatus.getConnectorStatus().logState(str2); - break; - } - } - } - - private void debug(String str) { - Debug.trace(str); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java deleted file mode 100644 index 956cc5e031..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class WorkImpl implements Work { - protected WorkManager wm; - - protected String callingClassName = "WorkImpl"; - - public WorkImpl(WorkManager wm) { - this.wm = wm; - - String str = callingClassName + ".constructor"; - ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); - debug(str); - } - - public WorkImpl(WorkManager wm, String strCallingClassName) { - this.wm = wm; - callingClassName = strCallingClassName; - - String str = callingClassName + ".constructor"; - ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); - debug(str); - } - - public void release() { - String str = callingClassName + ".release"; - ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); - debug(str); - } - - public void run() { - try { - String str = callingClassName + ".run"; - ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); - debug(str); - NestWork nw = new NestWork(); - wm.doWork(nw); - } catch (WorkException we) { - debug("got WorkException in WorkImpl.run(): " + we.getMessage()); - } - } - - /* - * this sets the name of the calling class so that we can be sure proper - * logging info is dumped out. - * - */ - public void setCallingClassName(String str) { - this.callingClassName = str; - } - - public String getCallingClassName() { - return this.callingClassName; - } - - private void debug(String str) { - Debug.trace(str); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java deleted file mode 100644 index c7844ab4ed..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.work.WorkEvent; -import jakarta.resource.spi.work.WorkListener; - -public class WorkListenerImpl implements WorkListener { - private String uidStr = null; - - public void workAccepted(WorkEvent e) { - if (uidStr == null) { - ConnectorStatus.getConnectorStatus() - .logState("WorkListenerImpl.workAccepted"); - } else { - ConnectorStatus.getConnectorStatus() - .logState("WorkListenerImpl.workAccepted for:" + uidStr); - } - debug("WorkListenerImpl.workAccepted"); - } - - public void workRejected(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("WorkListenerImpl.workRejected"); - debug("WorkListenerImpl.workRejected"); - } - - public void workStarted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("WorkListenerImpl.workStarted"); - debug("WorkListenerImpl.workStarted"); - } - - public void workCompleted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("WorkListenerImpl.workCompleted"); - debug("WorkListenerImpl.workCompleted"); - } - - public void setUidStr(String val) { - this.uidStr = val; - } - - public String getUidStr() { - return this.uidStr; - } - - private void debug(String str) { - Debug.trace(str); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java deleted file mode 100644 index ae894036cf..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class WorkXid1 implements Work { - - private WorkManager wm; - - private Xid xid; - - public WorkXid1(WorkManager wm, Xid xid) { - this.wm = wm; - this.xid = xid; - ConnectorStatus.getConnectorStatus().logAPI("WorkXid.constructor", "", ""); - Debug.trace("WorkXid1.constructor"); - } - - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("WorkXid.release", "", ""); - Debug.trace("WorkXid1.release() called."); - - if ((xid != null) && (xid.getGlobalTransactionId() != null)) { - Debug.trace("WorkXid1.release() xid was: " - + new String(xid.getGlobalTransactionId())); - } else if (xid != null) { - Debug.trace( - "WorkXid1.release() xid was NOT null but xid.getGlobalTransactionId() was null."); - } else { - Debug.trace("WorkXid1.release() xid was: null"); - } - Debug.trace("WorkXid1.release() xid being set == null"); - - this.xid = null; - } - - public void run() { - try { - ConnectorStatus.getConnectorStatus().logAPI("WorkXid.run", "", ""); - Debug.trace("WorkXid1.run"); - ConnectorStatus.getConnectorStatus().logAPI("WorkXid1.run", "", ""); - NestedWorkXid workid = new NestedWorkXid(); - - ExecutionContext ec = new ExecutionContext(); - ec.setXid(this.xid); - Debug.trace("set the xid in ec"); - wm.doWork(workid, wm.INDEFINITE, ec, null); - Debug.trace("submitted the nested xid work"); - ConnectorStatus.getConnectorStatus().logState("WorkXid Submitted"); - - } catch (WorkException we) { - if (we.TX_CONCURRENT_WORK_DISALLOWED == WorkException.TX_CONCURRENT_WORK_DISALLOWED) { - Debug.trace("In the WorkException of Concurrent xid"); - ConnectorStatus.getConnectorStatus() - .logState("WorkException.TX_CONCURRENT_WORK_DISALLOWED caught"); - } - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java deleted file mode 100644 index bb31982852..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -public class XAManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private String TSRValue; - - private int count; - - private String password; - - private String user; - - private String userName; - - /* - * @name XAManagedConnectionFactory - * - * @desc Default conctructor - */ - public XAManagedConnectionFactory() { - } - - public String getUser() { - System.out - .println("XAManagedConnectionFactory.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - System.out - .println("XAManagedConnectionFactory.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - System.out.println( - "XAManagedConnectionFactory.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - System.out - .println("XAManagedConnectionFactory.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - System.out.println( - "XAManagedConnectionFactory.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - System.out - .println("XAManagedConnectionFactory.setPassword() with val = " + val); - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - return new TSEISDataSource(this, cxManager); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "XAManagedConnectionFactory setResourceAdapter " + count; - System.out.println(newStr1); - ConnectorStatus.getConnectorStatus().logState(newStr1); - - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - return new TSEISDataSource(this, null); - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - TSXAConnection xacon = null; - TSConnection con = null; - String userName = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - xacon = new TSXAConnectionImpl(); - con = xacon.getConnection(); - System.out.println("xacon.getConnection"); - } else { - xacon = new TSXAConnectionImpl(); - System.out.println("xacon.getConnection(u,p)"); - con = xacon.getConnection(pc.getUserName(), pc.getPassword()); - } - if (con == null) { - System.out.println("Connection is null"); - } - return new TSManagedConnection(this, pc, xacon, con, true, true); - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - - try { - // getXADataSource().setLogWriter(out); - } catch (Exception ex) { - ResourceException rex = new ResourceException("Exception"); - rex.initCause(ex); - throw rex; - } - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - try { - return null; - } catch (Exception ex) { - ResourceException rex = new ResourceException("Exception"); - rex.initCause(ex); - throw rex; - } - } - - /* - * @name equals - * - * @desc compares the given object with this object. - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof XAManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - XAManagedConnectionFactory that = (XAManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.TSRValue, that.getTSRValue())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void setTSRValue(String name) { - ConnectorStatus.getConnectorStatus() - .logState("XAManagedConnectionFactory.setTSRValue"); - Debug.trace( - "XAManagedConnectionFactory.setTSRValue called with value = " + name); - this.TSRValue = name; - } - - public String getTSRValue() { - ConnectorStatus.getConnectorStatus() - .logState("XAManagedConnectionFactory.getTSRValue"); - Debug.trace("XAManagedConnectionFactory.getTSRValue"); - return TSRValue; - } - - public void lookupTSR(String lookup) { - ConnectorStatus.getConnectorStatus() - .logState("XAManagedConnectionFactory.lookupTSR"); - try { - Debug.trace("lookupTSR() called with lookup name = " + lookup); - TSNamingContext ncxt = new TSNamingContext(); - String newStr = "java:".concat(lookup); - Object obj = (Object) ncxt.lookup(newStr); - if (obj != null) { - ConnectorStatus.getConnectorStatus().logState("TSR Lookup Successful"); - Debug.trace("TSR Lookup Successful"); - } else { - Debug.trace("TSR Null"); - } - - } catch (Exception e) { - e.printStackTrace(); - } - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java deleted file mode 100644 index a5dd2b1ac9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -public class XAMessageXAResource implements XAResource { - - public XAMessageXAResource() { - System.out.println("XAMessageXAResource constructor"); - } - - private void handleResourceException(Exception ex) throws XAException { - - XAException xae = new XAException(ex.toString()); - xae.errorCode = XAException.XAER_RMERR; - throw xae; - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - System.out.println("XAMessageXAResource.commit"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - System.out.println("XAMessageXAResource.start"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - System.out.println("XAMessageXAResource.end"); - // ConnectorStatus.getConnectorStatus().logAPI("MessageXAResource.end" , - // "", ""); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void forget(Xid xid) throws XAException { - System.out.println("XAMessageXAResource.forget"); - } - - public int getTransactionTimeout() throws XAException { - return 1; - } - - public boolean isSameRM(XAResource other) throws XAException { - System.out.println("XAMessageXAResource.isSameRM"); - return false; - } - - public int prepare(Xid xid) throws XAException { - ConnectorStatus.getConnectorStatus().logAPI("XAMessageXAResource.prepare", - "", ""); - System.out.println("XAMessageXAResource.prepare"); - try { - return XAResource.XA_OK; - } catch (Exception ex) { - handleResourceException(ex); - return XAException.XAER_RMERR; - } - } - - public Xid[] recover(int flag) throws XAException { - System.out.println("XAMessageXAResource.recover"); - return null; - } - - public void rollback(Xid xid) throws XAException { - try { - System.out.println("XAMessageXAResource.rollback"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - return true; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java deleted file mode 100644 index 1e514e62ab..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java +++ /dev/null @@ -1,295 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.io.Serializable; -import java.lang.reflect.Method; -import java.util.Vector; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -public class XAResourceAdapterImpl implements ResourceAdapter, Serializable { - // IMPORTANT: for compliance, if you add non-transient member data - // here, be sure to add respective entry to equals() method below. - - private transient TestWorkManager twm; - - private transient TestBootstrapContext tbs; - - private transient LocalTxMessageListener ml; - - private String RAName; // value from ra's xml file - - private Boolean useSecurityMapping = null; // value from ra's xml file - - private int counter = 0; - - private transient javax.transaction.xa.XAResource xaresource; - - private transient LocalTxMessageWork2 work3; - - private transient WorkManager wm; - - private int mefcount = 0; - - private transient MessageEndpointFactory mef1; - - private transient MessageEndpointFactory mef2; - - private transient BootstrapContext bsc; - - public XAResourceAdapterImpl() { - ConnectorStatus.getConnectorStatus() - .logState("XAResourceAdapterImpl Constructor "); - System.out.println("XAResourceAdapterImpl Constructor "); - } - - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - System.out.println("XAResourceAdapter Started " + counter); - String str1 = new String("XAResourceAdapter Started " + counter); - ConnectorStatus.getConnectorStatus().logState(str1); - - // get WorkManager reference - - WorkManager wm = null; - - if (bsc != null) { - ConnectorStatus.getConnectorStatus() - .logState("XAResourceAdapter BootstrapContext Not Null "); - wm = bsc.getWorkManager(); - } else { - ConnectorStatus.getConnectorStatus() - .logState("ERROR - XAResourceAdapter BootstrapContext is Null "); - } - - if (wm != null) { - ConnectorStatus.getConnectorStatus() - .logState("XAResourceAdapter WorkManager Not Null "); - } else { - ConnectorStatus.getConnectorStatus() - .logState("WARNING XAResourceAdapter WorkManager is Null "); - } - - try { - checkAssociation(); - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - wm = ctx.getWorkManager(); - // Create TestWorkManager object - twm = new TestWorkManager(ctx); - if (this.useSecurityMapping.booleanValue() == true) { - // values from our RA xml file indicate we want to establish Case 2 - // security for the RA. This means we need security mappings. - Debug.trace( - " XAResourceAdapterImpl ; calling setUseSecurityMapping(true)"); - twm.setUseSecurityMapping(true); - } else { - // use Case 1 security thus do NO mapping of identities - Debug.trace( - " XAResourceAdapterImpl ; calling setUseSecurityMapping(false)"); - twm.setUseSecurityMapping(false); - } - twm.runTests(); - - // Create TestBootstrap object - tbs = new TestBootstrapContext(ctx); - tbs.runTests(); - } - - public void stop() { - // Set the TestWorkManager to null upon resource adapter shutdown. - // twm = null; - if (work3 != null) { - work3.stop(); - } - - } - - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - - } - - public XAResource[] getXAResources(ActivationSpec[] as) { - return null; - } - - private Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - if ((mef1 != null) && (!mef1.equals(mef2))) { - Debug.trace("XA MessageEndpointFactory is Unique"); - Debug.trace("XA MessageEndpointFactory equals implemented correctly"); - } - } - - /* - * This method is used to assist in the verification process of assertion - * Connector:SPEC:245 This method must be called befor the work instances - * 'run' method is called. This method checks if the setResourceAdapter() - * method was called and if so, then this method logs a message to indicate - * that it was called prior to the 'run' method of the run method. - */ - public void checkAssociation() { - Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); - String toCheck1 = "XAManagedConnectionFactory setResourceAdapter 1"; - - for (int i = 0; i < vLog.size(); i++) { - String str = (String) vLog.elementAt(i); - if (str.startsWith(toCheck1)) { - ConnectorStatus.getConnectorStatus().logState( - "XAResourceAdapter - association exists between RA and work"); - break; - } - } - - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof XAResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - XAResourceAdapterImpl that = (XAResourceAdapterImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (this.mefcount != that.getMefcount()) { - return false; - } - - if (!Util.isEqual(this.RAName, that.getRAName())) - return false; - - if (this.getUseSecurityMapping().booleanValue() != that - .getUseSecurityMapping().booleanValue()) { - return false; - } - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRAName(String name) { - ConnectorStatus.getConnectorStatus() - .logState("XAResourceAdapter.setRAName"); - this.RAName = name; - } - - public String getRAName() { - Debug.trace("XAResourceAdapter.getRAName"); - return RAName; - } - - public void setUseSecurityMapping(Boolean val) { - this.useSecurityMapping = val; - } - - public Boolean getUseSecurityMapping() { - return this.useSecurityMapping; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - - public void setMefcount(int val) { - this.mefcount = val; - } - - public int getMefcount() { - return this.mefcount; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java deleted file mode 100644 index a1b2995af6..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import java.util.Hashtable; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; - -public class XAResourceImpl implements XAResource { - - private TSManagedConnection mc; - - private int seconds = 0; - - private Hashtable xidset = null; - - public XAResourceImpl(TSManagedConnection mc) { - this.mc = mc; - xidset = new Hashtable(); - if (mc == null) { - System.out.println("TSManagedConnection is null in XAResourceImpl"); - } - - } - - private void handleResourceException(Exception ex) throws XAException { - - XAException xae = new XAException(ex.toString()); - xae.errorCode = XAException.XAER_RMERR; - throw xae; - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - System.out.println("XAResourceImpl.commit"); - // To detect two phase commit and see if the - // prepare method was called or not. - ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.commit", "", - ""); - TSeis.getTSeis().getResourceManager().commit(xid, onePhase); - } catch (XAException xe) { - throw xe; - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - System.out.println("XAResourceImpl.start"); - TSeis.getTSeis().getResourceManager().start(xid, flags, - mc.getTSConnection()); - ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.start", "", - ""); - } catch (XAException xe) { - throw xe; - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - System.out.println("XAResourceImpl.end"); - TSeis.getTSeis().getResourceManager().end(xid, flags); - ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.end", "", ""); - } catch (XAException xe) { - throw xe; - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void forget(Xid xid) throws XAException { - System.out.println("XAResourceImpl.forget"); - } - - public int getTransactionTimeout() throws XAException { - return this.seconds; - } - - public boolean isSameRM(XAResource other) throws XAException { - System.out.println("XAResourceImpl.isSameRM"); - if (this == other) - return true; - if (other == null) - return false; - if ((other instanceof XAResourceImpl) && (this.mc != null)) { - XAResourceImpl obj = (XAResourceImpl) other; - return (this.mc.equals(obj.mc)); - } else { - return false; - } - } - - public int prepare(Xid xid) throws XAException { - ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.prepare", "", - ""); - System.out.println("XAResourceImpl.prepare"); - try { - return TSeis.getTSeis().getResourceManager().prepare(xid); - } catch (XAException xe) { - throw xe; - } catch (Exception ex) { - handleResourceException(ex); - return XAException.XAER_RMERR; - } - } - - public Xid[] recover(int flag) throws XAException { - System.out.println("XAResourceImpl.recover"); - return null; - } - - public void rollback(Xid xid) throws XAException { - try { - System.out.println("XAResourceImpl.rollback"); - TSeis.getTSeis().getResourceManager().rollback(xid); - ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.rollback", "", - ""); - } catch (XAException xe) { - throw xe; - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - this.seconds = seconds; - return true; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java deleted file mode 100644 index 02bdc84655..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox; - -import javax.transaction.xa.Xid; - -public class XidImpl implements Xid { - - private static int ID = 0; - - public int formatID; // Format identifier - // (-1) means that the XidImpl is null - - public int branchQualifier; - - public int globalTxID; - - static public final int MAXGTRIDSIZE = 64; - - static public final int MAXBQUALSIZE = 64; - - public XidImpl() { - int foo = ++ID; - formatID = foo; - branchQualifier = foo; - globalTxID = foo; - } - - public boolean equals(Object o) { - XidImpl other; // The "other" XidImpl - int L; // Combined gtrid_length + bqual_length - int i; - - if (!(o instanceof XidImpl)) // If the other XidImpl isn't an XidImpl - { - return false; // It can't be equal - } - - other = (XidImpl) o; // The other XidImpl, now properly cast - - if (this.formatID == other.formatID - && this.branchQualifier == other.branchQualifier - && this.globalTxID == other.globalTxID) { - return true; - } - - return false; - } - - /** - * Compute the hash code. - * - * @return the computed hashcode - */ - public int hashCode() { - if (formatID == (-1)) { - return (-1); - } - - return formatID + branchQualifier + globalTxID; - - } - - /* - * Convert to String - * - *

This is normally used to display the XidImpl when debugging. - */ - - /** - * Return a string representing this XidImpl. - * - * @return the string representation of this XidImpl - */ - public String toString() { - - String s = new String( - "{XidImpl: " + "formatID(" + formatID + "), " + "branchQualifier (" - + branchQualifier + "), " + "globalTxID(" + globalTxID + ")}"); - - return s; - } - - /* - * Return branch qualifier - */ - - /** - * Returns the branch qualifier for this XidImpl. - * - * @return the branch qualifier - */ - public byte[] getBranchQualifier() { - String foo = (new Integer(branchQualifier)).toString(); - return foo.getBytes(); - } - - public int getFormatId() { - return formatID; - } - - public byte[] getGlobalTransactionId() { - String foo = (new Integer(globalTxID)).toString(); - return foo.getBytes(); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java deleted file mode 100644 index 38aa5fe428..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java +++ /dev/null @@ -1,502 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.annotated; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionDefinition; -import jakarta.resource.spi.ConnectionDefinitions; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -@ConnectionDefinitions({ - @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) -public class AnnoManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String tsrValue; - - private String password; - - private String user; - - private String userName; - - private String setterMethodVal = "DEFAULT"; - - @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) - private Integer integer; - - @ConfigProperty() - private String factoryName = "AnnoManagedConnectionFactory"; - - /* - * @name AnnoManagedConnectionFactory - * - * @desc Default conctructor - */ - public AnnoManagedConnectionFactory() { - // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 - String str = "AnnoManagedConnectionFactory factoryName=" + factoryName; - ConnectorStatus.getConnectorStatus().logState(str); - - // lets make sure we can call and set setSetterMethodVal() - setSetterMethodVal("NONDEFAULT"); - - debug(str); - } - - /* - * used to help test assertion Connector:SPEC:278 - */ - @ConfigProperty() - public void setSetterMethodVal(String val) { - setterMethodVal = val; - String str = "AnnotatedResourceAdapterImpl.setSetterMethodVal=" - + setterMethodVal; - ConnectorStatus.getConnectorStatus().logState(str); - } - - public String getSetterMethodVal() { - return setterMethodVal; - } - - public void setFactoryName(String name) { - this.factoryName = name; - } - - public String getFactoryName() { - return factoryName; - } - - public Integer getInteger() { - return this.integer; - } - - public void setInteger(Integer val) { - this.integer = val; - } - - public String getUser() { - debug("AnnoManagedConnectionFactory.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - debug("AnnoManagedConnectionFactory.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - debug("AnnoManagedConnectionFactory.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - debug("AnnoManagedConnectionFactory.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - debug("AnnoManagedConnectionFactory.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - debug("AnnoManagedConnectionFactory.setPassword() with val = " + val); - password = val; - } - - public String getTsrValue() { - debug("AnnoManagedConnectionFactory getTsrValue called" + tsrValue); - return tsrValue; - } - - public void setTsrValue(String name) { - debug("AnnoManagedConnectionFactory setTsrValue called" + name); - this.tsrValue = name; - } - - public void lookupTSR(String lookup) { - try { - TSNamingContext ncxt = new TSNamingContext(); - String newStr = "java:".concat(lookup); - Object obj = (Object) ncxt.lookup(newStr); - if (obj != null) { - debug("TSR NOT Null"); - } else { - debug("TSR Null"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "AnnoManagedConnectionFactory setResourceAdapter " + count; - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("AnnoManagedConnectionFactory.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug( - "AnnoManagedConnectionFactory.createManagedConnection(): pc == null"); - debug("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - debug( - "AnnoManagedConnectionFactory.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - debug("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - dumpConnectionMetaData(mcon); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - public void dumpConnectionMetaData(ManagedConnection mcon) { - - String hdr = "AnnoManagedConnectionFactory: "; - String out; - boolean bLocal = false; - boolean bXA = false; - - try { - ManagedConnectionMetaData mdata = mcon.getMetaData(); - - out = hdr + "displayName=" + mdata.getEISProductName(); - debug(out); - - out = hdr + "version=" + mdata.getEISProductVersion(); - debug(out); - - // get transaction type - try { - mcon.getLocalTransaction(); - bLocal = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a localTransaction type"); - } - try { - mcon.getXAResource(); - bXA = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a XAResource type"); - } - - out = hdr + "transactionSupport="; - if (bLocal) { - out = out + "LocalTransaction"; - } else if (bXA) { - out = out + "XATransaction"; - } else { - // assume default case of noTx - out = out + "NoTransaction"; - } - debug(out); - } catch (ResourceException ex) { - System.out.println(ex.getMessage()); - ex.printStackTrace(); - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - - System.out.println("matchManagedConnections: couldnt find match"); - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof AnnoManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - AnnoManagedConnectionFactory that = (AnnoManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { - return false; - } else if ((this.integer == null) && !(that.getInteger() == null)) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.tsrValue, that.getTsrValue())) - return false; - - if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("AnnoManagedConnectionFactory: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java deleted file mode 100644 index b8b1ea7cc4..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.annotated; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.WorkImpl; -import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; -import com.sun.ts.tests.common.connector.whitebox.XidImpl; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.XATerminator; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class AnnoWorkManager { - private BootstrapContext bsc = null; - - private WorkManager wmgr; - - private Xid myxid; - - private Xid mynestxid; - - private XATerminator xa; - - public AnnoWorkManager(BootstrapContext val) { - debug("enterred constructor"); - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - this.xa = bsc.getXATerminator(); - - debug("leaving constructor"); - } - - public void runTests() { - debug("enterred runTests"); - doWork(); - doTCWork(); - submitNestedXidWork(); - debug("leaving runTests"); - } - - public void doWork() { - debug("enterred doWork"); - - try { - WorkImpl workimpl = new WorkImpl(wmgr); - - ExecutionContext ec = new ExecutionContext(); - WorkListenerImpl wl = new WorkListenerImpl(); - wmgr.doWork(workimpl, 5000, ec, wl); - ConnectorStatus.getConnectorStatus() - .logState("AnnoWorkManager Work Object Submitted"); - debug("AnnoWorkManager Work Object Submitted"); - } catch (WorkException we) { - System.out.println( - "AnnoWorkManager WorkException thrown is " + we.getMessage()); - } catch (Exception ex) { - System.out - .println("AnnoWorkManager Exception thrown is " + ex.getMessage()); - } - - debug("leaving doWork"); - } - - private TransactionContext startTx() { - TransactionContext tc = new TransactionContext(); - try { - Xid xid = new XidImpl(); - tc.setXid(xid); - tc.setTransactionTimeout(5 * 1000); // 5 seconds - } catch (Exception ex) { - Debug.printDebugStack(ex); - } - return tc; - } - - /* - * This will be used to help verify assertion Connector:SPEC:55 from the - * annotation point of view. - */ - public void doTCWork() { - try { - XidImpl myid = new XidImpl(); - WorkImpl workimpl = new WorkImpl(wmgr); - TransactionContext tc = startTx(); - tc.setXid(myid); - - Debug.trace("Creating WorkListener"); - WorkListenerImpl wl = new WorkListenerImpl(); - wmgr.doWork(workimpl, 5000, tc, wl); - ConnectorStatus.getConnectorStatus() - .logState("TransactionContext Work Object Submitted"); - - xa.commit(tc.getXid(), true); - } catch (XAException xe) { - Debug.trace("AnnoWorkManager.doTCWork(): XAException" + xe.getMessage()); - Debug.trace("AnnoWorkManager XAException.toString() = " + xe.toString()); - Debug.printDebugStack(xe); - } catch (WorkException we) { - Debug.trace("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - public void setXid(Xid xid) { - this.myxid = xid; - } - - public Xid getXid() { - return this.myxid; - } - - public void setNestXid(Xid xid) { - this.mynestxid = xid; - } - - public Xid getNestXid() { - return this.mynestxid; - } - - /* - * This is used to help verify assertion: Connector:SPEC:210 While the spec is - * clear to state that nested work contexts are to be supported, it appears - * there may be some grey area wrt nested work objects with transaction - * contexts. It may be the case that nested transaction contexts may not be - * clearly defined in the connector 1.6 spec - so we will test nested work - * objs where only 1 of the work objs has transactioncontext. - */ - public void submitNestedXidWork() { - try { - XidImpl myid = new XidImpl(); - NestedWorkXid1 workid = new NestedWorkXid1(wmgr, myid, - NestedWorkXid1.ContextType.EXECUTION_CONTEXT); - - // setting up the xid so it can be commited later. - setNestXid(myid); - - TransactionContext tc = startTx(); - tc.setXid(myid); - wmgr.doWork(workid, wmgr.INDEFINITE, tc, null); - - Debug.trace("Anno based NestedWorkXid1 Submitted"); - ConnectorStatus.getConnectorStatus() - .logState("anno based NestedWorkXid1 parent context submitted"); - xa.commit(tc.getXid(), true); - - } catch (XAException xe) { - Debug.trace("AnnoWorkManager.submitNestedXidWork(): XAException" - + xe.getMessage()); - Debug.trace("AnnoWorkManager XAException.toString() = " + xe.toString()); - Debug.printDebugStack(xe); - } catch (WorkException we) { - Debug.printDebugStack(we); - } catch (Exception ex) { - Debug.printDebugStack(ex); - } - } - - public void debug(String out) { - Debug.trace("AnnoWorkManager: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java deleted file mode 100755 index f980ce86a1..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.annotated; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.AuthenticationMechanism; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.SecurityPermission; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/** - * This is a sample resource adapter that will use no ra.xml info. This RA is - * used to assist with verifying the server supports annotations when there is - * no ra.xml (Assertion 268) and the transaction support is Local. - * - */ - -@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-anno_no_md.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(description = "Security Perm description"), transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction, requiredWorkContexts = { - HintsContext.class, SecurityContext.class }) -public class AnnotatedResourceAdapterImpl - implements ResourceAdapter, java.io.Serializable { - - private transient BootstrapContext bsc; - - private transient AnnoWorkManager awm; - - private transient WorkManager wm; - - private transient Work work; - - private String serverSideUser = ""; // corresponds to ts.jte's 'user' property - - private String serverSidePwd = ""; // corresponds to ts.jte's 'password' - // property - - private String eisUser = ""; // corresponds to ts.jte's 'user1' property - - private String eisPwd = ""; // corresponds to ts.jte's 'password' property - - @ConfigProperty(defaultValue = "AnnotatedResourceAdapterImpl") - private String raName; - - /** - * constructor - **/ - public AnnotatedResourceAdapterImpl() { - debug("enterred constructor..."); - - this.serverSideUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.serverSidePwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); - - debug("leaving constructor..."); - } - - // - // Begin ResourceAdapter interface requirements - // - - /* must implement for ResourceAdapter interface requirement */ - public void start(BootstrapContext bsc) - throws ResourceAdapterInternalException { - debug("enterred start"); - - ConnectorStatus.getConnectorStatus() - .logState("AnnotatedResourceAdapterImpl.start called"); - - this.bsc = bsc; - this.wm = bsc.getWorkManager(); - - this.awm = new AnnoWorkManager(bsc); - awm.runTests(); - - debug("leaving start"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void stop() { - debug("entered stop"); - debug("leaving stop"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointActivation(MessageEndpointFactory factory, - ActivationSpec spec) throws NotSupportedException { - - debug("enterred endpointActivation"); - debug("leaving endpointActivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointDeactivation(MessageEndpointFactory ep, - ActivationSpec spec) { - debug("enterred endpointDeactivation"); - debug("leaving endpointDeactivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public XAResource[] getXAResources(ActivationSpec[] specs) - throws ResourceException { - - debug("enterred getXAResources"); - debug("leaving getXAResources"); - - throw new UnsupportedOperationException(); - } - - // - // END ResourceAdapter interface requirements - // - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof AnnotatedResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - AnnotatedResourceAdapterImpl that = (AnnotatedResourceAdapterImpl) obj; - - if (!Util.isEqual(this.serverSideUser, that.getServerSideUser())) - return false; - - if (!Util.isEqual(this.serverSidePwd, that.getServerSidePwd())) - return false; - - if (!Util.isEqual(this.eisUser, that.getEisUser())) - return false; - - if (!Util.isEqual(this.eisPwd, that.getEisPwd())) - return false; - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRaName(String name) { - this.raName = name; - - // this helps verify assertion Connector:SPEC:279 - String str = "setRAName called with raname=" + raName; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - public String getRaName() { - debug("AnnotatedResourceAdapterImpl.getRAName"); - return raName; - } - - public void debug(String out) { - Debug.trace("AnnotatedResourceAdapterImpl: " + out); - } - - public void setServerSideUser(String val) { - this.serverSideUser = val; - } - - public String getServerSideUser() { - return this.serverSideUser; - } - - public void setServerSidePwd(String val) { - this.serverSidePwd = val; - } - - public String getServerSidePwd() { - return this.serverSidePwd; - } - - public void setEisUser(String val) { - this.eisUser = val; - } - - public String getEisUser() { - return this.eisUser; - } - - public void setEisPwd(String val) { - this.eisUser = val; - } - - public String getEisPwd() { - return this.eisPwd; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java deleted file mode 100644 index 5153ea8080..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.annotated; - -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.NestedWorkXid; - -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkCompletedException; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; -import jakarta.resource.spi.work.WorkRejectedException; - -public class NestedWorkXid1 implements Work { - - public enum ContextType { - EXECUTION_CONTEXT, TRANSACTION_CONTEXT, SECURITY_CONTEXT - }; - - private WorkManager wm; - - private Xid xid; - - private ContextType contxtType; - - public NestedWorkXid1(WorkManager wm, Xid xid, ContextType contxt) { - this.wm = wm; - this.xid = xid; - this.contxtType = contxt; - - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.constructor", - "", ""); - Debug.trace("NestedWorkXid1.constructor"); - } - - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.release", "", - ""); - Debug.trace("NestedWorkXid1.release"); - } - - public void run() { - String strPass = "anno based NestedWorkXid1 child context submitted"; - try { - Debug.trace("NestedWorkXid1.run"); - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.run", "", ""); - Debug.trace("Got the xid"); - NestedWorkXid workid = new NestedWorkXid(); - - if (contxtType == ContextType.TRANSACTION_CONTEXT) { - Debug.trace("Using TRANSACTION_CONTEXT to set the xid in tc"); - TransactionContext tc = new TransactionContext(); - tc.setXid(this.xid); - wm.doWork(workid, wm.INDEFINITE, tc, null); - } else { - // assume ExecutionContext - no need for SecurityContext yet - Debug.trace("Using EXECUTION_CONTEXT to set the xid in ec"); - ExecutionContext ec = new ExecutionContext(); - ec.setXid(this.xid); - wm.doWork(workid, wm.INDEFINITE, ec, null); - } - - // flow could make it here or could throw WorkCompletedException - Debug.trace(strPass); - ConnectorStatus.getConnectorStatus().logState(strPass); - - } catch (WorkCompletedException we) { - // could make it here upon successful completion of work - Debug.trace(strPass); - ConnectorStatus.getConnectorStatus().logState(strPass); - } catch (WorkRejectedException we) { - // should not make it here - Debug.trace("WorkRejectedException in NestedWorkXid1"); - } catch (WorkException we) { - // should not make it here - Debug.trace("WorkException in NestedWorkXid1"); - } catch (Exception ex) { - // should not make it here - Debug.trace("Exception in NestedWorkXid1"); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java deleted file mode 100644 index cc82c262d0..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; - -import jakarta.resource.spi.Activation; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.InvalidPropertyException; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; - -/* - * This extends the parent class and MUST have a different listener than the parent. - * This must inherit any configProperty annotations from parent. - * This will implement ResourceAdaperAssociation as part of test for - * Connector:SPEC:282. Since this implements ResourceAdaperAssociation, we should - * see that the setResourceAdapter() class gets called. - */ -@Activation(messageListeners = { - com.sun.ts.tests.common.connector.util.TSMessageListenerInterface.class }) -public class IBAnnoActivationSpecChild extends IBAnnoActivationSpecParent - implements ResourceAdapterAssociation, ActivationSpec { - - private String annoDestinationName; - - private String annoDestinationType; - - private ResourceAdapter resourceAdapter; - - /** - * Default constructor. - */ - public IBAnnoActivationSpecChild() { - Debug.trace("IBAnnoActivationSpecChild.constructor"); - } - - public String getAnnoDestinationName() { - Debug.trace("IBAnnoActivationSpecChild.getAnnoDestinationName :" - + this.annoDestinationName); - return this.annoDestinationName; - } - - public void setAnnoDestinationName(String name) { - this.annoDestinationName = name; - Debug.trace("IBAnnoActivationSpecChild.setAnnoDestinationName :" + name); - } - - public String getAnnoDestinationType() { - Debug.trace("IBAnnoActivationSpecChild.getDestinationType :" - + this.annoDestinationType); - return this.annoDestinationType; - } - - public void setAnnoDestinationType(String type) { - Debug.trace("IBAnnoActivationSpecChild.setAnnoDestinationType :" + type); - this.annoDestinationType = type; - } - - public ResourceAdapter getResourceAdapter() { - return this.resourceAdapter; - } - - public void setResourceAdapter(ResourceAdapter ra) { - String str = "IBAnnoActivationSpecChild.setResourceAdatper called"; - ConnectorStatus.getConnectorStatus().logState(str); - Debug.trace(str); - this.resourceAdapter = ra; - } - - public void validate() throws InvalidPropertyException { - Debug.trace("IBAnnoActivationSpecChild.validate called"); - } - - public void setPropName(String name) { - propName = name; - } - - public String getPropName() { - return propName; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java deleted file mode 100644 index cc361bc8d1..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import com.sun.ts.tests.common.connector.whitebox.Debug; - -import jakarta.resource.spi.Activation; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.InvalidPropertyException; -import jakarta.resource.spi.ResourceAdapter; - -/* - * This class shouldnt really be used for anything. This will be extended - * by the child activation class and checks will be done to ensure that - * proper annotation processing, inheritance, etc are occurring. - * In this parent, we set a dummy listener of WorkListener, and in our - * subclass, we will have a different, more speciif listener. - * - * Also, we expect that the ConfigProperty annotation in this parent - * will/must be inherited by any child/sub classes. - * - */ -@Activation(messageListeners = { jakarta.resource.spi.work.WorkListener.class }) -public class IBAnnoActivationSpecParent - implements ActivationSpec, java.io.Serializable { - - private String annoDestinationName; - - private String annoDestinationType; - - @ConfigProperty() - protected String propName = "IBAnnoConfigPropVal"; - - private ResourceAdapter resourceAdapter; - - /** - * Default constructor. - */ - public IBAnnoActivationSpecParent() { - Debug.trace("IBAnnoActivationSpecParent.constructor"); - } - - public String getAnnoDestinationName() { - Debug.trace("IBAnnoActivationSpecParent.getAnnoDestinationName :" - + this.annoDestinationName); - return this.annoDestinationName; - } - - public void setAnnoDestinationName(String name) { - this.annoDestinationName = name; - Debug.trace("IBAnnoActivationSpecParent.setAnnoDestinationName :" + name); - } - - public String getAnnoDestinationType() { - Debug.trace("IBAnnoActivationSpecParent.getDestinationType :" - + this.annoDestinationType); - return this.annoDestinationType; - } - - public void setAnnoDestinationType(String type) { - Debug.trace("IBAnnoActivationSpecParent.setAnnoDestinationType :" + type); - this.annoDestinationType = type; - } - - public ResourceAdapter getResourceAdapter() { - return this.resourceAdapter; - } - - public void setResourceAdapter(ResourceAdapter ra) { - Debug.trace("IBAnnoActivationSpecParent.setResourceAdatper called"); - this.resourceAdapter = ra; - } - - public void validate() throws InvalidPropertyException { - Debug.trace("IBAnnoActivationSpecParent.validate called"); - } - - public void setPropName(String name) { - propName = name; - } - - public String getPropName() { - return propName; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java deleted file mode 100644 index 36246be128..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java +++ /dev/null @@ -1,519 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionDefinition; -import jakarta.resource.spi.ConnectionDefinitions; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -@ConnectionDefinitions({ - @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) -public class IBAnnoManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String TSRValue; - - private String password; - - private String user; - - private String userName; - - private String setterMethodVal = "DEFAULT"; - - @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) - private Integer integer; - - @ConfigProperty() - private String factoryName = "IBAnnoManagedConnectionFactory"; - - /* - * @name IBAnnoManagedConnectionFactory - * - * @desc Default conctructor - */ - public IBAnnoManagedConnectionFactory() { - - // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 - String str = "IBAnnoManagedConnectionFactory factoryName=" + factoryName; - debug(str); - - // lets make sure we can call and set setSetterMethodVal() - setSetterMethodVal("NONDEFAULT"); - - debug(str); - } - - /* - * used to help test assertion Connector:SPEC:278 - */ - @ConfigProperty() - public void setSetterMethodVal(String val) { - setterMethodVal = val; - String str = "AnnotatedResourceAdapterImpl.setSetterMethodVal=" - + setterMethodVal; - ConnectorStatus.getConnectorStatus().logState(str); - } - - public String getSetterMethodVal() { - return setterMethodVal; - } - - public void setFactoryName(String name) { - debug("IBAnnoManagedConnectionFactory.setFactoryName"); - this.factoryName = name; - } - - public String getFactoryName() { - debug("IBAnnoManagedConnectionFactory.getFactoryName"); - return factoryName; - } - - public Integer getInteger() { - return this.integer; - } - - public void setInteger(Integer val) { - this.integer = val; - } - - public String getUser() { - debug("IBAnnoManagedConnectionFactory.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - debug("IBAnnoManagedConnectionFactory.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - debug( - "IBAnnoManagedConnectionFactory.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - debug("IBAnnoManagedConnectionFactory.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - debug( - "IBAnnoManagedConnectionFactory.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - debug("IBAnnoManagedConnectionFactory.setPassword() with val = " + val); - password = val; - } - - public String getTSRValue() { - debug("IBAnnoManagedConnectionFactory getTSRValue called" + TSRValue); - return TSRValue; - } - - public void setTSRValue(String name) { - debug("IBAnnoManagedConnectionFactory.setTSRValue called with: " + name); - this.TSRValue = name; - } - - public void lookupTSR(String lookup) { - debug("IBAnnoManagedConnectionFactory.lookupTSR"); - try { - TSNamingContext ncxt = new TSNamingContext(); - String newStr = "java:".concat(lookup); - Object obj = (Object) ncxt.lookup(newStr); - if (obj != null) { - debug("TSR Lookup Successful"); - } else { - debug("TSR Null"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "IBAnnoManagedConnectionFactory.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "IBAnnoManagedConnectionFactory.createConnectionFactory", "", - "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "IBAnnoManagedConnectionFactory setResourceAdapter " - + count; - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("IBAnnoManagedConnectionFactory.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "IBAnnoManagedConnectionFactory.createManagedConnection", - "subject|info", "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug( - "IBAnnoManagedConnectionFactory.createManagedConnection(): pc == null"); - debug("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - debug( - "IBAnnoManagedConnectionFactory.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - debug("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - dumpConnectionMetaData(mcon); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - public void dumpConnectionMetaData(ManagedConnection mcon) { - - String hdr = "IBAnnoManagedConnectionFactory: "; - String out; - boolean bLocal = false; - boolean bXA = false; - - try { - ManagedConnectionMetaData mdata = mcon.getMetaData(); - - out = hdr + "displayName=" + mdata.getEISProductName(); - debug(out); - - out = hdr + "version=" + mdata.getEISProductVersion(); - debug(out); - - // get transaction type - try { - mcon.getLocalTransaction(); - bLocal = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a localTransaction type"); - } - try { - mcon.getXAResource(); - bXA = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a XAResource type"); - } - - out = hdr + "transactionSupport="; - if (bLocal) { - out = out + "LocalTransaction"; - } else if (bXA) { - out = out + "XATransaction"; - } else { - // assume default case of noTx - out = out + "NoTransaction"; - } - debug(out); - } catch (ResourceException ex) { - System.out.println(ex.getMessage()); - ex.printStackTrace(); - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "IBAnnoManagedConnectionFactory.matchManagedConnection", - "connectionSet|subject|info", "TSEISDataSource"); - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - - System.out.println("matchManagedConnections: couldnt find match"); - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - if ((obj == null) || !(obj instanceof IBAnnoManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - IBAnnoManagedConnectionFactory that = (IBAnnoManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { - return false; - } else if ((this.integer == null) && !(that.getInteger() == null)) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.TSRValue, that.getTSRValue())) - return false; - - if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("IBAnnoManagedConnectionFactory: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java deleted file mode 100644 index 2b4c6e8598..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import javax.transaction.xa.XAException; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.XidImpl; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.XATerminator; -import jakarta.resource.spi.work.WorkEvent; -import jakarta.resource.spi.work.WorkListener; - -public class IBAnnoMessageListener implements WorkListener { - - private XidImpl xid; - - private BootstrapContext bsc; - - public IBAnnoMessageListener(XidImpl xid, BootstrapContext bsc) { - this.xid = xid; - this.bsc = bsc; - } - - public void workAccepted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("IBAnnoMessageListener.workAccepted"); - if (xid != null) { - System.out.println("IBAnnoMessageListener.workAccepted() for XID = " - + xid.getFormatId()); - } else { - // should not get here but just in case... - System.out.println("IBAnnoMessageListener.workAccepted() for XID = null"); - } - } - - public void workRejected(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("IBAnnoMessageListener.workRejected"); - if (xid != null) { - System.out.println("IBAnnoMessageListener.workRejected() for XID = " - + xid.getFormatId()); - } else { - // should not get here but just in case... - System.out.println("IBAnnoMessageListener.workRejected() for XID = null"); - } - } - - public void workStarted(WorkEvent e) { - ConnectorStatus.getConnectorStatus() - .logState("IBAnnoMessageListener.workStarted"); - System.out.println("IBAnnoMessageListener.workStarted"); - } - - public void workCompleted(WorkEvent e) { - try { - XATerminator xt = bsc.getXATerminator(); - System.out.println( - "IBAnnoMessageListener.workCompleted and about to call XATerminator.commit()"); - System.out.println( - "XID getting used in XATerminator [ " + xid.getFormatId() + " ]"); - xt.commit(this.xid, true); - ConnectorStatus.getConnectorStatus() - .logState("IBAnnoMessageListener committed Xid"); - } catch (XAException ex) { - Debug.trace("IBAnnoMessageListener.workCompleted() got XAException"); - Debug.trace("XAException.toString() = " + ex.toString()); - ex.printStackTrace(); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java deleted file mode 100644 index 3e953065e5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java +++ /dev/null @@ -1,238 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.XAMessageXAResource; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkContext; -import jakarta.resource.spi.work.WorkContextProvider; - -public class IBAnnoMessageWork implements Work, WorkContextProvider { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private XAMessageXAResource msgxa = new XAMessageXAResource(); - - private MessageEndpoint ep2; - - private List contextsList = new ArrayList(); - - public IBAnnoMessageWork(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - - Debug.trace("IBAnnoMessageWork constructor"); - } - - public void run() { - - while (!stop) { - try { - - // Createing ep and ep1 for comparison - MessageEndpoint ep1 = factory.createEndpoint(null); - ep2 = factory.createEndpoint(null); - - // creating xaep to check if the message delivery is transacted. - MessageEndpoint xaep = factory.createEndpoint(msgxa); - - if (!ep2.equals(ep1)) { - Debug.trace("IBAnnoMessageWork XA Unique MessageEndpoint returned"); - } - - chkMessageEndpointImpl(ep1); - - Method onMessage = getOnMessageMethod(); - ep1.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep1) - .onMessage("IBAnnoMessageWork XA Message To MDB"); - ep1.afterDelivery(); - - Method onMessagexa = getOnMessageMethod(); - xaep.beforeDelivery(onMessagexa); - ((TSMessageListenerInterface) xaep) - .onMessage("IBAnnoMessageWork XA Non Transacted Message To MDB1"); - xaep.afterDelivery(); - - boolean de = factory.isDeliveryTransacted(onMessagexa); - - callSysExp(); - callAppExp(); - - if (!de) { - Debug.trace("IBAnnoMessageWork XA MDB1 delivery is not transacted"); - } else { - Debug.trace("IBAnnoMessageWork XA MDB1 delivery is transacted"); - } - - break; - - } catch (AppException ex) { - ex.printStackTrace(); - - } catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - - } catch (NoSuchMethodException ns) { - ns.printStackTrace(); - - } catch (ResourceException re) { - re.printStackTrace(); - } - } - - } - - public void callSysExp() { - - try { - Debug.trace(" in IBAnnoMessageWork.callSysExp()"); - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw SysException from IBAnnoMessageWork"); - - } catch (NoSuchMethodException e) { - System.out.println("IBAnnoMessageWork: NoSuchMethodException"); - e.getMessage(); - e.printStackTrace(); - } catch (UnavailableException e) { - System.out.println("IBAnnoMessageWork: UnavailableException"); - e.printStackTrace(); - } catch (ResourceException re) { - System.out.println("IBAnnoMessageWork: ResourceException"); - re.printStackTrace(); - } catch (AppException ae) { - System.out.println("IBAnnoMessageWork: AppException"); - ae.printStackTrace(); - } catch (Exception e) { - // if we are in here, we will assume that our exception was of type ejb - // but we - // should not code only to ejb as the messaging could be POJO's and not - // ejb.... - System.out.println("EJBException thrown by NotSupported MDB"); - ConnectorStatus.getConnectorStatus() - .logState("EJBException thrown by NotSupported"); - e.printStackTrace(); - } finally { - try { - // this ensures that before and - // after delivery calls are properly matched. - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - } - - public void callAppExp() { - - try { - Debug.trace(" in IBAnnoMessageWork.callAppExp()"); - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw AppException from IBAnnoMessageWork"); - - } catch (AppException ejbe) { - System.out.println("AppException thrown by NotSupported MDB"); - ConnectorStatus.getConnectorStatus() - .logState("AppException thrown by NotSupported"); - - } catch (NoSuchMethodException ns) { - ns.printStackTrace(); - - } catch (ResourceException re) { - re.printStackTrace(); - - } finally { - try { - // this ensures that before and - // after delivery calls are properly matched. - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - private void chkMessageEndpointImpl(MessageEndpoint ep) { - if ((ep instanceof MessageEndpoint) - && (ep instanceof TSMessageListenerInterface)) { - Debug.trace("IBANNO XA MessageEndpoint interface implemented"); - Debug.trace("IBANNO XA TSMessageListener interface implemented"); - } else { - Debug.trace( - "IBANNO XA MessageEndpoint and TSMessageListenerInterface not implemented"); - } - - } - - public List getWorkContexts() { - return contextsList; - } - - public void addWorkContext(WorkContext ic) { - contextsList.add(ic); - } - - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java deleted file mode 100644 index 6dae6708db..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import java.lang.reflect.Method; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; -import com.sun.ts.tests.common.connector.whitebox.Debug; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; - -public class IBAnnoMessageWork1 implements Work { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private IBAnnoMessageXAResource1 msgxa = new IBAnnoMessageXAResource1(); - - private MessageEndpoint xaep; - - private MessageEndpoint ep2; - - public IBAnnoMessageWork1(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - System.out.println("IBAnnoMessageWork1.constructor"); - } - - public void run() { - - while (!stop) { - try { - System.out.println("Inside the IBAnnoMessageWork1 run "); - // creating xaep to check if the message delivery is transacted. - xaep = factory.createEndpoint(msgxa); - - ep2 = factory.createEndpoint(null); - - Method onMessagexa = getOnMessageMethod(); - xaep.beforeDelivery(onMessagexa); - ((TSMessageListenerInterface) xaep) - .onMessage("IBAnno MDB2 Transacted Message To MDB"); - xaep.afterDelivery(); - Debug.trace("IBAnno MDB2 Transacted Message To MDB"); - - callSysExp(); - callAppExp(); - - boolean de = factory.isDeliveryTransacted(onMessagexa); - - if (de) { - Debug.trace("IBAnno MDB2 delivery is transacted"); - } - break; - } catch (AppException ex) { - ex.printStackTrace(); - } - - catch (NoSuchMethodException e) { - e.printStackTrace(); - } - - catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - } catch (ResourceException re) { - re.printStackTrace(); - } - - } - - } - - public void callSysExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw IBAnnoSysException from Required"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (NoSuchMethodException e) { - System.out.println("IBAnnoMessageWork1: NoSuchMethodException"); - e.getMessage(); - e.printStackTrace(); - } catch (UnavailableException e) { - System.out.println("IBAnnoMessageWork1: UnavailableException"); - e.printStackTrace(); - } catch (ResourceException re) { - System.out.println("IBAnnoMessageWork1: ResourceException"); - re.printStackTrace(); - } catch (AppException ae) { - System.out.println("IBAnnoMessageWork1: AppException"); - ae.printStackTrace(); - } catch (Exception e) { - // if we are in here, we will assume that our exception was of type ejb - // but it - // could also be from a non-ejb POJO - thus we use this Exception type. - Debug.trace("IBAnnoEJBException thrown but Required"); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - - } - - public void callAppExp() { - - try { - Method onMessage = getOnMessageMethod(); - ep2.beforeDelivery(onMessage); - ((TSMessageListenerInterface) ep2) - .onMessage("Throw IBAnnoAppException from Required"); - // this has been moved to finally clause to ensure that before and - // after delivery calls are properly matched. - // ep2.afterDelivery(); - } catch (AppException ejbe) { - System.out.println("AppException thrown by Required MDB"); - ConnectorStatus.getConnectorStatus() - .logState("AppException thrown by Required"); - } catch (NoSuchMethodException ns) { - ns.printStackTrace(); - } catch (ResourceException re) { - re.printStackTrace(); - } finally { - try { - ep2.afterDelivery(); - } catch (ResourceException re2) { - re2.printStackTrace(); - } - } - - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java deleted file mode 100644 index 5fe625bc20..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import java.lang.reflect.Method; - -import com.sun.ts.tests.common.connector.util.AppException; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.LocalTxMessageXAResource; - -import jakarta.resource.spi.UnavailableException; -import jakarta.resource.spi.endpoint.MessageEndpoint; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; - -public class IBAnnoMessageWork2 implements Work { - - private String name; - - private boolean stop = false; - - private MessageEndpointFactory factory; - - private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource( - "LocalTxMessageXAResource2"); - - public IBAnnoMessageWork2(String name, MessageEndpointFactory factory) { - this.factory = factory; - this.name = name; - System.out.println("IBAnnoMessageWork2.constructor"); - } - - public void run() { - - while (!stop) { - try { - - // creating xaep to check if the message delivery is transacted. - MessageEndpoint xaep = factory.createEndpoint(msgxa); - MessageEndpoint xaep1 = factory.createEndpoint(msgxa); - MessageEndpoint xaep2 = factory.createEndpoint(msgxa); - - Method onMessagexa = getOnMessageMethod(); - ((TSMessageListenerInterface) xaep) - .onMessage("IBAnnoMessageWork2 MDB2 Transacted Message1"); - ((TSMessageListenerInterface) xaep1) - .onMessage("IBAnnoMessageWork2 MDB2 Transacted Message2"); - ((TSMessageListenerInterface) xaep2) - .onMessage("IBAnnoMessageWork2 MDB2 Transacted Message3"); - - Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message1"); - Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message2"); - Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message3"); - - break; - } catch (AppException ex) { - ex.printStackTrace(); - } catch (UnavailableException ex) { - try { - Thread.currentThread().sleep(3000); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - } - - public Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - public void release() { - } - - public void stop() { - this.stop = true; - } - - public String toString() { - return name; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java deleted file mode 100644 index 5c063f14a9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import javax.transaction.xa.XAException; -import javax.transaction.xa.XAResource; -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; - -public class IBAnnoMessageXAResource1 implements XAResource { - - public IBAnnoMessageXAResource1() { - Debug.trace("IBAnnoMessageXAResource1 constructor"); - } - - private void handleResourceException(Exception ex) throws XAException { - - XAException xae = new XAException(ex.toString()); - xae.errorCode = XAException.XAER_RMERR; - throw xae; - } - - public void commit(Xid xid, boolean onePhase) throws XAException { - try { - Debug.trace("IBAnnoMessageXAResource1.commit"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void start(Xid xid, int flags) throws XAException { - try { - Debug.trace("IBAnnoMessageXAResource1.start"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void end(Xid xid, int flags) throws XAException { - try { - Debug.trace("IBAnnoMessageXAResource1.end"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public void forget(Xid xid) throws XAException { - Debug.trace("IBAnnoMessageXAResource1.forget"); - } - - public int getTransactionTimeout() throws XAException { - return 1; - } - - public boolean isSameRM(XAResource other) throws XAException { - Debug.trace("IBAnnoMessageXAResource1.isSameRM"); - return false; - } - - public int prepare(Xid xid) throws XAException { - ConnectorStatus.getConnectorStatus() - .logAPI("IBAnnoMessageXAResource1.prepare", "", ""); - Debug.trace("IBAnnoMessageXAResource1.prepare"); - try { - return XAResource.XA_OK; - } catch (Exception ex) { - handleResourceException(ex); - return XAException.XAER_RMERR; - } - } - - public Xid[] recover(int flag) throws XAException { - Debug.trace("IBAnnoMessageXAResource1.recover"); - return null; - } - - public void rollback(Xid xid) throws XAException { - try { - Debug.trace("IBAnnoMessageXAResource1.rollback"); - } catch (Exception ex) { - handleResourceException(ex); - } - } - - public boolean setTransactionTimeout(int seconds) throws XAException { - return true; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java deleted file mode 100644 index 37b1e1acb1..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.WorkImpl; -import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; -import com.sun.ts.tests.common.connector.whitebox.XidImpl; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class IBAnnoWorkManager { - private BootstrapContext bsc = null; - - private WorkManager wmgr; - - private Xid myxid; - - private Xid mynestxid; - - public IBAnnoWorkManager(BootstrapContext val) { - debug("enterred constructor"); - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - - debug("leaving constructor"); - } - - public void runTests() { - debug("enterred runTests"); - doWork(); - doTCWork(); - debug("leaving runTests"); - } - - public void doWork() { - debug("enterred doWork"); - - try { - WorkImpl workimpl = new WorkImpl(wmgr); - - ExecutionContext ec = new ExecutionContext(); - WorkListenerImpl wl = new WorkListenerImpl(); - wmgr.doWork(workimpl, 5000, ec, wl); - ConnectorStatus.getConnectorStatus() - .logState("IBAnnoWorkManager Work Object Submitted"); - debug("IBAnnoWorkManager Work Object Submitted"); - } catch (WorkException we) { - System.out.println( - "IBAnnoWorkManager WorkException thrown is " + we.getMessage()); - } catch (Exception ex) { - System.out - .println("IBAnnoWorkManager Exception thrown is " + ex.getMessage()); - } - - debug("leaving doWork"); - } - - private TransactionContext startTx() { - TransactionContext tc = new TransactionContext(); - try { - Xid xid = new XidImpl(); - tc.setXid(xid); - tc.setTransactionTimeout(5 * 1000); // 5 seconds - } catch (Exception ex) { - Debug.printDebugStack(ex); - } - return tc; - } - - /* - * This will be used to help verify assertion Connector:SPEC:55 from the - * annotation point of view. - */ - public void doTCWork() { - try { - WorkImpl workimpl = new WorkImpl(wmgr); - TransactionContext tc = startTx(); - - Debug.trace("Creating IBAnnoMessageListener"); - XidImpl myid = new XidImpl(); - IBAnnoMessageListener wl = new IBAnnoMessageListener(myid, this.bsc); - wmgr.doWork(workimpl, 5000, tc, wl); - ConnectorStatus.getConnectorStatus() - .logState("TransactionContext Work Object Submitted"); - } catch (WorkException we) { - Debug.trace("TestWorkManager Exception thrown is " + we.getMessage()); - } - } - - public void setXid(Xid xid) { - this.myxid = xid; - } - - public Xid getXid() { - return this.myxid; - } - - public void setNestXid(Xid xid) { - this.mynestxid = xid; - } - - public Xid getNestXid() { - return this.mynestxid; - } - - public void debug(String out) { - Debug.trace("IBAnnoWorkManager: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java deleted file mode 100755 index 0d43b48ea2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.ibanno; - -import java.lang.reflect.Method; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; -import com.sun.ts.tests.common.connector.whitebox.XidImpl; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.AuthenticationMechanism; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.SecurityPermission; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/** - * This is a sample resource adapter that will use no ra.xml info. This RA is - * used to assist with verifying the server supports annotations when there is - * no ra.xml (Assertion 268) and the transaction support is Local. It is also - * testing inbound messaging support. - * - */ - -@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-anno_no_md.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.XATransaction, requiredWorkContexts = { - TransactionContext.class }) -public class IBAnnotatedResourceAdapterImpl - implements ResourceAdapter, java.io.Serializable { - - private transient BootstrapContext bsc; - - private transient IBAnnoWorkManager awm; - - private transient WorkManager wm; - - private transient Work work; - - private transient MessageEndpointFactory mef2; - - private transient IBAnnoMessageWork1 work1; - - private transient IBAnnoMessageWork2 work2; - - private transient IBAnnoMessageListener ml; - - @ConfigProperty(defaultValue = "IBAnnotatedResourceAdapterImpl") - private String raName; - - /** - * constructor - **/ - public IBAnnotatedResourceAdapterImpl() { - debug("enterred IBAnnotatedResourceAdapterImpl() constructor..."); - } - - // - // Begin ResourceAdapter interface requirements - // - - /* must implement for ResourceAdapter interface requirement */ - public void start(BootstrapContext bsc) - throws ResourceAdapterInternalException { - debug("enterred start"); - - this.bsc = bsc; - this.wm = bsc.getWorkManager(); - this.awm = new IBAnnoWorkManager(bsc); - awm.runTests(); - - debug("leaving start"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void stop() { - debug("entered stop"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - try { - debug("IBAnnotatedResourceAdapterImpl.endpointActivation()"); - - // check if endpointActivation has been called - Method onMessagexa = getOnMessageMethod(); - boolean de = mef.isDeliveryTransacted(onMessagexa); - - if (!de) { - // For MDB with Not Supported transaction attribute - // we should not get here since our mdb is msginflow_mdb2.ear which - // has transaction set to required in the dd. - debug( - "should NOT have found mdb with unsupported transaction attribute!"); - } else { - // For MDB with Required transaction attribute - // Endpoint requires a tranaction but no incoming transaction - String str2 = "IBAnnotatedResourceAdapterImpl Required transaction"; - ConnectorStatus.getConnectorStatus().logState(str2); - mef2 = mef; - debug("IBAnnoResourceAdapter preparing work1"); - String destinationName = ((IBAnnoActivationSpecChild) as) - .getAnnoDestinationName(); - debug("Destination name is " + destinationName); - - logMEFActivationInfo(mef); - - // help verify assertion Connector:SPEC:282 - ResourceAdapter ra = ((IBAnnoActivationSpecChild) as) - .getResourceAdapter(); - if (ra != null) { - ConnectorStatus.getConnectorStatus().logState( - "IBAnnoActivationSpecChild.getResourceAdapter() not null."); - } else { - debug( - "IBAnnoActivationSpecChild.getResourceAdapter() = null, failed assertion Connector:SPEC:282"); - } - - // lets verify the child activation spec inherits @configProp info from - // parent - String childPropname = ((IBAnnoActivationSpecChild) as).getPropName(); - String strp = "IBAnnoActivationSpecChild.propName = " + childPropname; - debug(strp); - ConnectorStatus.getConnectorStatus().logState(strp); - - // now setup work inst - work1 = new IBAnnoMessageWork1(destinationName, mef2); - debug("IBAnnoResourceAdapter work1 created"); - wm.scheduleWork(work1, wm.INDEFINITE, null, null); - debug("IBAnnoResourceAdapter work1 scheduled"); - - // Endpoint requires a tranaction and there is an incoming transaction - work2 = new IBAnnoMessageWork2(destinationName, mef2); - XidImpl myid = new XidImpl(); - ExecutionContext ec = new ExecutionContext(); - int idcount = myid.getFormatId(); - debug("XID getting used [ " + idcount + " ]"); - ec.setXid(myid); - ml = new IBAnnoMessageListener(myid, this.bsc); - wm.scheduleWork(work2, wm.INDEFINITE, ec, ml); - - } - - } catch (Throwable ex) { - ex.printStackTrace(); - } - - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointDeactivation(MessageEndpointFactory ep, - ActivationSpec spec) { - debug("enterred endpointDeactivation"); - - if ((mef2 != null) && (mef2.equals(ep))) { - mef2 = null; - } else { - // print some warnings - may or may not be issue - if (mef2 == null) { - debug("WARNING: endpointDeactivation() mef2 == null"); - } else { - debug("WARNING: endpointDeactivation() mef2 != ep!"); - } - } - - debug("leaving endpointDeactivation"); - } - - private void logMEFActivationInfo(MessageEndpointFactory mef) { - try { - Debug.trace("enterred logMEFActivationInfo()"); - if (mef != null) { - String str = "IBAnnotatedResourceAdapterImpl.endpointActivation() getEndpointClass() returned: "; - Class clazz = mef.getEndpointClass(); - if (clazz != null) { - // should be getting class name of - // com.sun.ts.tests.connector.mdb.JCAMessageBean - str = str + clazz.getName(); - } else { - // should not get here - str = str + "null from class.getName()"; - } - Debug.trace(str); - ConnectorStatus.getConnectorStatus().logState(str); - - String activationName = mef.getActivationName(); - str = "IBAnnotatedResourceAdapterImpl.endpointActivation() getActivationName() returned "; - if (activationName != null) { - // should get here...this could be any unique name - str = str + "nonNull name " + activationName; - } else { - // should not get here - str = str + "null from mef.getActivationName()"; - } - Debug.trace(str); - ConnectorStatus.getConnectorStatus().logState(str); - } - } catch (Exception ex) { - ex.printStackTrace(); - } - } - - private Method getOnMessageMethod() { - - Method onMessageMethod = null; - try { - Class msgListenerClass = TSMessageListenerInterface.class; - Class[] paramTypes = { java.lang.String.class }; - onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); - - } catch (NoSuchMethodException ex) { - ex.printStackTrace(); - } - return onMessageMethod; - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof IBAnnotatedResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - IBAnnotatedResourceAdapterImpl that = (IBAnnotatedResourceAdapterImpl) obj; - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* must implement for ResourceAdapter interface requirement */ - public XAResource[] getXAResources(ActivationSpec[] specs) - throws ResourceException { - - debug("IBAnno getXAResources called"); - - return null; - } - - // - // END ResourceAdapter interface requirements - // - - public void setRaName(String name) { - this.raName = name; - } - - public String getRaName() { - return raName; - } - - public void debug(String out) { - Debug.trace("IBAnnotatedResourceAdapterImpl: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java deleted file mode 100644 index 239a6f1d30..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java +++ /dev/null @@ -1,432 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mdcomplete; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionDefinition; -import jakarta.resource.spi.ConnectionDefinitions; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -/* - * This is an annotated ManagedConenctionFactory class. This class should NOT get - * used. The ra.xml in this directory (eg ra-md-complete.xml) has metadata-complete="true" - * and specifies a different MCF than this one be used. So this is assisting with the - * testing of assertion: Connector:SPEC:266. - * - */ -@ConnectionDefinitions({ - @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) -public class MDAnnotatedMCF implements ManagedConnectionFactory, - ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String TSRValue; - - private String password; - - private String user; - - private String userName; - - @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false, supportsDynamicUpdates = false, confidential = false) - private Integer integer; - - private String factoryName = "MDAnnotatedMCF"; - - /* - * @name MDAnnotatedMCF - * - * @desc Default conctructor - */ - public MDAnnotatedMCF() { - ConnectorStatus.getConnectorStatus().logState("MDAnnotatedMCF constructor"); - } - - public void setFactoryName(String name) { - debug("MDAnnotatedMCF.setFactoryName"); - this.factoryName = name; - } - - public String getFactoryName() { - debug("MDAnnotatedMCF.getFactoryName"); - return factoryName; - } - - public Integer getInteger() { - debug("MDAnnotatedMCF.getInteger"); - return this.integer; - } - - public void setInteger(Integer val) { - debug("MDAnnotatedMCF.setInteger"); - this.integer = val; - } - - public String getUser() { - debug("MDAnnotatedMCF.getUser"); - return user; - } - - public void setUser(String val) { - debug("MDAnnotatedMCF.setUser"); - user = val; - } - - public String getUserName() { - debug("MDAnnotatedMCF.getUserName"); - return userName; - } - - public void setUserName(String val) { - debug("MDAnnotatedMCF.setUserName"); - userName = val; - } - - public String getPassword() { - debug("MDAnnotatedMCF.getPassword"); - return password; - } - - public void setPassword(String val) { - debug("MDAnnotatedMCF.setPassword"); - password = val; - } - - public String getTSRValue() { - debug("MDAnnotatedMCF.getTSRValue"); - return TSRValue; - } - - public void setTSRValue(String name) { - debug("MDAnnotatedMCF.setTSRValue"); - this.TSRValue = name; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MDAnnotatedMCF.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MDAnnotatedMCF.createConnectionFactory", "", "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String("MDAnnotatedMCF setResourceAdapter " + count); - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("MDAnnotatedMCF getResourceAdapter"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "MDAnnotatedMCF.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug("MDAnnotatedMCF.createManagedConnection(): pc == null"); - con = new TSConnectionImpl().getConnection(); - } else { - debug("MDAnnotatedMCF.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MDAnnotatedMCF.matchManagedConnection", "connectionSet|subject|info", - "TSEISDataSource"); - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - - debug("matchManagedConnections: couldnt find match"); - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.setLogWriter", - "out", ""); - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.getLogWriter", - "", ""); - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof MDAnnotatedMCF)) { - return false; - } - if (obj == this) { - return true; - } - - MDAnnotatedMCF that = (MDAnnotatedMCF) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { - return false; - } else if ((this.integer == null) && !(that.getInteger() == null)) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.TSRValue, that.getTSRValue())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("MDAnnotatedMCF: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java deleted file mode 100644 index 1dfc9a3055..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mdcomplete; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.security.PasswordCredential; - -public class MDCompleteMCF - implements ManagedConnectionFactory, ResourceAdapterAssociation, - TransactionSupport, Serializable, jakarta.resource.Referenceable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String TSRValue; - - private String password; - - private String user; - - private String userName; - - @ConfigProperty(description = "String value", ignore = false) - String factoryName = "MDCompleteMCF"; - - /* - * @name MDCompleteMCF - * - * @desc Default conctructor - */ - public MDCompleteMCF() { - ConnectorStatus.getConnectorStatus().logState("MDCompleteMCF constructor"); - } - - /* - * @name getTransactionSupport - * - * @desc this is required for interface TransacationSupport - */ - public TransactionSupportLevel getTransactionSupport() { - - // this is used to assist with assertion: Connector:SPEC:206 and - // Connector:SPEC:316. - String str = "MDCompleteMCF.getTransactionSupport called"; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - return TransactionSupport.TransactionSupportLevel.NoTransaction; - } - - public void setFactoryName(String name) { - debug("MDCompleteMCF.setFactoryName"); - - // this helps verify assertion Connector:SPEC:307 and Connector:SPEC:277 - // and this behavior is described in connector 1.6 spec section 18.5 - String str = "MDCompleteMCF factoryname=" + name; - debug(str); - - this.factoryName = name; - } - - public String getFactoryName() { - debug("MDCompleteMCF.getFactoryName"); - return factoryName; - } - - public String getUser() { - debug("MDCompleteMCF.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - debug("MDCompleteMCF.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - debug("MDCompleteMCF.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - debug("MDCompleteMCF.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - debug("MDCompleteMCF.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - debug("MDCompleteMCF.setPassword() with val = " + val); - password = val; - } - - public String getTSRValue() { - debug("MDCompleteMCF.getTSRValue"); - return TSRValue; - } - - public void setTSRValue(String name) { - debug("MDCompleteMCF.setTSRValue"); - this.TSRValue = name; - } - - public void lookupTSR(String lookup) { - debug("MDCompleteMCF.lookupTSR"); - try { - TSNamingContext ncxt = new TSNamingContext(); - String newStr = "java:".concat(lookup); - Object obj = (Object) ncxt.lookup(newStr); - if (obj != null) { - debug("TSR Lookup Successful"); - } else { - debug("TSR Null"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MDCompleteMCF.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus() - .logAPI("MDCompleteMCF.createConnectionFactory", "", "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String("MDCompleteMCF setResourceAdapter " + count); - debug(newStr1); - this.resourceAdapter = ra; - - // if we made it here, we assume no exceptions thrown thus validating - // Connector:SPEC:226 - ConnectorStatus.getConnectorStatus().logState(newStr1); - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("MDCompleteMCF.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "MDCompleteMCF.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug("MDCompleteMCF.createManagedConnection(): pc == null"); - con = new TSConnectionImpl().getConnection(); - } else { - debug("MDCompleteMCF.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MDCompleteMCF.matchManagedConnection", "connectionSet|subject|info", - "TSEISDataSource"); - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && mcf.equals(this)) { - return mc; - } - } - } - - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.setLogWriter", - "out", ""); - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.getLogWriter", - "", ""); - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof MDCompleteMCF)) { - return false; - } - if (obj == this) { - return true; - } - - MDCompleteMCF that = (MDCompleteMCF) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.TSRValue, that.getTSRValue())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("MDCompleteMCF: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java deleted file mode 100755 index 5b48e0ab6d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mdcomplete; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.AuthenticationMechanism; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.SecurityPermission; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/** - * This is a sample resource adapter that will use some ra.xml info. This RA is - * used to assist with verifying the server supports annotations when there is - * no ra.xml (Assertion 268) and the transaction support is Local. - * - */ - -@Connector(description = "CTS Test Resource Adapter with No DD", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { - HintsContext.class, TransactionContext.class, SecurityContext.class }) -public class MDCompleteRAImpl implements ResourceAdapter, java.io.Serializable { - - private transient BootstrapContext bsc; - - private transient MDCompleteWorkManager mdwm; - - private transient WorkManager wm; - - private transient Work work; - - // this should cause the setter to get invoked - @ConfigProperty(defaultValue = "BAD_RAName_value", description = "String value", ignore = false) - String RAName; - - /** - * constructor - **/ - public MDCompleteRAImpl() { - debug("enterred constructor..."); - - debug("leaving constructor..."); - } - - // - // Begin ResourceAdapter interface requirements - // - - /* must implement for ResourceAdapter interface requirement */ - public void start(BootstrapContext bsc) - throws ResourceAdapterInternalException { - debug("enterred start"); - - debug("MDCompleteRAImpl.start called"); - - this.bsc = bsc; - this.wm = bsc.getWorkManager(); - - this.mdwm = new MDCompleteWorkManager(bsc); - mdwm.runTests(); - - debug("leaving start"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void stop() { - debug("entered stop"); - debug("leaving stop"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointActivation(MessageEndpointFactory factory, - ActivationSpec spec) throws NotSupportedException { - - debug("enterred endpointActivation"); - debug("leaving endpointActivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointDeactivation(MessageEndpointFactory ep, - ActivationSpec spec) { - debug("enterred endpointDeactivation"); - debug("leaving endpointDeactivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public XAResource[] getXAResources(ActivationSpec[] specs) - throws ResourceException { - - debug("enterred getXAResources"); - debug("leaving getXAResources"); - - throw new UnsupportedOperationException(); - } - - // - // END ResourceAdapter interface requirements - // - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof MDCompleteRAImpl)) { - return false; - } - if (obj == this) { - return true; - } - - MDCompleteRAImpl that = (MDCompleteRAImpl) obj; - - if (!Util.isEqual(this.RAName, that.getRAName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * this is the setter for the ConfigProperty annotation = RAName. According to - * onnector 1.6 spec, section 18.5, this setter must be invoked since it - * belongs to a ConfigProperty annotation for the ResourceAdapter JavaBean. - */ - public void setRAName(String name) { - this.RAName = name; - - // this helps verify assertion Connector:SPEC:279 - String str = "setRAName called with raname=" + RAName; - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - } - - public String getRAName() { - debug("MDCompleteRAImpl.getRAName"); - return RAName; - } - - public void debug(String out) { - Debug.trace("MDCompleteRAImpl: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java deleted file mode 100644 index 1782092758..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java +++ /dev/null @@ -1,347 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mdcomplete; - -import javax.transaction.xa.Xid; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.ContextWork; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.NestWork; -import com.sun.ts.tests.common.connector.whitebox.TSSecurityContext; -import com.sun.ts.tests.common.connector.whitebox.TSSecurityContextWithListener; -import com.sun.ts.tests.common.connector.whitebox.WorkImpl; -import com.sun.ts.tests.common.connector.whitebox.XidImpl; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.TransactionContext; -import jakarta.resource.spi.work.WorkCompletedException; -import jakarta.resource.spi.work.WorkContextErrorCodes; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class MDCompleteWorkManager { - private BootstrapContext bsc = null; - - private WorkManager wmgr; - - private String sicUser = ""; - - private String sicPwd = ""; - - private String eisUser = ""; - - private String eisPwd = ""; - - public MDCompleteWorkManager(BootstrapContext val) { - debug("enterred constructor"); - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - - this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); - debug("leaving constructor"); - } - - public void runTests() { - debug("enterred runTests"); - doWork(); - testNestedContext(); - testNestedContext2(); - testNestedContext3(); - submitTICWork(); - debug("leaving runTests"); - } - - public void doWork() { - debug("MDCompleteWorkManager enterred doWork"); - - try { - WorkImpl workimpl = new WorkImpl(wmgr); - ExecutionContext ec = startTx(); - ContextWork w1 = new ContextWork(wmgr); - - // helps test: Connector:SPEC:72, Connector:SPEC:73, Connector:SPEC:214 - // this better generate an end result of a WorkCompletedException with - // an error code == WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE - debug( - "MDCompleteWorkManager.doWork() submitting UnknownWorkContext generate error code."); - - UnknownWorkContext uwc = new UnknownWorkContext(); - uwc.setXid(ec.getXid()); - w1.addWorkContext(uwc); - - // submitting work inst w/ an unknown work context shoudl throw - // proper error code... - wmgr.doWork(w1); - - } catch (WorkCompletedException e) { - // this must throw exception == - // WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE - debug("MDCompleteWorkManager WorkCompletedException thrown is " - + e.getMessage()); - - // this helps verify assertion Connector:SPEC:214 - // get error code and make sure we get one that makes sense - String strErrorCode = e.getErrorCode(); - if (WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE.equals(strErrorCode)) { - // excellant - this is what we expect - ConnectorStatus.getConnectorStatus().logState( - "MDCompleteWorkManager threw WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE"); - debug( - "MDCompleteWorkManager threw WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE"); - } else { - // doh! we got incorrect error code - debug("MDCompleteWorkManager threw WorkContextErrorCodes = " - + strErrorCode); - } - } catch (WorkException we) { - debug("MDCompleteWorkManager WorkException thrown is " + we.getMessage()); - Debug.printDebugStack(we); - } catch (Exception ex) { - debug("MDCompleteWorkManager Exception thrown is " + ex.getMessage()); - Debug.printDebugStack(ex); - } - - debug("MDCompleteWorkManager leaving doWork"); - } - - /* - * this method is used to facilitate testing assertion Connector:SPEC:305 the - * idea here is to test as follows: - create parent work obj - add valid SIC - * to parent work obj - create 2nd work obj to be child and get nested within - * parent work obj - assign NO SIC to child work obj - add child work obj into - * parent - execute parent work obj - parent has valid SIC so should be okay - * but child has NO SIC and should NOT inherit the parents SIC so the child - * workobj XXXX: how to verify the workInst with no SIC did not inherit! - */ - public void testNestedContext2() { - - try { - debug("enterred testNestedWork2()"); - - // to properly test assert Connector:SPEC:305 we need to have nested - // work objects where each work has a context set. - ContextWork parent = new ContextWork(wmgr); - NestWork nw = new NestWork(); - - // create valid sic / creds for parent work obj - SecurityContext psic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, false); - - // lets add SIC to our parent work obj only - parent.addWorkContext(psic); // add SIC w/ valid creds - - // add our child workobj(ie nw) into our parent work obj - parent.addNestedWork(nw); - - wmgr.doWork(parent); - - } catch (WorkException e) { - debug("testNestedWork2() - got WorkException()"); - } catch (Exception e) { - // flow should not go here - debug("got exception in testNestedContext2() with user = " + sicUser - + " pwd = " + sicPwd + " principal=" + eisUser); - debug(e.toString()); - Debug.printDebugStack(e); - } - debug("leaving testNestedContext2()"); - } - - /* - * This method is used to facilitate testing assertion Connector:SPEC:210 The - * following steps are needed to validate assertion 210. - create parent work - * obj - add valid SIC to parent work obj - create 2nd work obj to be child - * and get nested within parent work obj - assign another valid - * (authenticatable) SIC to child work obj - add child work obj into parent - * work obj - execute parent work obj (which, in turn, attempts to execute - * child ) - parent has valid SIC so should be okay - but child does not - * - * The goal here is to show that the AS supports nested contexts by supplying - * 2 different SIC contexts (one valid and one invalid). - * - */ - public void testNestedContext3() { - - try { - debug("enterred testNestedWork3()"); - - // to properly test assert Connector:SPEC:305 we need to have nested - // work objects where each work has a context set. - ContextWork parent = new ContextWork(wmgr); - NestWork nw = new NestWork(); - - // create valid sic / creds for parent work obj - TSSecurityContext psic = new TSSecurityContext(sicUser, sicPwd, eisUser, - false); - - // create invalid sic / creds for child work obj - // note we pass 'false' as we expect it should fail to authenticate - // with teh bogus creds we are passing in...if it fails to authenticate, - // it should log appropriate msg stating so which menas that our - // child/nested work context did not inherit security from parent. - TSNestedSecurityContext csic = new TSNestedSecurityContext("phakeUsr", - "phakePwd", "phakeEis", false, false); - nw.addWorkContext(csic); // add SIC w/ invalid creds - - // lets add SIC to our parent work obj only - parent.addWorkContext(psic); // add SIC w/ valid creds - - // add our child workobj(ie nw) into our parent work obj - parent.addNestedWork(nw); - - wmgr.doWork(parent); - - } catch (WorkException e) { - debug("testNestedWork3() - got WorkException()"); - } catch (Exception e) { - // flow should not go here - debug("got exception in testSecurityInflow() with user = " + sicUser - + " pwd = " + sicPwd + " principal=" + eisUser); - debug(e.toString()); - Debug.printDebugStack(e); - } - - debug("leaving testNestedContext3()"); - } - - /* - * This method is used to facilitate testing assertion Connector:SPEC:210 The - * following steps are needed to validate assertion 210. - create parent work - * obj - add valid SIC to parent work obj - create 2nd work obj to be child - * and get nested within parent work obj - assign another valid - * (authenticatable) SIC to child work obj - add child work obj into parent - * work obj - execute parent work obj (which, in turn, attempts to execute - * child ) - parent has valid SIC so should be okay - same with child - * - * The goal here is to show that the AS supports nested contexts by supplying - * 2 different SIC contexts (both valid). - * - */ - public void testNestedContext() { - - String strPass = "Nested Work and Nested Security Context worked."; - - try { - debug("enterred testNestedContext()"); - - // to properly test assert Connector:SPEC:210 we need to have nested - // work objects where each work has a context set. - ContextWork parent = new ContextWork(wmgr); - NestWork nw = new NestWork(); - SecurityContext sic = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, false); - - // add SIC that should not be able to authenticate - SecurityContext sic2 = new TSSecurityContextWithListener(sicUser, sicPwd, - eisUser, false); - - // lets add two different SICs to our work objs - parent.addWorkContext(sic); // valid creds - nw.addWorkContext(sic2); // valid creds - - // add our child workobj(ie nw) into our parent work obj - parent.addNestedWork(nw); - - // this may or may not throw WorkCompletedException upon - // successful execution of work. - wmgr.doWork(parent); - - // note: flow should make it here and NOT yeild any exceptions. - ConnectorStatus.getConnectorStatus().logState(strPass); - debug(strPass); - - } catch (WorkCompletedException e) { - // could get here upon success work completion - ConnectorStatus.getConnectorStatus().logState(strPass); - debug(strPass); - } catch (Exception e) { - // should not get here - debug("got exception in testSecurityInflow() with user = " + sicUser - + " pwd = " + sicPwd + " principal=" + eisUser); - debug(e.toString()); - Debug.printDebugStack(e); - } - debug("leaving testNestedContext()"); - } - - public void submitTICWork() { - - try { - debug("enterred submitTICWork()"); - - ExecutionContext ec = startTx(); - ContextWork w1 = new ContextWork(wmgr); - TransactionContext tic = new TransactionContext(); - tic.setXid(ec.getXid()); - - // add same tic twice and AS should throw - // WorkContextErrorCodes.DUPLICATE_CONTEXTS - debug( - "adding Duplicate WorkContext (with dup TIC Listener) should throw WorkContextErrorCodes.DUPLICATE_CONTEXTS."); - w1.addWorkContext(tic); - w1.addWorkContext(tic); - wmgr.doWork(w1); - - debug("submitted Duplicate WorkContext with dup TIC Listener"); - - } catch (WorkCompletedException e) { - String strErrorCode = e.getErrorCode(); - if (WorkContextErrorCodes.DUPLICATE_CONTEXTS.equals(strErrorCode)) { - // excellant - this is what we expect - ConnectorStatus.getConnectorStatus().logState( - "MDCompleteWorkManager threw WorkContextErrorCodes.DUPLICATE_CONTEXTS"); - debug( - "MDCompleteWorkManager correctly threw WorkContextErrorCodes.DUPLICATE_CONTEXTS"); - } else { - // doh! we got incorrect error code - debug("MDCompleteWorkManager threw improper WorkContextErrorCodes = " - + strErrorCode); - } - debug("MDCompleteWorkManager threw WorkContextErrorCodes = " - + strErrorCode); - } catch (Exception e) { - debug( - "got bad exception when testing for WorkContextErrorCodes.DUPLICATE_CONTEXTS"); - Debug.printDebugStack(e); - } - debug("leaving submitTICWork()"); - } - - private ExecutionContext startTx() { - ExecutionContext ec = new ExecutionContext(); - try { - Xid xid = new XidImpl(); - ec.setXid(xid); - ec.setTransactionTimeout(5 * 1000); // 5 seconds - } catch (Exception ex) { - Debug.printDebugStack(ex); - } - return ec; - } - - public void debug(String out) { - Debug.trace("MDCompleteWorkManager: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java deleted file mode 100755 index 65cf5197b2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java +++ /dev/null @@ -1,388 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mdcomplete; - -import java.io.IOException; -import java.security.Principal; -import java.util.ArrayList; -import java.util.List; - -import javax.security.auth.Subject; -import javax.security.auth.callback.Callback; -import javax.security.auth.callback.CallbackHandler; -import javax.security.auth.callback.UnsupportedCallbackException; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.SimplePrincipal; - -import jakarta.resource.spi.work.SecurityContext; -import jakarta.security.auth.message.callback.CallerPrincipalCallback; -import jakarta.security.auth.message.callback.GroupPrincipalCallback; -import jakarta.security.auth.message.callback.PasswordValidationCallback; - -/* - * This is used to facilitate testing of the SecurityContext class. - * The things to note/remember about this class are: - * - there are two types of security scenarios RA's utilize for - * passing creds: Case-1 and Case-2 security. - * Case-1: use creds that are expected to exist on the Appserver - * Case-2: set up mappings in appserver (to map EIS creds to AS creds) - * then the RA can flow EIS creds to AS and let AS handle mappings. - * - a RA can NOT do case-1 and case-2 at the same time. a RA must be - * configured to do only ONE case at a time. (the configuration is usually - * done by AS ina proprietary way. For RI(GFv3), Case-1 is default, and - * Case-2 is done by specifying mapping in domain.xml. - * - CPC *must* be called after GPC and PVC - * - PVC *should* have same creds as CPC - * - due to spec optimization, GPC can be called without CPC but this - * is somewhat controversial and not recommended. - * - */ -public class TSNestedSecurityContext extends SecurityContext { - - private String userName; // server side username - - private String password; // server side pwd - - private String eisPrincipalName; // eis principal name - - private boolean translationRequired; - - private Subject subject; - - private String description; - - private String sicName; - - protected boolean expectPVCSuccess = true; - - // unlike TSSecurityContext, we want these all enabled by default - private boolean useCPC = true; - - private boolean useGPC = true; - - private boolean usePVC = true; - - public TSNestedSecurityContext(String userName, String password, - String eisPrincipalName, boolean translationRequired) { - this(userName, password, eisPrincipalName, translationRequired, true); - } - - public TSNestedSecurityContext(String userName, String password, - String eisPrincipalName, boolean translationRequired, - boolean expectSuccess) { - this.userName = userName; - this.password = password; - this.eisPrincipalName = eisPrincipalName; - this.translationRequired = translationRequired; - - this.sicName = super.getName(); - this.description = super.getDescription(); - this.expectPVCSuccess = expectSuccess; - } - - public void setCallbacks(boolean bCPC, boolean bGPC, boolean bPVC) { - this.useCPC = bCPC; - this.useGPC = bGPC; - this.usePVC = bPVC; - } - - public void setUserName(String val) { - this.userName = val; - } - - public String getUserName() { - return this.userName; - } - - public void setDescription(String val) { - this.description = val; - } - - public String getDescription() { - return this.description; - } - - public void setName(String val) { - this.sicName = val; - } - - public String getName() { - return this.sicName; - } - - public void setUseCPC(boolean val) { - this.useCPC = val; - } - - public boolean getUseCPC() { - return this.useCPC; - } - - public void setUseGPC(boolean val) { - this.useGPC = val; - } - - public boolean getUseGPC() { - return this.useGPC; - } - - public void setUsePVC(boolean val) { - this.usePVC = val; - } - - public boolean getUsePVC() { - return this.usePVC; - } - - public boolean isTranslationRequired() { - return translationRequired; - } - - /* - * This is used to help verify assertion Connector:SPEC:229, which states a - * couple requirements with the following being focused on within this method: - * "The following conditions are applicable to the application server provider - * while calling the setupSecurityContext method: the CallbackHandler - * implementation passed as the argument handler to setupSecurityContext must - * support the following JSR-196 Callbacks: CallerPrincipalCallback, - * GroupPrincipalCallback, and PasswordValidationCallback" - * - */ - public void doCallbackVerification(CallbackHandler callbackHandler, - Subject execSubject, Subject serviceSubject, Principal principal) { - List callbacks = new ArrayList(); - - debug("in doCallbackVerification() " + " translationRequired=" - + translationRequired + " expectPVCSuccess=" + expectPVCSuccess); - - GroupPrincipalCallback gpc = null; - String[] gpcGroups = { "phakegrp1", "phakegrp2" }; - if (useGPC) { - // we are passing invalid grps to the GPC but it should not - // matter if the CPC is specified after the GPC. - debug("doCallbackVerification(): initializing PVC"); - gpc = new GroupPrincipalCallback(execSubject, gpcGroups); - debug("GPC with groups={phakegrp1, phakegrp2} "); - callbacks.add(gpc); - } - - PasswordValidationCallback pvc = null; - if (usePVC && !translationRequired) { - // per JCA 1.6 spec (16.4.2) PVC can be used in Case-1 only. - // NOTE: PVC user should match that of CPC - debug("doCallbackVerification(): initializing PVC"); - char[] pwd = null; - if (password != null) { - // if password is supplied - use that first - pwd = password.toCharArray(); - } - - if (userName != null) { - // if userName is supplied - use that first - pvc = new PasswordValidationCallback(execSubject, userName, pwd); - debug("setting PVC with user [ " + userName + " ] + password [ " - + password + " ]"); - } else { - // null username - likely a problem if here. - pvc = new PasswordValidationCallback(execSubject, null, pwd); - debug("setting PVC with user=null + password [ " + password + " ]"); - } - callbacks.add(pvc); - } - - CallerPrincipalCallback cpc = null; - if (usePVC || useCPC) { - execSubject.getPrincipals().add(new SimplePrincipal(userName, password)); - debug("setting CPC with userName : " + userName + " pwd = " + password); - cpc = new CallerPrincipalCallback(execSubject, userName); - - callbacks.add(cpc); - } - - Callback callbackArray[] = new Callback[callbacks.size()]; - try { - callbackHandler.handle(callbacks.toArray(callbackArray)); - - // if we made it here, then no exceptions - we can assume success since - // we got no unsupported callback exceptions. - String sval = "setupSecurityContext callbackhandler supports required callback types."; - debug(sval); - - if ((pvc != null) && (!pvc.getResult())) { - sval = "Password validation callback failure for userName = " - + userName; - debug(sval); - if (this.expectPVCSuccess) { - String str = "ERROR: got unexpected PVC failed for user " + userName; - debug(str); - throw new Error(str); - } else { - // NOTE: if here - we expected to fail and it happened - this is good! - String str = "TSNestedSecurityContext expected PVC failure and got it."; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - } else { - // this file is designed so that we *should* be getting a pvc failure - // back but - // if we are in here, it implies we had something go wrong. - if (pvc == null) { - debug("ERROR : pvc = null but should have be non-null"); - debug("usePVC = " + usePVC); - } else { - debug("ERROR : pvc.getResult()=" + pvc.getResult()); - debug("usePVC = " + usePVC); - } - } - - } catch (UnsupportedCallbackException e) { - String sval = "setupSecurityContext() callbackhandler does not support a required callback type!"; - debug("doCallbackVerification(): " + sval); - debug("UnsupportedCallbackException message is : " + e.getMessage()); - e.printStackTrace(); - - } catch (IOException e) { - e.printStackTrace(); - debug("doCallbackVerification(): exception occured : " + e.getMessage()); - } - - } - - public void setupSecurityContext(CallbackHandler callbackHandler, - Subject execSubject, Subject serviceSubject) { - - // validate args are spec compliant - validateCallbackHandler(callbackHandler); - validateExecSubject(execSubject); - validateServiceSubject(serviceSubject); - - Principal principal = null; - if (translationRequired && (eisPrincipalName != null)) { - // add eis principal that needs a security mapping in app server domain - principal = new SimplePrincipal(eisPrincipalName); - debug( - "setupSecurityContext(): translationRequired && (eisPrincipalName != null)"); - } else if (!translationRequired && (userName != null)) { - // add principal that exists in App Server Security domain - principal = new SimplePrincipal(userName); - debug( - "setupSecurityContext(): !translationRequired && (userName != null)"); - } - - // assist with assertion Connector:SPEC:229 - if (callbackHandler != null) { - String str = "setupSecurityContext() called with non-null callbackHandler"; - debug(str); - - // now make sure the 3 callback types are supported by the App Server - doCallbackVerification(callbackHandler, execSubject, serviceSubject, - principal); - - } else { - debug( - "setupSecurityContext() called with invalid (null) callbackHandler"); - } - - } - - /* - * this method is used to perform a simple validation that the callbackHandler - * is spec compliant per assertion Connector:SPEC:229 - */ - private void validateCallbackHandler(CallbackHandler callbackHandler) { - - // assist with assertion Connector:SPEC:229 - if (callbackHandler != null) { - String str = "setupSecurityContext() called with non-null callbackHandler"; - debug(str); - } else { - String str = "setupSecurityContext() called with invalid (null) callbackHandler"; - debug(str); - } - } - - /* - * this method is used to perform a simple validation that the execSubject is - * spec compliant per assertion Connector:SPEC:230 - */ - private void validateExecSubject(Subject execSubject) { - - if ((execSubject != null) && (!execSubject.isReadOnly())) { - String str = "setupSecurityContext() called with valid executionSubject"; - debug(str); - } else { - String str = "ERROR: setupSecurityContext() called with invalid executionSubject"; - debug(str); - } - - } - - /* - * this method is used to perform a simple validation that the serviceSubject - * is spec compliant per assertion Connector:SPEC:231 - */ - private void validateServiceSubject(Subject serviceSubject) { - - if ((serviceSubject != null) && (!serviceSubject.isReadOnly())) { - // this is good: if serviceSubject != null, then it must not be readonly - String str = "setupSecurityContext() called with valid serviceSubject"; - debug(str); - } else if ((serviceSubject != null) && (serviceSubject.isReadOnly())) { - // ohoh, serviceSubject !=null but it is readonly and this is not valid! - String str = "setupSecurityContext() called with invalid executionSubject"; - debug(str); - } else if (serviceSubject == null) { - // invalid serviceSubject called - according to API doc -it cant be null - String str = "ERROR - setupSecurityContext() called with null serviceSubject."; - } else { - // this is also a valid serviceSubject for our setupSecurityContext() - String str = "setupSecurityContext() called with valid serviceSubject"; - debug(str); - } - - } - - public Subject getSubject() { - if (translationRequired) { - if (subject == null) { - // setting translation required for principal - subject = new Subject(); - subject.getPrincipals().add(new SimplePrincipal(eisPrincipalName)); - } - return subject; - } else { - return null; - } - } - - public String toString() { - StringBuffer toString = new StringBuffer("{"); - toString.append("userName : " + userName); - toString.append(", password : " + password); - toString.append(", eisPrincipalName : " + eisPrincipalName); - toString.append(", translationRequired : " + translationRequired); - toString.append("}"); - return toString.toString(); - } - - public void debug(String message) { - Debug.trace(" in TSNestedSecurityContext: " + message); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java deleted file mode 100644 index d2e7befac7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mixedmode; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionDefinition; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -@ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) - -public class PMDManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String password; - - private String user; - - private String userName; - - @ConfigProperty(defaultValue = "PMDManagedConnectionFactory", description = "String value", ignore = false, supportsDynamicUpdates = false, confidential = false) - String factoryName; - - @ConfigProperty(description = "String value", ignore = false) - String noDefaultValue = "NO_DEFAULT_VAL"; - - /* - * @name PMDManagedConnectionFactory - * - * @desc Default conctructor - */ - public PMDManagedConnectionFactory() { - } - - public void setFactoryName(String name) { - // this helps verify assertion Connector:SPEC:307 and Connector:SPEC:267 - // and this behavior is described in connector 1.6 spec section 18.5 - String str = "PMDManagedConnectionFactory factoryname=" + name; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - - this.factoryName = name; - - // this helps verify assertion Connector:SPEC:277 - // and this behavior is described in connector 1.6 spec section 18.5 - str = "PMDManagedConnectionFactory noDefaultValue=" + this.noDefaultValue; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - public String getFactoryName() { - return factoryName; - } - - public void setNoDefaultValue(String val) { - this.noDefaultValue = val; - } - - public String getNoDefaultValue() { - return noDefaultValue; - } - - public String getUser() { - debug("PMDManagedConnectionFactory.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - debug("PMDManagedConnectionFactory.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - debug("PMDManagedConnectionFactory.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - debug("PMDManagedConnectionFactory.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - debug("PMDManagedConnectionFactory.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - debug("PMDManagedConnectionFactory.setPassword() with val = " + val); - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "PMDManagedConnectionFactory.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "PMDManagedConnectionFactory.createConnectionFactory", "", - "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String( - "PMDManagedConnectionFactory setResourceAdapter " + count); - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("PMDManagedConnectionFactory.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "PMDManagedConnectionFactory.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug( - "PMDManagedConnectionFactory.createManagedConnection(): pc == null"); - debug("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - debug( - "PMDManagedConnectionFactory.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - debug("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "PMDManagedConnectionFactory.matchManagedConnection", - "connectionSet|subject|info", "TSEISDataSource"); - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof PMDManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - PMDManagedConnectionFactory that = (PMDManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - if (!Util.isEqual(this.noDefaultValue, that.getNoDefaultValue())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("PMDManagedConnectionFactory: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java deleted file mode 100755 index aaaa0f454d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java +++ /dev/null @@ -1,229 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mixedmode; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.AuthenticationMechanism; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.SecurityPermission; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/** - * This is a sample resource adapter that will use some ra.xml info. This RA is - * used to assist with verifying the server supports annotations when there is - * no ra.xml (Assertion 268) and the transaction support is Local. - * - */ - -@Connector(description = "CTS Test Resource Adapter with No DD", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { - HintsContext.class, SecurityContext.class }) -public class PMDResourceAdapterImpl - implements ResourceAdapter, java.io.Serializable { - - private transient BootstrapContext bsc; - - private transient PMDWorkManager pwm; - - private transient WorkManager wm; - - private transient Work work; - - // this should cause the setter to get invoked - @ConfigProperty(defaultValue = "PartialMDResourceAdapter", description = "String value", ignore = false) - String raName; - - @ConfigProperty(defaultValue = "VAL_FROM_ANNOTATION", description = "String value", ignore = false) - String overRide; - - String mdPropOnly; - - /** - * constructor - **/ - public PMDResourceAdapterImpl() { - debug("enterred constructor..."); - - debug("leaving constructor..."); - } - - // - // Begin ResourceAdapter interface requirements - // - - /* must implement for ResourceAdapter interface requirement */ - public void start(BootstrapContext bsc) - throws ResourceAdapterInternalException { - debug("enterred start"); - debug("PMDResourceAdapterImpl.start called"); - - this.bsc = bsc; - this.wm = bsc.getWorkManager(); - - this.pwm = new PMDWorkManager(bsc); - pwm.runTests(); - - debug("leaving start"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void stop() { - debug("entered stop"); - debug("leaving stop"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointActivation(MessageEndpointFactory factory, - ActivationSpec spec) throws NotSupportedException { - - debug("enterred endpointActivation"); - debug("leaving endpointActivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointDeactivation(MessageEndpointFactory ep, - ActivationSpec spec) { - debug("enterred endpointDeactivation"); - debug("leaving endpointDeactivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public XAResource[] getXAResources(ActivationSpec[] specs) - throws ResourceException { - - debug("enterred getXAResources"); - debug("leaving getXAResources"); - - throw new UnsupportedOperationException(); - } - - // - // END ResourceAdapter interface requirements - // - - /* - * this is the setter for the ConfigProperty annotation = raName. According to - * onnector 1.6 spec, section 18.5, this setter must be invoked since it - * belongs to a ConfigProperty annotation for the ResourceAdapter JavaBean. - */ - public void setRaName(String name) { - this.raName = name; - - // this helps verify assertion Connector:SPEC:279 - String str = "setRAName called with raname=" + raName; - debug(str); - ConnectorStatus.getConnectorStatus().logState(str); - } - - public String getRaName() { - return raName; - } - - public void setOverRide(String name) { - - // this is used to help test behavior is described in connector1.6 - // spec in section 18.3.2 - where the ConfigProperty specified in the DD - // file - // should override the ConfigProperty in this file. - String str = "PMDResourceAdapterImpl overRide=" + name; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - - this.overRide = name; - } - - public String getOverRide() { - return overRide; - } - - public void setMdPropOnly(String name) { - - // this is used to help test assertion Connector:SPEC:273 - String str = "PMDResourceAdapterImpl mdPropOnly=" + name; - debug(str); - - this.mdPropOnly = name; - } - - public String getMdPropOnly() { - return mdPropOnly; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof PMDResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - PMDResourceAdapterImpl that = (PMDResourceAdapterImpl) obj; - - if (!Util.isEqual(this.mdPropOnly, that.getMdPropOnly())) - return false; - - if (!Util.isEqual(this.overRide, that.getOverRide())) - return false; - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void debug(String out) { - Debug.trace("PMDResourceAdapterImpl: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java deleted file mode 100644 index 968cde370d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.mixedmode; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.WorkImpl; -import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.work.ExecutionContext; -import jakarta.resource.spi.work.WorkException; -import jakarta.resource.spi.work.WorkManager; - -public class PMDWorkManager { - private BootstrapContext bsc = null; - - private WorkManager wmgr; - - private String sicUser = ""; - - private String sicPwd = ""; - - private String eisUser = ""; - - public PMDWorkManager(BootstrapContext val) { - debug("enterred constructor"); - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - - this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - debug("leaving constructor"); - } - - public void runTests() { - debug("enterred runTests"); - doWork(); - debug("leaving runTests"); - } - - public void doWork() { - debug("enterred doWork"); - - try { - WorkImpl workimpl = new WorkImpl(wmgr); - - ExecutionContext ec = new ExecutionContext(); - WorkListenerImpl wl = new WorkListenerImpl(); - wmgr.doWork(workimpl, 5000, ec, wl); - debug("PMDWorkManager Work Object Submitted"); - } catch (WorkException we) { - System.out - .println("PMDWorkManager WorkException thrown is " + we.getMessage()); - } catch (Exception ex) { - System.out - .println("PMDWorkManager Exception thrown is " + ex.getMessage()); - } - - debug("leaving doWork"); - } - - public void debug(String out) { - Debug.trace("PMDWorkManager: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java deleted file mode 100644 index 923bd0cee9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java +++ /dev/null @@ -1,356 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -public class MAManagedConnectionFactory implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String password; - - private String user; - - private String userName; - - /* - * @name MAManagedConnectionFactory - * - * @desc Default conctructor - */ - public MAManagedConnectionFactory() { - - } - - public String getUser() { - return user; - } - - public void setUser(String val) { - user = val; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String val) { - userName = val; - } - - public String getPassword() { - return password; - } - - public void setPassword(String val) { - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MAManagedConnectionFactory.createConnectionFactory", "cxManager", - "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MAManagedConnectionFactory.createConnectionFactory", "", - "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String( - "MAManagedConnectionFactory setResourceAdapter " + count); - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("MAManagedConnectionFactory.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "MAManagedConnectionFactory.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug( - "MAManagedConnectionFactory.createManagedConnection(): pc == null"); - debug("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - debug( - "MAManagedConnectionFactory.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - debug("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - return new TSManagedConnection(this, pc, null, con, false, true); - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "MAManagedConnectionFactory.matchManagedConnection", - "connectionSet|subject|info", "TSEISDataSource"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof MAManagedConnectionFactory)) { - return false; - } - if (obj == this) { - return true; - } - - MAManagedConnectionFactory that = (MAManagedConnectionFactory) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - - private void debug(String str) { - Debug.trace(str); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java deleted file mode 100644 index c4bf37d149..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.Serializable; -import java.lang.reflect.Method; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -public class MAResourceAdapterImpl implements ResourceAdapter, Serializable { - private String overRide = "default"; - - private String raName; - - private int counter = 0; - - private transient WorkManager wm; - - private transient BootstrapContext bsc; - - public MAResourceAdapterImpl() { - Debug.trace("MAResourceAdapterImpl Constructor "); - } - - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - String str1 = new String("MAResourceAdapterImpl Started " + counter); - ConnectorStatus.getConnectorStatus().logState(str1); - - // get WorkManager reference - wm = bsc.getWorkManager(); - - try { - checkAssociation(); - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - Debug.trace("MAResourceAdapterImpl.myStart "); - } - - public void stop() { - Debug.trace("MAResourceAdapterImpl.stop "); - } - - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - Debug.trace("MAResourceAdapterImpl.endpointActivation "); - } - - public XAResource[] getXAResources(ActivationSpec[] as) { - Debug.trace("MAResourceAdapterImpl.getXAResources "); - return null; - } - - private Method getOnMessageMethod() { - Debug.trace("MAResourceAdapterImpl.getOnMessageMethod "); - Method onMessageMethod = null; - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - Debug.trace("MAResourceAdapterImpl.chkUniqueMessageEndpointFactory"); - } - - public void checkAssociation() { - Debug.trace("MAResourceAdapterImpl.checkAssociation"); - } - - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - Debug.trace("MAResourceAdapterImpl.endpointDeactivation "); - } - - public void setRaName(String name) { - Debug.trace("MAResourceAdapterImpl.setRAName"); - this.raName = name; - } - - public String getRaName() { - Debug.trace("MAResourceAdapterImpl.getRAName"); - return raName; - } - - public void setOverRide(String val) { - Debug.trace("MAResourceAdapterImpl.setOverRide = " + val); - this.overRide = val; - } - - public String getOverRide() { - Debug.trace("MAResourceAdapterImpl.getOverRide"); - return overRide; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof MAResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - MAResourceAdapterImpl that = (MAResourceAdapterImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - if (!Util.isEqual(this.overRide, that.getOverRide())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java deleted file mode 100644 index 6f545e5078..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -/* - * This class shouldnt really get used. The ra.xml should be specifying to - * use an MCF other than this one. (This is in order to assist with validating - * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312. - * - */ -public class OtherMCF implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String password; - - private String user; - - private String userName; - - /* - * @name OtherMCF - * - * @desc Default conctructor - */ - public OtherMCF() { - - } - - public String getUser() { - return user; - } - - public void setUser(String val) { - user = val; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String val) { - userName = val; - } - - public String getPassword() { - return password; - } - - public void setPassword(String val) { - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "OtherMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus() - .logAPI("OtherMCF.createConnectionFactory", "", "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String("OtherMCF setResourceAdapter " + count); - Debug.trace(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "OtherMCF.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - Debug.trace("OtherMCF.createManagedConnection(): pc == null"); - Debug.trace("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - Debug.trace("OtherMCF.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - Debug.trace("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - return new TSManagedConnection(this, pc, null, con, false, true); - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "OtherMCF.matchManagedConnection", "connectionSet|subject|info", - "TSEISDataSource"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("setLogWriter", "out", ""); - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("getLogWriter", "", ""); - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof OtherMCF)) { - return false; - } - if (obj == this) { - return true; - } - - OtherMCF that = (OtherMCF) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java deleted file mode 100644 index 70fe3dbc4c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.Serializable; -import java.lang.reflect.Method; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/* - * This class shouldnt really get used. The ra.xml should be specifying to - * use a RAImple other than this one. (This is in order to assist with validating - * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312. - * - */ -@Connector(description = "CTS test RA specified in DD is used", displayName = "OtherRAImpl", vendorName = "Java Software", eisType = "TS EIS", version = "1.0", licenseDescription = "CTS License Required", licenseRequired = true, reauthenticationSupport = false, transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { - HintsContext.class, SecurityContext.class }) - -public class OtherRAImpl implements ResourceAdapter, Serializable { - private String raName; - - private int counter = 0; - - private transient WorkManager wm; - - private transient BootstrapContext bsc; - - public OtherRAImpl() { - Debug.trace("OtherRAImpl Constructor "); - } - - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - String str1 = new String("OtherRAImpl Started " + counter); - Debug.trace(str1); - - // get WorkManager reference - - wm = bsc.getWorkManager(); - - try { - checkAssociation(); - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - Debug.trace("OtherRAImpl.myStart "); - } - - public void stop() { - Debug.trace("OtherRAImpl.stop "); - } - - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - public XAResource[] getXAResources(ActivationSpec[] as) { - Debug.trace("OtherRAImpl.getXAResources "); - return null; - } - - private Method getOnMessageMethod() { - Method onMessageMethod = null; - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - } - - public void checkAssociation() { - } - - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof OtherRAImpl)) { - return false; - } - if (obj == this) { - return true; - } - - OtherRAImpl that = (OtherRAImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRaName(String name) { - this.raName = name; - } - - public String getRaName() { - return raName; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java deleted file mode 100644 index 357a4c046b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -/* - * This class shouldnt really get used. The ra.xml should be specifying to - * use an MCF other than this one. (This is in order to assist with validating - * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312, - * Connector:SPEC:274. - * - */ -public class ThirdMCF implements ManagedConnectionFactory, - ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String password; - - private String user; - - private String userName; - - /* - * @name ThirdMCF - * - * @desc Default conctructor - */ - public ThirdMCF() { - } - - public String getUser() { - return user; - } - - public void setUser(String val) { - user = val; - } - - public String getUserName() { - return userName; - } - - public void setUserName(String val) { - userName = val; - } - - public String getPassword() { - return password; - } - - public void setPassword(String val) { - password = val; - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "ThirdMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - ConnectorStatus.getConnectorStatus() - .logAPI("ThirdMCF.createConnectionFactory", "", "TSEISDataSource"); - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = new String("ThirdMCF setResourceAdapter " + count); - Debug.trace(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - ConnectorStatus.getConnectorStatus().logAPI( - "ThirdMCF.createManagedConnection", "subject|info", - "TSManagedConnection"); - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - Debug.trace("ThirdMCF.createManagedConnection(): pc == null"); - Debug.trace("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - Debug.trace("ThirdMCF.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - Debug.trace("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - return new TSManagedConnection(this, pc, null, con, false, true); - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI( - "ThirdMCF.matchManagedConnection", "connectionSet|subject|info", - "TSEISDataSource"); - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && mcf.equals(this)) { - return mc; - } - } - } - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("setLogWriter", "out", ""); - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - ConnectorStatus.getConnectorStatus().logAPI("getLogWriter", "", ""); - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof ThirdMCF)) { - return false; - } - if (obj == this) { - return true; - } - - ThirdMCF that = (ThirdMCF) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java deleted file mode 100644 index e74385be08..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.multianno; - -import java.io.Serializable; -import java.lang.reflect.Method; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/* - * This class shouldnt really get used. The ra.xml should be specifying to - * use a RAImple other than this one. (This is in order to assist with validating - * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312, - * Connector:SPEC:274. - * - */ -@Connector(description = "CTS test RA specified in DD is used", displayName = "ThirdRAImpl", vendorName = "Java Software", eisType = "TS EIS", version = "1.0", licenseDescription = "CTS License Required", licenseRequired = true, reauthenticationSupport = false, transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { - HintsContext.class, SecurityContext.class }) - -public class ThirdRAImpl implements ResourceAdapter, Serializable { - private String raName; - - private int counter = 0; - - private transient WorkManager wm; - - private transient BootstrapContext bsc; - - public ThirdRAImpl() { - Debug.trace("ThirdRAImpl Constructor "); - } - - public void start(final BootstrapContext bsc) - throws ResourceAdapterInternalException { - // setup network endpoints - counter++; - this.bsc = bsc; - String str1 = new String("ThirdRAImpl Started " + counter); - Debug.trace(str1); - - // get WorkManager reference - wm = bsc.getWorkManager(); - - try { - checkAssociation(); - bsc.getWorkManager().startWork(new Work() { - public void run() { - myStart(bsc); - } - - public void release() { - } - - }); - } catch (jakarta.resource.spi.work.WorkException we) { - throw new ResourceAdapterInternalException(); - } - - } - - private void myStart(final BootstrapContext ctx) { - Debug.trace("ThirdRAImpl.myStart "); - } - - public void stop() { - Debug.trace("ThirdRAImpl.stop "); - } - - public void endpointActivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - public XAResource[] getXAResources(ActivationSpec[] as) { - Debug.trace("ThirdRAImpl.getXAResources "); - return null; - } - - private Method getOnMessageMethod() { - Method onMessageMethod = null; - return onMessageMethod; - } - - private void chkUniqueMessageEndpointFactory() { - } - - public void checkAssociation() { - } - - public void endpointDeactivation(MessageEndpointFactory mef, - ActivationSpec as) { - } - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof ThirdRAImpl)) { - return false; - } - if (obj == this) { - return true; - } - - ThirdRAImpl that = (ThirdRAImpl) obj; - - if (this.counter != that.getCounter()) { - return false; - } - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRaName(String name) { - this.raName = name; - } - - public String getRaName() { - return raName; - } - - public void setCounter(int val) { - this.counter = val; - } - - public int getCounter() { - return this.counter; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java deleted file mode 100644 index 1ade7ac9b3..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java +++ /dev/null @@ -1,500 +0,0 @@ -/* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.permissiondd; - -import java.io.PrintWriter; -import java.io.Serializable; -import java.util.Iterator; -import java.util.Set; - -import javax.security.auth.Subject; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.TSConnection; -import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; -import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; -import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.ConnectionDefinition; -import jakarta.resource.spi.ConnectionDefinitions; -import jakarta.resource.spi.ConnectionManager; -import jakarta.resource.spi.ConnectionRequestInfo; -import jakarta.resource.spi.EISSystemException; -import jakarta.resource.spi.ManagedConnection; -import jakarta.resource.spi.ManagedConnectionFactory; -import jakarta.resource.spi.ManagedConnectionMetaData; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterAssociation; -import jakarta.resource.spi.security.PasswordCredential; - -@ConnectionDefinitions({ - @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) -public class PermissionDDMCF implements ManagedConnectionFactory, - ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { - private javax.naming.Reference reference; - - private ResourceAdapter resourceAdapter; - - private int count; - - private String tsrValue; - - private String password; - - private String user; - - private String userName; - - private String setterMethodVal = "DEFAULT"; - - @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) - private Integer integer; - - @ConfigProperty() - private String factoryName = "PermissionDDMCF"; - - /* - * @name PermissionDDMCF - * - * @desc Default conctructor - */ - public PermissionDDMCF() { - // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 - String str = "PermissionDDMCF factoryName=" + factoryName; - ConnectorStatus.getConnectorStatus().logState(str); - - // lets make sure we can call and set setSetterMethodVal() - setSetterMethodVal("NONDEFAULT"); - - debug(str); - } - - /* - * used to help test assertion Connector:SPEC:278 - */ - @ConfigProperty() - public void setSetterMethodVal(String val) { - setterMethodVal = val; - String str = "PermissionDDResourceAdapterImpl.setSetterMethodVal=" - + setterMethodVal; - ConnectorStatus.getConnectorStatus().logState(str); - } - - public String getSetterMethodVal() { - return setterMethodVal; - } - - public void setFactoryName(String name) { - this.factoryName = name; - } - - public String getFactoryName() { - return factoryName; - } - - public Integer getInteger() { - return this.integer; - } - - public void setInteger(Integer val) { - this.integer = val; - } - - public String getUser() { - debug("PermissionDDMCF.getUser() returning: " + user); - return user; - } - - public void setUser(String val) { - debug("PermissionDDMCF.setUser() with val = " + val); - user = val; - } - - public String getUserName() { - debug("PermissionDDMCF.getUserName() returning: " + userName); - return userName; - } - - public void setUserName(String val) { - debug("PermissionDDMCF.setUserName() with val = " + val); - userName = val; - } - - public String getPassword() { - debug("PermissionDDMCF.getPassword() returning: " + password); - return password; - } - - public void setPassword(String val) { - debug("PermissionDDMCF.setPassword() with val = " + val); - password = val; - } - - public String getTsrValue() { - debug("PermissionDDMCF getTsrValue called" + tsrValue); - return tsrValue; - } - - public void setTsrValue(String name) { - debug("PermissionDDMCF setTsrValue called" + name); - this.tsrValue = name; - } - - public void lookupTSR(String lookup) { - try { - TSNamingContext ncxt = new TSNamingContext(); - String newStr = "java:".concat(lookup); - Object obj = (Object) ncxt.lookup(newStr); - if (obj != null) { - debug("TSR NOT Null"); - } else { - debug("TSR Null"); - } - } catch (Exception e) { - e.printStackTrace(); - } - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @param ConnectionManager - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory(ConnectionManager cxManager) - throws ResourceException { - return new TSEISDataSource(this, cxManager); - } - - /* - * @name createConnectionFactory - * - * @desc Creates a new connection factory instance - * - * @return Object - * - * @exception ResourceException - */ - public Object createConnectionFactory() throws ResourceException { - return new TSEISDataSource(this, null); - } - - /* - * @name setResourceAdapter - * - * @desc sets the Resource Adapter for this ManagedConnectionFactory - * - * @return - * - * @exception ResourceException - */ - public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { - count++; - String newStr1 = "PermissionDDMCF setResourceAdapter " + count; - debug(newStr1); - this.resourceAdapter = ra; - } - - /* - * @name getResourceAdapter - * - * @desc gets the Resource Adapter for this ManagedConnectionFactory - * - * @return Object - * - * @exception ResourceException - */ - public ResourceAdapter getResourceAdapter() { - debug("PermissionDDMCF.getResource"); - return resourceAdapter; - } - - /* - * @name createManagedConnection - * - * @desc Creates a new managed connection to the underlying EIS - * - * @param Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection createManagedConnection(Subject subject, - ConnectionRequestInfo info) throws ResourceException { - - try { - - TSConnection con = null; - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - if (pc == null) { - debug("PermissionDDMCF.createManagedConnection(): pc == null"); - debug("TSConnectionImpl.getConnection()"); - con = new TSConnectionImpl().getConnection(); - } else { - debug("PermissionDDMCF.createManagedConnection(): pc != null"); - setUser(pc.getUserName()); - setUserName(pc.getUserName()); - setPassword(new String(pc.getPassword())); - debug("TSConnectionImpl.getConnection(u,p)"); - con = new TSConnectionImpl().getConnection(pc.getUserName(), - pc.getPassword()); - } - - ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, - false, true); - dumpConnectionMetaData(mcon); - - return mcon; - } catch (Exception ex) { - ResourceException re = new EISSystemException( - "Exception: " + ex.getMessage()); - re.initCause(ex); - throw re; - } - - } - - public void dumpConnectionMetaData(ManagedConnection mcon) { - - String hdr = "PermissionDDMCF: "; - String out; - boolean bLocal = false; - boolean bXA = false; - - try { - ManagedConnectionMetaData mdata = mcon.getMetaData(); - - out = hdr + "displayName=" + mdata.getEISProductName(); - debug(out); - - out = hdr + "version=" + mdata.getEISProductVersion(); - debug(out); - - // get transaction type - try { - mcon.getLocalTransaction(); - bLocal = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a localTransaction type"); - } - try { - mcon.getXAResource(); - bXA = true; - } catch (ResourceException ex) { - System.out.println(hdr + "not a XAResource type"); - } - - out = hdr + "transactionSupport="; - if (bLocal) { - out = out + "LocalTransaction"; - } else if (bXA) { - out = out + "XATransaction"; - } else { - // assume default case of noTx - out = out + "NoTransaction"; - } - debug(out); - } catch (ResourceException ex) { - System.out.println(ex.getMessage()); - ex.printStackTrace(); - } - } - - /* - * @name matchManagedConnection - * - * @desc Return the existing connection from the connection pool - * - * @param Set, Subject, ConnectionRequestInfo - * - * @return ManagedConnection - * - * @exception ResourceException - */ - public ManagedConnection matchManagedConnections(Set connectionSet, - Subject subject, ConnectionRequestInfo info) throws ResourceException { - - PasswordCredential pc = Util.getPasswordCredential(this, subject, info); - Iterator it = connectionSet.iterator(); - - while (it.hasNext()) { - Object obj = it.next(); - if (obj instanceof TSManagedConnection) { - TSManagedConnection mc = (TSManagedConnection) obj; - ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); - if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) - && (mcf != null) && mcf.equals(this)) { - return mc; - } - } - } - - System.out.println("matchManagedConnections: couldnt find match"); - return null; - } - - /* - * @name setLogWriter - * - * @desc Sets the Print Writer - * - * @param PrintWriter - * - * @exception ResourceException - */ - public void setLogWriter(PrintWriter out) throws ResourceException { - } - - /* - * @name getLogWriter - * - * @desc Gets the Print Writer - * - * @return PrintWriter - * - * @exception ResourceException - */ - public PrintWriter getLogWriter() throws ResourceException { - return null; - } - - /* - * @name equals - * - * @desc Compares the given object to the ManagedConnectionFactory instance. - * - * @param Object - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof PermissionDDMCF)) { - return false; - } - if (obj == this) { - return true; - } - - PermissionDDMCF that = (PermissionDDMCF) obj; - - if ((this.reference != null) - && !(this.reference.equals(that.getReference()))) { - return false; - } else if ((this.reference == null) && !(that.getReference() == null)) { - return false; - } - - if ((this.resourceAdapter != null) - && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { - return false; - } else if ((this.resourceAdapter == null) - && !(that.getResourceAdapter() == null)) { - return false; - } - - if (this.count != that.getCount()) { - return false; - } - - if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { - return false; - } else if ((this.integer == null) && !(that.getInteger() == null)) { - return false; - } - - if (!Util.isEqual(this.password, that.getPassword())) - return false; - - if (!Util.isEqual(this.user, that.getUser())) - return false; - - if (!Util.isEqual(this.userName, that.getUserName())) - return false; - - if (!Util.isEqual(this.tsrValue, that.getTsrValue())) - return false; - - if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) - return false; - - if (!Util.isEqual(this.factoryName, that.getFactoryName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc Gives a hash value to a ManagedConnectionFactory Obejct. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - /* - * @name getReference - * - * @desc Gives the reference of the class - * - * @return javax.naming.Reference - */ - public javax.naming.Reference getReference() { - javax.naming.Reference ref; - - ref = this.reference; - return ref; - } - - /* - * @name setReference - * - * @desc sets the reference of the class - * - * @param javax.naming.Reference - */ - public void setReference(javax.naming.Reference ref) { - this.reference = ref; - } - - public void debug(String out) { - Debug.trace("PermissionDDMCF: " + out); - } - - public int getCount() { - return this.count; - } - - public void setCount(int val) { - this.count = val; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java deleted file mode 100755 index e9d4268ca9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.permissiondd; - -import javax.transaction.xa.XAResource; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; -import com.sun.ts.tests.common.connector.whitebox.Util; - -import jakarta.resource.NotSupportedException; -import jakarta.resource.ResourceException; -import jakarta.resource.spi.ActivationSpec; -import jakarta.resource.spi.AuthenticationMechanism; -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.ConfigProperty; -import jakarta.resource.spi.Connector; -import jakarta.resource.spi.ResourceAdapter; -import jakarta.resource.spi.ResourceAdapterInternalException; -import jakarta.resource.spi.SecurityPermission; -import jakarta.resource.spi.TransactionSupport; -import jakarta.resource.spi.endpoint.MessageEndpointFactory; -import jakarta.resource.spi.work.HintsContext; -import jakarta.resource.spi.work.SecurityContext; -import jakarta.resource.spi.work.Work; -import jakarta.resource.spi.work.WorkManager; - -/** - * This RA is used to assist with verifying the server supports permissions.xml - * security enforcement within a rar file. - */ - -@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-permissiondd.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(description = "Security Perm description", permissionSpec = ""), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { - HintsContext.class, SecurityContext.class }) -public class PermissionDDResourceAdapterImpl - implements ResourceAdapter, java.io.Serializable { - - private transient BootstrapContext bsc; - - private transient PermissionDDWorkManager awm; - - private transient WorkManager wm; - - private transient Work work; - - private String serverSideUser = ""; // corresponds to ts.jte's 'user' property - - private String serverSidePwd = ""; // corresponds to ts.jte's 'password' - // property - - private String eisUser = ""; // corresponds to ts.jte's 'user1' property - - private String eisPwd = ""; // corresponds to ts.jte's 'password' property - - @ConfigProperty(defaultValue = "PermissionDDResourceAdapterImpl") - private String raName; - - /** - * constructor - **/ - public PermissionDDResourceAdapterImpl() { - debug("enterred constructor..."); - - this.serverSideUser = TestUtil.getSystemProperty("j2eelogin.name"); - this.serverSidePwd = TestUtil.getSystemProperty("j2eelogin.password"); - this.eisUser = TestUtil.getSystemProperty("eislogin.name"); - this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); - - debug("leaving constructor..."); - } - - // - // Begin ResourceAdapter interface requirements - // - - /* must implement for ResourceAdapter interface requirement */ - public void start(BootstrapContext bsc) - throws ResourceAdapterInternalException { - debug("enterred start"); - - ConnectorStatus.getConnectorStatus() - .logState("PermissionDDResourceAdapterImpl.start called"); - - this.bsc = bsc; - this.wm = bsc.getWorkManager(); - - this.awm = new PermissionDDWorkManager(bsc); - awm.runTests(); - - debug("leaving start"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void stop() { - debug("entered stop"); - debug("leaving stop"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointActivation(MessageEndpointFactory factory, - ActivationSpec spec) throws NotSupportedException { - - debug("enterred endpointActivation"); - debug("leaving endpointActivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public void endpointDeactivation(MessageEndpointFactory ep, - ActivationSpec spec) { - debug("enterred endpointDeactivation"); - debug("leaving endpointDeactivation"); - } - - /* must implement for ResourceAdapter interface requirement */ - public XAResource[] getXAResources(ActivationSpec[] specs) - throws ResourceException { - - debug("enterred getXAResources"); - debug("leaving getXAResources"); - - throw new UnsupportedOperationException(); - } - - // - // END ResourceAdapter interface requirements - // - - /* - * @name equals - * - * @desc compares this object with the given object. - * - * @param Object obj - * - * @return boolean - */ - public boolean equals(Object obj) { - - if ((obj == null) || !(obj instanceof PermissionDDResourceAdapterImpl)) { - return false; - } - if (obj == this) { - return true; - } - - PermissionDDResourceAdapterImpl that = (PermissionDDResourceAdapterImpl) obj; - - if (!Util.isEqual(this.serverSideUser, that.getServerSideUser())) - return false; - - if (!Util.isEqual(this.serverSidePwd, that.getServerSidePwd())) - return false; - - if (!Util.isEqual(this.eisUser, that.getEisUser())) - return false; - - if (!Util.isEqual(this.eisPwd, that.getEisPwd())) - return false; - - if (!Util.isEqual(this.raName, that.getRaName())) - return false; - - return true; - } - - /* - * @name hashCode - * - * @desc gets the hashcode for this object. - * - * @return int - */ - public int hashCode() { - return this.getClass().getName().hashCode(); - } - - public void setRaName(String name) { - this.raName = name; - - // this helps verify assertion Connector:SPEC:279 - String str = "setRAName called with raname=" + raName; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - public String getRaName() { - debug("PermissionDDResourceAdapterImpl.getRAName"); - return raName; - } - - public void debug(String out) { - Debug.trace("PermissionDDResourceAdapterImpl: " + out); - } - - public void setServerSideUser(String val) { - this.serverSideUser = val; - } - - public String getServerSideUser() { - return this.serverSideUser; - } - - public void setServerSidePwd(String val) { - this.serverSidePwd = val; - } - - public String getServerSidePwd() { - return this.serverSidePwd; - } - - public void setEisUser(String val) { - this.eisUser = val; - } - - public String getEisUser() { - return this.eisUser; - } - - public void setEisPwd(String val) { - this.eisUser = val; - } - - public String getEisPwd() { - return this.eisPwd; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java b/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java deleted file mode 100644 index dfaa49c6c5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.connector.whitebox.permissiondd; - -import java.io.FilePermission; -import java.net.SocketPermission; -import java.security.AccessControlException; -import java.security.AccessController; -import java.security.Permission; -import java.security.PrivilegedExceptionAction; -import java.util.PropertyPermission; - -import javax.transaction.xa.Xid; - -import com.sun.ts.tests.common.connector.util.ConnectorStatus; -import com.sun.ts.tests.common.connector.whitebox.Debug; - -import jakarta.resource.spi.BootstrapContext; -import jakarta.resource.spi.work.WorkManager; - -public class PermissionDDWorkManager { - private BootstrapContext bsc = null; - - private WorkManager wmgr; - - private Xid myxid; - - private Xid mynestxid; - - public PermissionDDWorkManager(BootstrapContext val) { - debug("enterred constructor"); - this.bsc = val; - this.wmgr = bsc.getWorkManager(); - - debug("leaving constructor"); - } - - public void runTests() { - debug("enterred runTests"); - - validateRequiredPermSet(); - validateRestrictedLocalPerm(); - - // doWork(); - // doTCWork(); - // submitNestedXidWork(); - debug("leaving runTests"); - } - - public void validateRequiredPermSet() { - try { - RuntimePermission rtperm = new RuntimePermission("loadLibrary.*"); - doCheckPermission(rtperm); - debug("validateRequiredPermSet(): valid perm for: " + rtperm.toString()); - - RuntimePermission rtperm2 = new RuntimePermission("queuePrintJob"); - doCheckPermission(rtperm2); - debug( - "validateRequiredPermSet(): valid perm for: " + rtperm2.toString()); - - SocketPermission socperm = new SocketPermission("*", "connect"); - doCheckPermission(socperm); - debug( - "validateRequiredPermSet(): valid perm for: " + socperm.toString()); - - FilePermission fperm = new FilePermission("*", "read"); - doCheckPermission(fperm); - debug("validateRequiredPermSet(): valid perm for: " + fperm.toString()); - - PropertyPermission pperm = new PropertyPermission("*", "read"); - doCheckPermission(pperm); - debug("validateRequiredPermSet(): valid perm for: " + pperm.toString()); - - // if we have perms we should get here - debug("SUCCESS: validateRequiredPermSet passed."); - ConnectorStatus.getConnectorStatus() - .logState("SUCCESS: validateRequiredPermSet passed."); - } catch (AccessControlException ex) { - debug( - "FAILURE: validateRequiredPermSet throwing AccessControlException."); - ConnectorStatus.getConnectorStatus().logState( - "FAILURE: validateRequiredPermSet throwing AccessControlException."); - Debug.printDebugStack(ex); - } catch (Exception ex) { - debug("FAILURE: validateRequiredPermSet had unexpected Exception."); - ConnectorStatus.getConnectorStatus().logState( - "FAILURE: validateRequiredPermSet had unexpected Exception."); - Debug.printDebugStack(ex); - } - - debug("returning from validateRequiredPermSet()"); - return; - } - - public void validateRestrictedLocalPerm() { - try { - // call a priviledged method - PropertyPermission readPropertyPerm = new PropertyPermission( - "TestPropertyPerm", "read"); - - try { - doCheckPermission(readPropertyPerm); - // should get here - debug( - "SUCCESS: validateRestrictedLocalPerm() has grant for read of TestPropertyPerm"); - } catch (AccessControlException ex) { - // should not get here. - debug( - "FAILURE: validateRestrictedLocalPerm() threw unexpected exception for read of TestPropertyPerm."); - ConnectorStatus.getConnectorStatus().logState( - "FAILURE: validateRestrictedLocalPerm() threw AccessControlException."); - Debug.printDebugStack(ex); - return; - } - debug("SUCCESS: validateRestrictedLocalPerm passed."); - ConnectorStatus.getConnectorStatus() - .logState("SUCCESS: validateRestrictedLocalPerm passed."); - - } catch (Exception ex) { - debug("FAILURE: validateRestrictedLocalPerm had unexpected exception."); - ConnectorStatus.getConnectorStatus().logState( - "FAILURE: validateRestrictedLocalPerm had unexpected exception."); - Debug.printDebugStack(ex); - } - - debug("returning from validateRestrictedLocalPerm()"); - return; - } - - public void doCheckPermission(Permission pp) throws Exception { - final Permission perm = pp; - AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Void run() throws AccessControlException { - AccessController.checkPermission(perm); - return null; - } - }); - } - - public void setXid(Xid xid) { - this.myxid = xid; - } - - public Xid getXid() { - return this.myxid; - } - - public void setNestXid(Xid xid) { - this.mynestxid = xid; - } - - public Xid getNestXid() { - return this.mynestxid; - } - - public void debug(String out) { - Debug.trace("PermissionDDWorkManager: " + out); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java b/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java deleted file mode 100644 index 26c361ea95..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.calleebeans; - -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.ejb.wrappers.StatefulWrapper; - -import jakarta.ejb.CreateException; - -public class StatefulCalleeEJB extends StatefulWrapper { - - /** Modify arg and call StatefulWrapper create method */ - public void ejbCreate(Properties p, SimpleArgument arg) - throws CreateException { - - try { - TestUtil.init(p); - TestUtil.logTrace("[StatefulCallee] ejbCreate()"); - super.ejbCreate(p); - logArgStatus("create input", arg); - arg.modify(); - logArgStatus("create output", arg); - } catch (Exception e) { - TestUtil.logErr("[StatefulCallee] Caught exception: ", e); - throw new CreateException(e.getMessage()); - } - } - - public void ejbPostCreate(Properties p, SimpleArgument arg) - throws CreateException { - TestUtil.logTrace("[StatefulCallee] ejbPostCreate()"); - } - - public void call(Properties props, SimpleArgument arg) { - logArgStatus("input", arg); - arg.modify(); - logArgStatus("output", arg); - } - - public void logArgStatus(String msg, SimpleArgument arg) { - TestUtil.logTrace("[StatefulCallee] " + msg + " arg = " + arg.getValue()); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java deleted file mode 100644 index dc2c6a5ce0..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java +++ /dev/null @@ -1,179 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; - -/** - * DB Support object for DB table using whose primary key is an 'float'. - */ -public class CompoundDBSupport extends DBSupport - implements java.io.Serializable { - - /** Name of the property whose value is the DB table name */ - protected static final String compoundTablePrefix = "compoundPKTable"; - - PreparedStatement pStmt = null; - - ResultSet result = null; - - /* - * Cached data - */ - protected CompoundPK cofID = null; /* Coffee ID (Primary Key) */ - - protected String cofName = null; /* Coffee Name */ - - protected float cofPrice = 0; /* Coffee Price */ - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object. - */ - public CompoundDBSupport() throws Exception { - super(compoundTablePrefix); - } - - public static void initTable(Properties props) throws Exception { - DBSupport.initTable(compoundTablePrefix, props); - } - - public boolean keyExists(CompoundPK pkey) throws SQLException { - try { - TestUtil.logTrace("[CompoundDBSupport] keyExists(" + pkey + ")"); - - getDBConnection(); - pStmt = getStmt("Select_PK"); - pStmt.setInt(1, pkey.pmIDInteger.intValue()); - pStmt.setString(2, pkey.pmIDString); - pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); - result = pStmt.executeQuery(); - - return result.next(); - } catch (SQLException e) { - throw new SQLException("SQL Exception in keyExists:" + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void createNewRow(CompoundPK cofID, String cofName, float cofPrice) - throws CreateException, SQLException { - - try { - TestUtil.logTrace("[CompoundDBSupport] createNewRow(" + cofID + ", " - + cofName + ", " + cofPrice + ")"); - - pStmt = getStmt("Insert"); - pStmt.setInt(1, cofID.pmIDInteger.intValue()); - pStmt.setString(2, cofID.pmIDString); - pStmt.setFloat(3, cofID.pmIDFloat.floatValue()); - pStmt.setString(4, cofName); - pStmt.setFloat(5, cofPrice); - TestUtil.logTrace("[CompoundDBSupport] Execute stmt" + pStmt); - if (1 != pStmt.executeUpdate()) { - throw new CreateException("INSERT failed in createNewRow"); - } else { - /* Keep cached state */ - this.cofID = cofID; - this.cofName = cofName; - this.cofPrice = cofPrice; - } - } catch (SQLException e) { - TestUtil.printStackTrace(e); - throw new SQLException("SQL Exception in createNewRow" + e); - } finally { - closeStmt(pStmt, null); - } - - TestUtil.logTrace("[CompoundDBSupport] New row created !"); - } - - public float loadPrice(CompoundPK pkey) throws SQLException { - - try { - TestUtil.logTrace("[CompoundDBSupport] loadPrice(" + pkey + ")"); - - pStmt = getStmt("Select_Price"); - pStmt.setInt(1, pkey.pmIDInteger.intValue()); - pStmt.setString(2, pkey.pmIDString); - pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); - result = pStmt.executeQuery(); - if (!result.next()) { - throw new SQLException("No record for PK = " + pkey); - } - - return result.getFloat(1); - } catch (SQLException e) { - throw new SQLException("SQLException in loadPrice(): " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void storePrice(CompoundPK pkey, float cofPrice) throws SQLException { - - try { - TestUtil.logTrace("[CompoundDBSupport] storePrice()"); - pStmt = getStmt("Update"); - pStmt.setFloat(1, cofPrice); - pStmt.setInt(2, pkey.pmIDInteger.intValue()); - pStmt.setString(3, pkey.pmIDString); - pStmt.setFloat(4, pkey.pmIDFloat.floatValue()); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("SQL UPDATE failed in storePrice"); - } - - this.cofPrice = cofPrice; - } catch (SQLException e) { - throw new SQLException("SQL Exception in storePrice(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - - public void removeRow(CompoundPK pkey) throws SQLException { - - try { - TestUtil.logTrace("[CompoundDBSupport] removeRow()"); - pStmt = getStmt("Delete"); - pStmt.setInt(1, pkey.pmIDInteger.intValue()); - pStmt.setString(2, pkey.pmIDString); - pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("DELETE failed in removeRow"); - } - } catch (SQLException e) { - throw new SQLException("SQL Exception in removeRow(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java deleted file mode 100644 index 62c5a2ba10..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -/* - * Class used to define a compound primary key for Entity beans. - */ -public class CompoundPK implements java.io.Serializable { - /* Fields */ - public Integer pmIDInteger; - - public String pmIDString; - - public Float pmIDFloat; - - /** Standard Constructor */ - public CompoundPK(int intID, String strID, float floatID) { - this.pmIDInteger = new Integer(intID); - this.pmIDString = strID; - this.pmIDFloat = new Float(floatID); - } - - /** Public constructor with no parameters */ - public CompoundPK() { - this.pmIDInteger = new Integer(0); - this.pmIDString = "Limbo"; - this.pmIDFloat = new Float(0.0); - } - - /** Override java.lang.Object method */ - public int hashCode() { - int myHash; - - myHash = this.pmIDInteger.hashCode() + this.pmIDString.hashCode() - + this.pmIDFloat.hashCode(); - - return myHash; - } - - /** Override java.lang.Object method */ - public boolean equals(Object o) { - CompoundPK other; - boolean same = true; - - if (!(o instanceof CompoundPK)) { - return false; - } - other = (CompoundPK) o; - - same &= this.pmIDInteger.equals(other.pmIDInteger); - same &= this.pmIDString.equals(other.pmIDString); - same &= this.pmIDFloat.equals(other.pmIDFloat); - - return same; - } - - /** Override java.lang.Object method */ - public String toString() { - return "CompoundPK [ " + pmIDInteger + ", " + pmIDString + ", " + pmIDFloat - + " ]"; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java deleted file mode 100644 index d1eaa0e99a..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java +++ /dev/null @@ -1,210 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.sql.Statement; -import java.util.Properties; - -import javax.sql.DataSource; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -/** - * Provide basic DB support for TS deployment tests, using The Datasource - * referenced as 'jdbc/DB1' in the component environment. - * - * This class is not intended to be used "as is", but rather to be sub-classed - * by other DB support classes focusing on a particular DB schema (and in - * particular on a type of primary key). - */ -public class DBSupport implements java.io.Serializable { - - /** Prefix used for JNDI lookups */ - protected static final String prefix = "java:comp/env/"; - - /** JNDI name used to lookup the DataSource */ - protected static final String DBLookupName = prefix + "jdbc/DB1"; - - /** DB table prefix. Used to get the appropriate SQL properties */ - protected String tablePrefix = null; - - protected DataSource ds = null; - - protected transient Connection dbConnection = null; - - protected TSNamingContext nctx = null; - - /* - * Cached data - */ - protected int cofID = 0; // Coffee ID (Primary Key) - - protected String cofName = null; // Coffee Name - - protected float cofPrice = 0; // Coffee Price - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object (so that you can safely use TestUtil.getProperty). - * - * @param tablePrefix - * Prefix to use for SQL properties lookups. - */ - public DBSupport(String tablePrefix) throws Exception { - - this.tablePrefix = tablePrefix; - TestUtil.logTrace("[DBSupport] Getting naming context..."); - this.nctx = new TSNamingContext(); - - TestUtil.logTrace("[DBSupport] Lookup DataSource " + DBLookupName); - ds = (DataSource) nctx.lookup(DBLookupName); - } - - /** - * Initialize DB table (remove all existing rows). - * - * Method is static so that it can be easily called from the Application - * Client setup method. - */ - public static void initTable(String tablePrefix, Properties props) - throws Exception { - - String cleanupPropName = "DEPLOY_" + tablePrefix + "_Cleanup"; - DataSource ds = null; - Connection conn = null; - Statement stmt = null; - TSNamingContext nctx; - String sqlStr; - - TestUtil.logTrace("[DBSupport] initTable()"); - try { - if (null == tablePrefix) { /* Sanity check */ - throw new Exception("tablePrefix cannot be null!"); - } - - TestUtil.logTrace("[DBSupport] Getting naming context..."); - nctx = new TSNamingContext(); - - TestUtil.logTrace("[DBSupport] Lookup DataSource " + DBLookupName); - ds = (DataSource) nctx.lookup(DBLookupName); - - TestUtil.logTrace("[DBSupport] Getting DB connection..."); - conn = ds.getConnection(); - - TestUtil.logTrace("[DBSupport] Cleanup table"); - stmt = conn.createStatement(); - TestUtil.logTrace("[DBSupport] Use SQL prop " + cleanupPropName); - sqlStr = TestUtil.getProperty(cleanupPropName); - TestUtil.logTrace("[DBSupport] SQL = '" + sqlStr + "'"); - stmt.executeUpdate(sqlStr); - TestUtil.logTrace("[DBSupport] Table cleaned up!"); - - } catch (SQLException e) { - TestUtil.logErr("[DBSupport] Cannot init table :" + e); - throw new SQLException("SQL Exception in initTable: " + e); - } finally { - try { - if (null != stmt) { - stmt.close(); - } - if (null != conn) { - conn.close(); - } - } catch (SQLException e) { - TestUtil.logTrace("[DBSupport] Ignoring Exception (cleanup): " + e); - } - } - } - - /** Make sure we have a valid DB connection handy */ - public void getDBConnection() throws SQLException { - TestUtil.logTrace("[DBSupport] getDBConnection()"); - if (null == dbConnection) { - dbConnection = ds.getConnection(); - } - } - - /** Close current DB connection, if applicable */ - public void closeDBConnection() throws SQLException { - TestUtil.logTrace("[DBSupport] closeDBConnection()"); - if (null != dbConnection) { - dbConnection.close(); - dbConnection = null; /* Detect later we closed it */ - } - } - - /** - * Generic method to get a SQL statement for current table. - * - * We get the SQL code associated with the DEPLOY__ TS - * property. - */ - public PreparedStatement getStmt(String suffix) throws SQLException { - PreparedStatement pStmt; - String sqlPropName; - String sqlStr; - - TestUtil.logTrace("getStmt()"); - getDBConnection(); - TestUtil.logMsg("connection = " + dbConnection); - sqlPropName = "DEPLOY_" + tablePrefix + "_" + suffix; - TestUtil.logTrace("[DBSupport] Get SQL for " + sqlPropName); - sqlStr = TestUtil.getProperty(sqlPropName); - TestUtil.logMsg("[DBSupport] SQL = " + sqlStr); - TestUtil.logMsg("[DBSupport] getStatement: " + dbConnection); - pStmt = dbConnection.prepareStatement(sqlStr); - - return pStmt; - } - - /** - * Close the ResultSet and the PreparedStatement in a safely manner and - * ignoring any SQLException that could be thrown. This method is designed to - * be called from a finally block to ensure the release of associated - * resources. - */ - public void closeStmt(PreparedStatement pStmt, ResultSet result) { - try { - if (null != result) { - result.close(); - } - } catch (SQLException e) { - TestUtil.logTrace( - "[DBSupport] Ignoring Exception while " + "closing ResultSet: " + e); - } - - try { - if (null != pStmt) { - pStmt.close(); - } - } catch (SQLException e) { - TestUtil.logTrace("[DBSupport] Ignoring Exception while " - + "closing PreparedStatement: " + e); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java deleted file mode 100644 index fedc205f06..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; - -/** - * DB Support object for DB table using whose primary key is an 'float'. - */ -public class FloatDBSupport extends DBSupport implements java.io.Serializable { - - /** Name of the property whose value is the DB table name */ - protected static final String floatTablePrefix = "floatPKTable"; - - PreparedStatement pStmt = null; - - ResultSet result = null; - - /* - * Cached data - */ - protected float cofID = 0; /* Coffee ID (Primary Key) */ - - protected String cofName = null; /* Coffee Name */ - - protected float cofPrice = 0; /* Coffee Price */ - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object. - */ - public FloatDBSupport() throws Exception { - super(floatTablePrefix); - } - - public static void initTable(Properties props) throws Exception { - DBSupport.initTable(floatTablePrefix, props); - } - - public boolean keyExists(float pkey) throws SQLException { - try { - TestUtil.logTrace("[FloatDBSupport] keyExists(" + pkey + ")"); - - getDBConnection(); - pStmt = getStmt("Select_PK"); - pStmt.setFloat(1, pkey); - result = pStmt.executeQuery(); - - return result.next(); - } catch (SQLException e) { - throw new SQLException("SQL Exception in keyExists: " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void createNewRow(float cofID, String cofName, float cofPrice) - throws CreateException, SQLException { - - try { - TestUtil.logTrace("[FloatDBSupport] createNewRow(" + cofID + ", " - + cofName + ", " + cofPrice + ")"); - - pStmt = getStmt("Insert"); - pStmt.setFloat(1, cofID); - pStmt.setString(2, cofName); - pStmt.setFloat(3, cofPrice); - TestUtil.logTrace("[FloatDBSupport] Execute stmt" + pStmt); - if (1 != pStmt.executeUpdate()) { - throw new CreateException("INSERT failed in createNewRow"); - } else { - /* Keep cached state */ - this.cofID = cofID; - this.cofName = cofName; - this.cofPrice = cofPrice; - } - } catch (SQLException e) { - TestUtil.printStackTrace(e); - throw new SQLException("SQL Exception in createNewRow" + e); - } finally { - closeStmt(pStmt, null); - } - - TestUtil.logTrace("[FloatDBSupport] New row created !"); - } - - public float loadPrice(float pkey) throws SQLException { - - try { - TestUtil.logTrace("[FloatDBSupport] loadPrice(" + pkey + ")"); - - pStmt = getStmt("Select_Price"); - pStmt.setFloat(1, pkey); - result = pStmt.executeQuery(); - if (!result.next()) { - throw new SQLException("No record for PK = " + pkey); - } - - return result.getFloat(1); - } catch (SQLException e) { - throw new SQLException("SQLException in loadPrice(): " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void storePrice(float pkey, float cofPrice) throws SQLException { - - try { - TestUtil.logTrace("[FloatDBSupport] storePrice()"); - pStmt = getStmt("Update"); - pStmt.setFloat(1, cofPrice); - pStmt.setFloat(2, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("SQL UPDATE failed in storePrice"); - } - - this.cofPrice = cofPrice; - } catch (SQLException e) { - throw new SQLException("SQLException in storePrice(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - - public void removeRow(float pkey) throws SQLException { - - try { - TestUtil.logTrace("[FloatDBSupport] removeRow()"); - pStmt = getStmt("Delete"); - pStmt.setFloat(1, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("DELETE failed in removeRow"); - } - } catch (SQLException e) { - throw new SQLException("SQLException in removeRow(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java deleted file mode 100644 index c1eb1c2ecf..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; - -/** - * DB Support object for DB table using whose primary key is an 'int'. - */ -public class IntegerDBSupport extends DBSupport - implements java.io.Serializable { - - /** Name of the property whose value is the DB table name */ - protected static final String intTablePrefix = "intPKTable"; - - PreparedStatement pStmt = null; - - ResultSet result = null; - - /* - * Cached data - */ - protected int cofID = 0; /* Coffee ID (Primary Key) */ - - protected String cofName = null; /* Coffee Name */ - - protected float cofPrice = 0; /* Coffee Price */ - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object. - */ - public IntegerDBSupport() throws Exception { - super(intTablePrefix); - } - - public static void initTable(Properties props) throws Exception { - DBSupport.initTable(intTablePrefix, props); - } - - public boolean keyExists(int pkey) throws SQLException { - try { - TestUtil.logTrace("[IntegerDBSupport] keyExists(" + pkey + ")"); - - getDBConnection(); - pStmt = getStmt("Select_PK"); - pStmt.setInt(1, pkey); - result = pStmt.executeQuery(); - - return result.next(); - } catch (SQLException e) { - throw new SQLException("SQLException in keyExists: " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void createNewRow(int cofID, String cofName, float cofPrice) - throws CreateException, SQLException { - - try { - TestUtil.logTrace("[IntegerDBSupport] createNewRow(" + cofID + ", " - + cofName + ", " + cofPrice + ")"); - - pStmt = getStmt("Insert"); - pStmt.setInt(1, cofID); - pStmt.setString(2, cofName); - pStmt.setFloat(3, cofPrice); - TestUtil.logTrace("[IntegerDBSupport] Execute stmt" + pStmt); - if (1 != pStmt.executeUpdate()) { - throw new CreateException("INSERT failed in createNewRow"); - } else { - /* Keep cached state */ - this.cofID = cofID; - this.cofName = cofName; - this.cofPrice = cofPrice; - } - } catch (SQLException e) { - TestUtil.printStackTrace(e); - throw new SQLException("SQLException in createNewRow" + e); - } finally { - closeStmt(pStmt, null); - } - - TestUtil.logTrace("[IntegerDBSupport] New row created !"); - } - - public float loadPrice(int pkey) throws SQLException { - - try { - TestUtil.logTrace("[IntegerDBSupport] loadPrice(" + pkey + ")"); - - pStmt = getStmt("Select_Price"); - pStmt.setInt(1, pkey); - result = pStmt.executeQuery(); - if (!result.next()) { - throw new SQLException("No record for PK = " + pkey); - } - - return result.getFloat(1); - } catch (SQLException e) { - throw new SQLException("SQLException in loadPrice(): " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void storePrice(int pkey, float cofPrice) throws SQLException { - - try { - TestUtil.logTrace("[IntegerDBSupport] storePrice()"); - pStmt = getStmt("Update"); - pStmt.setFloat(1, cofPrice); - pStmt.setInt(2, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("UPDATE failed in storePrice"); - } - - this.cofPrice = cofPrice; - } catch (SQLException e) { - throw new SQLException("SQLException in storePrice(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - - public void removeRow(int pkey) throws SQLException { - - try { - TestUtil.logTrace("[IntegerDBSupport] removeRow()"); - pStmt = getStmt("Delete"); - pStmt.setInt(1, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("DELETE failed in removeRow"); - } - } catch (SQLException e) { - throw new SQLException("SQLException in removeRow(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java deleted file mode 100644 index 8ce554d38a..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; - -/** - * DB Support object for DB table using whose primary key is an 'long'. - */ -public class LongDBSupport extends DBSupport implements java.io.Serializable { - - /** Name of the property whose value is the DB table name */ - protected static final String longTablePrefix = "longPKTable"; - - PreparedStatement pStmt = null; - - ResultSet result = null; - - /* - * Cached data - */ - protected long cofID = 0; /* Coffee ID (Primary Key) */ - - protected String cofName = null; /* Coffee Name */ - - protected float cofPrice = 0; /* Coffee Price */ - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object. - */ - public LongDBSupport() throws Exception { - super(longTablePrefix); - } - - public static void initTable(Properties props) throws Exception { - DBSupport.initTable(longTablePrefix, props); - } - - public boolean keyExists(long pkey) throws SQLException { - try { - TestUtil.logTrace("[LongDBSupport] keyExists(" + pkey + ")"); - - getDBConnection(); - pStmt = getStmt("Select_PK"); - pStmt.setLong(1, pkey); - result = pStmt.executeQuery(); - - return result.next(); - } catch (SQLException e) { - throw new SQLException("SQLException in keyExists: " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void createNewRow(long cofID, String cofName, float cofPrice) - throws CreateException, SQLException { - - try { - TestUtil.logTrace("[LongDBSupport] createNewRow(" + cofID + ", " + cofName - + ", " + cofPrice + ")"); - - pStmt = getStmt("Insert"); - pStmt.setLong(1, cofID); - pStmt.setString(2, cofName); - pStmt.setFloat(3, cofPrice); - TestUtil.logTrace("[LongDBSupport] Execute stmt" + pStmt); - if (1 != pStmt.executeUpdate()) { - throw new CreateException("INSERT failed in createNewRow"); - } else { - /* Keep cached state */ - this.cofID = cofID; - this.cofName = cofName; - this.cofPrice = cofPrice; - } - } catch (SQLException e) { - TestUtil.printStackTrace(e); - throw new SQLException("SQLException in createNewRow" + e); - } finally { - closeStmt(pStmt, null); - } - - TestUtil.logTrace("[LongDBSupport] New row created !"); - } - - public float loadPrice(long pkey) throws SQLException { - - try { - TestUtil.logTrace("[LongDBSupport] loadPrice(" + pkey + ")"); - - pStmt = getStmt("Select_Price"); - pStmt.setLong(1, pkey); - result = pStmt.executeQuery(); - if (!result.next()) { - throw new SQLException("No record for PK = " + pkey); - } - - return result.getFloat(1); - } catch (SQLException e) { - throw new SQLException("SQLException in loadPrice(): " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void storePrice(long pkey, float cofPrice) throws SQLException { - - try { - TestUtil.logTrace("[LongDBSupport] storePrice()"); - pStmt = getStmt("Update"); - pStmt.setFloat(1, cofPrice); - pStmt.setLong(2, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("UPDATE failed in storePrice"); - } - - this.cofPrice = cofPrice; - } catch (SQLException e) { - throw new SQLException("SQLException in storePrice(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - - public void removeRow(long pkey) throws SQLException { - - try { - TestUtil.logTrace("[LongDBSupport] removeRow()"); - pStmt = getStmt("Delete"); - pStmt.setLong(1, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("DELETE failed in removeRow"); - } - } catch (SQLException e) { - throw new SQLException("SQLException in removeRow(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java b/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java deleted file mode 100644 index 0d37abeac1..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.dba; - -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; - -/** - * DB Support object for DB table using whose primary key is an 'int'. - */ -public class StringDBSupport extends DBSupport implements java.io.Serializable { - - /** Name of the property whose value is the DB table name */ - protected static final String strTablePrefix = "strPKTable"; - - PreparedStatement pStmt = null; - - ResultSet result = null; - - /* - * Cached data - */ - protected String cofID = null; /* Coffee ID (Primary Key) */ - - protected String cofName = null; /* Coffee Name */ - - protected float cofPrice = 0; /* Coffee Price */ - - /** - * Create a new DBSupport object. If called from an EJB or a Web component, - * you must make sure to call TestUtil.init() before creating a new DBSupport - * object. - */ - public StringDBSupport() throws Exception { - super(strTablePrefix); - } - - public static void initTable(Properties props) throws Exception { - DBSupport.initTable(strTablePrefix, props); - } - - public boolean keyExists(String pkey) throws SQLException { - try { - TestUtil.logTrace("[StringDBSupport] keyExists(" + pkey + ")"); - - getDBConnection(); - pStmt = getStmt("Select_PK"); - pStmt.setString(1, pkey); - result = pStmt.executeQuery(); - - return result.next(); - } catch (SQLException e) { - throw new SQLException("SQLException in keyExists: " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void createNewRow(String cofID, String cofName, float cofPrice) - throws CreateException, SQLException { - - try { - TestUtil.logTrace("[StringDBSupport] createNewRow(" + cofID + ", " - + cofName + ", " + cofPrice + ")"); - - pStmt = getStmt("Insert"); - pStmt.setString(1, cofID); - pStmt.setString(2, cofName); - pStmt.setFloat(3, cofPrice); - TestUtil.logTrace("[StringDBSupport] Execute stmt" + pStmt); - if (1 != pStmt.executeUpdate()) { - throw new CreateException("INSERT failed in createNewRow"); - } else { - /* Keep cached state */ - this.cofID = cofID; - this.cofName = cofName; - this.cofPrice = cofPrice; - } - } catch (SQLException e) { - TestUtil.printStackTrace(e); - throw new SQLException("SQLException in createNewRow" + e); - } finally { - closeStmt(pStmt, null); - } - - TestUtil.logTrace("[StringDBSupport] New row created !"); - } - - public float loadPrice(String pkey) throws SQLException { - - try { - TestUtil.logTrace("[StringDBSupport] loadPrice(" + pkey + ")"); - - pStmt = getStmt("Select_Price"); - pStmt.setString(1, pkey); - result = pStmt.executeQuery(); - if (!result.next()) { - throw new SQLException("No record for PK = " + pkey); - } - - return result.getFloat(1); - } catch (SQLException e) { - throw new SQLException("SQLException in loadPrice(): " + e); - } finally { - closeStmt(pStmt, result); - } - } - - public void storePrice(String pkey, float cofPrice) throws SQLException { - - try { - TestUtil.logTrace("[StringDBSupport] storePrice()"); - pStmt = getStmt("Update"); - pStmt.setFloat(1, cofPrice); - pStmt.setString(2, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("UPDATE failed in storePrice"); - } - - this.cofPrice = cofPrice; - } catch (SQLException e) { - throw new SQLException("SQLException in storePrice(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - - public void removeRow(String pkey) throws SQLException { - - try { - TestUtil.logTrace("[StringDBSupport] removeRow()"); - pStmt = getStmt("Delete"); - pStmt.setString(1, pkey); - if (1 != pStmt.executeUpdate()) { - throw new SQLException("DELETE failed in removeRow"); - } - } catch (SQLException e) { - throw new SQLException("SQLException in removeRow(): " + e); - } finally { - closeStmt(pStmt, null); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java b/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java deleted file mode 100644 index 4b37dd3d21..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java +++ /dev/null @@ -1,211 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.wrappers; - -import java.lang.reflect.Method; -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jms.common.JmsUtil; -import jakarta.ejb.EJBException; -import jakarta.ejb.MessageDrivenBean; -import jakarta.ejb.MessageDrivenContext; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.MessageListener; -import jakarta.jms.Queue; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.TextMessage; - -/** - * Life cyle and test invocation methods for MDB. Actual test methods are - * defined in subclasses of this class. - * - * WARNING: We assume the MDB is CMT. Do not use this wrapper for a BMT MDB! - */ -public class MDBWrapper implements MessageDrivenBean, MessageListener { - - protected static final String prefix = "java:comp/env/jms/"; - - protected static final String qFactoryLookup = prefix - + "myQueueConnectionFactory"; - - protected static final String replyQueueLookup = prefix + "replyQueue"; - - public TSNamingContext nctx = null; - - protected MessageDrivenContext mctx = null; - - protected QueueConnectionFactory qFactory; - - protected QueueConnection conn = null; - - protected Queue replyQueue = null; - - protected QueueSender mSender = null; - - protected boolean result = false; - - public void ejbCreate() { - try { - TestUtil.logTrace("[MDBWrapper] ejbCreate()"); - nctx = new TSNamingContext(); - TestUtil.logTrace("[MDBWrapper] Looking up " + qFactoryLookup); - qFactory = (QueueConnectionFactory) nctx.lookup(qFactoryLookup); - TestUtil.logTrace("[MDBWrapper] Looking up " + replyQueueLookup); - replyQueue = (Queue) nctx.lookup(replyQueueLookup); - } catch (Exception e) { - TestUtil.logErr("[MDBWrapper] Exception in ejbCreate()", e); - /* Send instance to "does not exist" state */ - throw new EJBException("Exception in ejbCreate()", e); - } - } - - public void setMessageDrivenContext(MessageDrivenContext mctx) { - TestUtil.logTrace("[MDBWrapper] setMessageDrivenContext()"); - this.mctx = mctx; - } - - public void ejbRemove() { - TestUtil.logTrace("[MDBWrapper] ejbRemove()"); - } - - public void onMessage(Message msg) { - QueueSession session = null; - TextMessage messageSent = null; - String testName = "Undefined"; - Properties props = null; - boolean pass = false; - - try { - props = getProperties(msg); - TestUtil.init(props); - testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); - - // if we're cleaning up, no need to report test results - if (testName.equals("cleanUpBean")) { - TestUtil.logTrace("[MDBWrapper] Removing stateful session bean"); - runTest(testName, msg, session, props); - return; - } - pass = runTest(testName, msg, session, props); - - conn = qFactory.createQueueConnection(); - session = conn.createQueueSession(true, 0); - JmsUtil.sendTestResults(testName, pass, session, replyQueue); - } catch (Exception e) { - TestUtil.logErr("[MDBWrapper] Exception in onMessage(): ", e); - } finally { - cleanup(conn); - } - - } - - /** - * Run corresponding test by invoking test method on the current instance - * (also used for cleanup of stateful session beans). - */ - protected boolean runTest(String testName, Message msg, QueueSession session, - Properties props) { - - Boolean pass = Boolean.FALSE; - Class testDriverClass; - Method testMethod; - Class params[] = { Properties.class }; - Object args[] = new Object[1]; - - TestUtil.logTrace("[MDBWrapper] runTest()"); - - try { - TestUtil.logTrace("[MDBWrapper] run test '" + testName + "'"); - testDriverClass = this.getClass(); - testMethod = testDriverClass.getMethod(testName, params); - args[0] = props; - pass = (Boolean) testMethod.invoke(this, args); - } catch (NoSuchMethodException e) { - TestUtil.logErr("[MDBWrapper] Cannot find method '" + testName - + "' make sure it is defined " + "in sub-class", e); - pass = Boolean.FALSE; - } catch (Exception e) { - TestUtil.logErr("[MDBWrapper] Unexpected exception", e); - pass = Boolean.FALSE; - } - - return pass.booleanValue(); - } - - /** - * Construct a property object needed by TS harness for logging. We retrieve - * the properties from the Message object passed into the MDB onMessage() - * method - */ - protected Properties getProperties(Message msg) throws JMSException { - Properties props; - String hostname = null; - String traceflag = null; - String logport = null; - Enumeration propNames; - - props = new Properties(); - - /* - * Because a JMS property name cannot contain '.' the following properties - * are a special case - */ - hostname = msg.getStringProperty("harnesshost"); - props.put("harness.host", hostname); - traceflag = msg.getStringProperty("harnesslogtraceflag"); - props.put("harness.log.traceflag", traceflag); - logport = msg.getStringProperty("harnesslogport"); - props.put("harness.log.port", logport); - - /* - * now pull out the rest of the properties from the message - */ - propNames = msg.getPropertyNames(); - for (String name = null; propNames.hasMoreElements();) { - name = (String) propNames.nextElement(); - props.put(name, msg.getStringProperty(name)); - } - - return props; - } - - /** Cleanup method designed to be called within a finally block */ - protected void cleanup(QueueConnection conn) { - try { - if (null != conn) { - conn.close(); - } - } catch (Exception e) { - TestUtil.logErr( - "[MDBWrapper] Ignoring Exception on " + "QueueConnection cleanup: ", - e); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java b/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java deleted file mode 100644 index 846e71096c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.wrappers; - -import java.util.Properties; - -import com.sun.ts.lib.util.RemoteLoggingInitException; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.EJBException; - -/** - * Stateful wrapper that provides common methods for a Stateful - * Session bean. This class is intended to be subclassed by the final - * bean class that will provide the test logic (business methods). - */ -public class Stateful3xWrapper { - - protected TSNamingContext nctx = null; - - protected Properties props; - - /* - * Business methods. - */ - - /** - * Initialize TS logging. - * - * @param props - * TS properties need by TestUtil - * - */ - public void initLogging(Properties props) { - try { - this.props = props; - TestUtil.logTrace("[Stateful3xWrapper] initLogging()"); - TestUtil.init(props); - TestUtil.logTrace("[Stateful3xWrapper] initLogging OK"); - } catch (RemoteLoggingInitException e) { - TestUtil.logMsg("initLogging failed."); - throw new EJBException(e.getMessage()); - } - } - - public void createNamingContext() { - TestUtil.logTrace("[Stateful3xWrapper] createNamingContext()"); - - try { - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.logErr("[Stateful3xWrapper] Cannot create Naming Context: " + e); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java b/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java deleted file mode 100644 index d5bf83f401..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.wrappers; - -import java.util.Properties; - -import com.sun.ts.lib.util.RemoteLoggingInitException; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; -import jakarta.ejb.SessionBean; -import jakarta.ejb.SessionContext; - -/** - * Stateful wrapper that provide the bean life cycle methods for a Stateful - * Session bean. This class is intended to be subclassed by the final entity - * bean class that will provide the test logic (business methods). - */ -public class StatefulWrapper implements SessionBean { - - protected TSNamingContext nctx = null; - - protected SessionContext sctx = null; - - protected Properties props; - - /* - * Bean life cycle - */ - - public void ejbCreate(Properties props) throws CreateException { - try { - this.props = props; - TestUtil.init(props); - TestUtil.logTrace("[StatefulWrapper] ejbCreate()"); - } catch (RemoteLoggingInitException e) { - throw new CreateException(e.getMessage()); - } - TestUtil.logTrace("[StatefulWrapper] ejbCreate OK"); - } - - public void ejbPostCreate(Properties props) throws CreateException { - TestUtil.logTrace("[StatefulWrapper] ejbPostCreate()"); - } - - public void setSessionContext(SessionContext sc) { - TestUtil.logTrace("[StatefulWrapper] setSessionContext()"); - sctx = sc; - try { - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.logErr("[StatefulWrapper] Cannot create Naming Context: " + e); - } - } - - public void ejbRemove() { - TestUtil.logTrace("[StatefulWrapper] ejbRemove()"); - } - - public void ejbActivate() { - TestUtil.logTrace("[StatefulWrapper] ejbActivate()"); - } - - public void ejbPassivate() { - TestUtil.logTrace("[StatefulWrapper] ejbPassivate()"); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java b/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java deleted file mode 100644 index 25ce5e4138..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.ejb.wrappers; - -import java.util.Properties; - -import com.sun.ts.lib.util.RemoteLoggingInitException; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.CreateException; -import jakarta.ejb.EJBException; -import jakarta.ejb.SessionBean; -import jakarta.ejb.SessionContext; - -/** - * Stateless wrapper that provide the bean life cycle methods for a Stateless - * Session bean. This class is intended to be subclassed by the final entity - * bean class that will provide the test logic (business methods). - */ -public class StatelessWrapper implements SessionBean { - - protected TSNamingContext nctx = null; - - protected SessionContext sctx = null; - - /* - * Business methods. - */ - - /** - * Initialize TS logging. - * - * @param props - * TS properties need by TestUtil - * - */ - public void initLogging(Properties props) { - - try { - TestUtil.logTrace("[StatelessWrapper] initLogging()"); - TestUtil.init(props); - TestUtil.logTrace("[StatelessWrapper] initLogging OK."); - } catch (RemoteLoggingInitException e) { - TestUtil.logMsg("initLogging failed."); - throw new EJBException(e.getMessage()); - } - } - - /* - * Bean life cycle - */ - - public void ejbCreate() throws CreateException { - TestUtil.logTrace("[StatelessWrapper] ejbCreate()"); - } - - public void ejbPostCreate() throws CreateException { - TestUtil.logTrace("[StatelessWrapper] ejbPostCreate()"); - } - - public void setSessionContext(SessionContext sc) { - TestUtil.logTrace("[StatelessWrapper] setSessionContext()"); - sctx = sc; - try { - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.logErr("[StatelessWrapper] Cannot create Naming Context: " + e); - } - } - - public void ejbRemove() { - TestUtil.logTrace("[StatelessWrapper] ejbRemove()"); - } - - public void ejbActivate() { - TestUtil.logTrace("[StatelessWrapper] ejbActivate()"); - } - - public void ejbPassivate() { - TestUtil.logTrace("[StatelessWrapper] ejbPassivate()"); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java b/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java deleted file mode 100644 index 65846f69dd..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Copyright (c) 2009, 2021 Oracle and/or its affiliates and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.el.api.expression; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.lang.annotation.Annotation; - -import jakarta.el.ELContext; -import jakarta.el.Expression; -import jakarta.el.MethodExpression; -import jakarta.el.MethodInfo; -import jakarta.el.MethodReference; -import jakarta.el.PropertyNotWritableException; -import jakarta.el.ValueExpression; - -public class ExpressionTest { - - // Set New Line from system prop, if not defined used "\n as default." - private static final String NLINE = System.getProperty("line.separator", - "\n"); - - private ExpressionTest() { - } - - public static boolean testMethodInfo(MethodInfo minfo, String expectedName, - Class expectedReturnType, int expectedNumParams, - Class[] expectedParamTypes, StringBuffer buf) { - - boolean pass = true; - String name = minfo.getName(); - Class returnType = minfo.getReturnType(); - Class[] paramTypes = minfo.getParamTypes(); - int numParams = paramTypes.length; - - if (!name.equals(expectedName)) { - buf.append("Did not get expected method name." + NLINE); - buf.append("Expected name = " + expectedName + NLINE); - buf.append("Computed name = " + name + NLINE); - pass = false; - } - if (!returnType.equals(expectedReturnType)) { - buf.append("Did not get expected return type." + NLINE); - buf.append( - "Expected return type = " + expectedReturnType.getName() + NLINE); - buf.append("Computed return type = " + returnType.getName() + NLINE); - pass = false; - } - if (numParams != expectedNumParams) { - buf.append("Did not get expected number of parameters." + NLINE); - buf.append( - "Expected number of parameters = " + expectedNumParams + NLINE); - buf.append("Computed number of parameters = " + numParams + NLINE); - pass = false; - } else { - for (int i = 0; i < numParams; ++i) { - if (!(paramTypes[i].equals(expectedParamTypes[i]))) { - buf.append("Did not get expected parameter type." + NLINE); - buf.append("Expected parameter type = " - + expectedParamTypes[i].getName() + NLINE); - buf.append( - "Computed parameter type = " + paramTypes[i].getName() + NLINE); - pass = false; - } - } - } - return pass; - } - - public static boolean testMethodReference(MethodReference mref, - Object expectedBase, MethodInfo expectedMethodInfo, - Class[] expectedAnnotationTypes, - Object[] expectedParamValues, StringBuffer buf) { - - boolean pass = true; - - Object base = mref.getBase(); - MethodInfo minfo = mref.getMethodInfo(); - Annotation[] annotations = mref.getAnnotations(); - Object[] parameterValues = mref.getEvaluatedParameters(); - - if (base == null) { - buf.append("Did not get expected base object." + NLINE); - buf.append("Expected base = " + expectedBase + NLINE); - buf.append("Computed name = null" + NLINE); - pass = false; - } else if (!base.equals(expectedBase)) { - buf.append("Did not get expected base object." + NLINE); - buf.append("Expected base = " + expectedBase + NLINE); - buf.append("Computed base = " + base + NLINE); - pass = false; - } - - if (minfo == null) { - buf.append("Did not get expected MethodInfo object." + NLINE); - buf.append("Expected MethodInfo = " + expectedMethodInfo + NLINE); - buf.append("Computed MethodInfo = null" + NLINE); - pass = false; - } else if (!minfo.equals(expectedMethodInfo)) { - buf.append("Did not get expected base object." + NLINE); - buf.append("Expected MethodInfo = " + expectedMethodInfo + NLINE); - buf.append("Computed MethodInfo = " + minfo + NLINE); - pass = false; - } - - if (annotations == null) { - buf.append("Did not get expected annotation array." + NLINE); - buf.append("Computed array was null" + NLINE); - pass = false; - } else if (annotations.length != expectedAnnotationTypes.length) { - buf.append("Did not get expected number of annotations." + NLINE); - buf.append("Expected annotation array length = " + expectedAnnotationTypes.length + NLINE); - buf.append("Computed annotation array length = " + annotations.length + NLINE); - pass = false; - } else { - for (int i = 0; i < annotations.length; i++) { - if (!annotations[i].annotationType().equals(expectedAnnotationTypes[i])) { - buf.append("Did not get expected annotation type for array index = " + i + NLINE); - buf.append("Expected type = " + expectedAnnotationTypes[i] + NLINE); - buf.append("Computed type = " + annotations[i].getClass() + NLINE); - pass = false; - } - } - } - - if (parameterValues == null) { - buf.append("Did not get expected parameter value array." + NLINE); - buf.append("Computed array was null" + NLINE); - pass = false; - } else if (parameterValues.length != expectedParamValues.length) { - buf.append("Did not get expected number of parameter values." + NLINE); - buf.append("Expected annotation array length = " + expectedParamValues.length + NLINE); - buf.append("Computed annotation array length = " + parameterValues.length + NLINE); - pass = false; - } else { - for (int i = 0; i < parameterValues.length; i++) { - if (!parameterValues[i].equals(expectedParamValues[i])) { - buf.append("Did not get expected parameter value for array index = " + i + NLINE); - buf.append("Expected type = " + expectedParamValues[i] + NLINE); - buf.append("Computed type = " + parameterValues[i] + NLINE); - pass = false; - } - } - } - - return pass; - } - - public static boolean testValueExpression(ValueExpression vexp, - ELContext context, String exprStr, Class expectedType, - Object expectedValue, boolean expectedReadOnly, - boolean expectedLiteralText, StringBuffer buf) { - - boolean pass = true; - - // getValue() - Object retrievedValue = vexp.getValue(context); - if (!retrievedValue.equals(expectedValue)) { - pass = false; - buf.append("getValue() does not return expected value" + NLINE); - buf.append("Expected value = " + expectedValue.toString() + NLINE); - buf.append("Computed value = " + retrievedValue.toString() + NLINE); - } - - // setValue() - try { - vexp.setValue(context, "blue"); - String newValue = (String) vexp.getValue(context); - if (expectedReadOnly) { - pass = false; - buf.append("setValue() succeeded on a read-only value" + NLINE); - } else if (!newValue.equals("blue")) { - pass = false; - buf.append( - "Did not get correct set value for " + "ValueExpression." + NLINE); - buf.append("Expected value = " + "blue" + NLINE); - buf.append("Computed value = " + newValue + NLINE); - } - } catch (PropertyNotWritableException pnwe) { - if (!expectedReadOnly) { - pass = false; - buf.append( - "setValue() threw " + "PropertyNotWritableException" + NLINE); - buf.append("on a writable value" + NLINE); - } else { - buf.append( - "PropertyNotWritableException caught as " + "expected." + NLINE); - } - } - - // getType() - Class type = vexp.getType(context); - String typeName = (type == null) ? "null" : type.getName(); - buf.append("Type retrieved is " + typeName + NLINE); - - // getExpectedType() - Class retrievedType = vexp.getExpectedType(); - if (!(retrievedType.equals(expectedType))) { - pass = false; - buf.append( - "getExpectedType() does not return expected " + "type" + NLINE); - buf.append("Expected type = " + expectedType.toString() + NLINE); - buf.append("Computed type = " + retrievedType.toString() + NLINE); - } - - // isReadOnly() - if ((vexp.isReadOnly(context)) != expectedReadOnly) { - pass = false; - buf.append("isReadOnly() did not return " + expectedReadOnly + NLINE); - } - - // isLiteralText() - if ((vexp.isLiteralText()) != expectedLiteralText) { - pass = false; - buf.append( - "isLiteralText() did not return " + expectedLiteralText + NLINE); - } - - // getExpressionString() - String retrievedStr = vexp.getExpressionString(); - if (!retrievedStr.equals(exprStr)) { - pass = false; - buf.append( - "getExpressionString() does not return expected " + "string" + NLINE); - buf.append("Expected string = " + exprStr + NLINE); - buf.append("Computed string = " + retrievedStr + NLINE); - } - - return pass; - } - - public static boolean testMethodExpression(MethodExpression mexp, - ELContext context, String exprStr, Object[] params, - Object expectedReturnValue, boolean expectedLiteralText, - StringBuffer buf) { - - boolean pass = true; - - // getMethodInfo() - try { - MethodInfo minfo = mexp.getMethodInfo(context); - } catch (Exception e) { - pass = false; - buf.append("getMethodInfo() threw an unexpected exception" + NLINE); - buf.append(e.getMessage() + NLINE); - } - - // invoke() - try { - Object returnValue = mexp.invoke(context, params); - if (returnValue == null) { - if (expectedReturnValue != null) { - pass = false; - buf.append("invoke() unexpectedly returned null" + NLINE); - } - } else if (expectedReturnValue == null) { - pass = false; - buf.append( - "invoke() unexpectedly returned non-null " + "value" + NLINE); - } else if (!returnValue.equals(expectedReturnValue)) { - pass = false; - buf.append( - "invoke() returned an object of wrong type or " + "value" + NLINE); - buf.append( - "Expected return value: " + expectedReturnValue.toString() + NLINE); - buf.append("Computed return value: " + returnValue.toString() + NLINE); - } - } catch (Exception e) { - pass = false; - buf.append("invoke() threw an unexpected exception" + NLINE); - buf.append(e.getMessage() + NLINE); - } - - // isLiteralText() - if ((mexp.isLiteralText()) != expectedLiteralText) { - pass = false; - buf.append( - "isLiteralText() did not return " + expectedLiteralText + NLINE); - } - - // getExpressionString() - String retrievedStr = mexp.getExpressionString(); - if (!retrievedStr.equals(exprStr)) { - pass = false; - buf.append( - "getExpressionString() does not return expected " + "string" + NLINE); - buf.append("Expected string = " + exprStr + NLINE); - buf.append("Computed string = " + retrievedStr + NLINE); - } - - return pass; - } - - public static boolean equalsTest(Expression exp1, Expression exp2, - StringBuffer buf) { - - String e1str = exp1.getExpressionString(); - String e2str = (exp2 == null) ? null : exp2.getExpressionString(); - - buf.append("Testing equality: " + e1str + " and " + e2str + NLINE); - - if (!exp1.equals(exp2)) { - if (exp2 != null) { - buf.append("Expression " + e1str + " is not equal to " + "Expression " - + e2str + NLINE); - } - return false; - } else { - int hcode1 = exp1.hashCode(); - int hcode2 = exp2.hashCode(); - - if (hcode1 != hcode2) { - buf.append("Expressions " + e1str + " and " + e2str + " are " - + "equal, but their" + NLINE); - buf.append("hashcodes aren't the same." + NLINE); - buf.append("Hashcode for " + e1str + ": " + hcode1 + NLINE); - buf.append("Hashcode for " + e2str + ": " + hcode2 + NLINE); - return false; - } - } - - return true; - } - - public static boolean expressionSerializableTest(Expression exp, - StringBuffer buf) { - - ObjectOutputStream out = null; - ObjectInputStream in = null; - Expression desexp = null; - ByteArrayOutputStream bos = null; - - // Serialize the Expression. - try { - bos = new ByteArrayOutputStream(); - out = new ObjectOutputStream(bos); - out.writeObject(exp); - } catch (IOException ioe) { - buf.append( - "Failed to serialize the Expression!" + NLINE + ioe.toString()); - return false; - } finally { - if (out != null) { - try { - out.close(); - } catch (Exception close) { - // Do not fail the test if close does not happen. - } - } - } - - // Deserialize the Expression. - try { - byte[] byteBuf = bos.toByteArray(); - in = new ObjectInputStream(new ByteArrayInputStream(byteBuf)); - desexp = (Expression) in.readObject(); - } catch (IOException ioe) { - buf.append( - "Failed to deserialize the Expression!" + NLINE + ioe.toString()); - return false; - } catch (ClassNotFoundException cnfe) { - buf.append("Could not find class of serialized Expression" + NLINE - + cnfe.toString()); - return false; - } finally { - if (in != null) { - try { - in.close(); - } catch (Exception close) { - // Do not fail the test if close does not happen. - } - } - } - - // Test Expression After Serialization - if (!equalsTest(desexp, exp, buf)) { - buf.append("'getExpressionString' after serialization took " + "place." - + NLINE + "Expected: " + exp.getExpressionString() + NLINE - + "Received: " + desexp.getExpressionString() + NLINE); - return false; - } - - return true; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java b/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java deleted file mode 100644 index bbe24594e6..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Copyright (c) 2018, 2020 Oracle and/or its affiliates and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.el.api.resolver; - -import java.util.Iterator; - -import jakarta.el.ELContext; -import jakarta.el.ELException; -import jakarta.el.ELResolver; -import jakarta.el.PropertyNotWritableException; - -public class BarELResolver extends ELResolver { - - public Object getValue(ELContext context, Object base, Object property) - throws ELException { - Object result = null; - if (context == null) - throw new NullPointerException(); - - if (base == null) { - // Resolving first variable (e.g. ${Bar}). - // We only handle "Bar" - String propertyName = (String) property; - if (propertyName.equals("Bar")) { - result = "Foo"; - context.setPropertyResolved(true); - } - } - return result; - } - - public Class getType(ELContext context, Object base, Object property) - throws ELException { - if (context == null) - throw new NullPointerException(); - - if (base == null && property instanceof String - && property.toString().equals("Bar")) { - context.setPropertyResolved(true); - } - - // we never set a value - return null; - } - - public void setValue(ELContext context, Object base, Object property, - - Object value) throws ELException { - if (context == null) - throw new NullPointerException(); - - if (base == null && property instanceof String - && property.toString().equals("Bar")) { - context.setPropertyResolved(true); - throw new PropertyNotWritableException(); - } - } - - public boolean isReadOnly(ELContext context, Object base, Object property) - throws ELException { - if (context == null) - throw new NullPointerException(); - - if (base == null && property instanceof String - && property.toString().equals("Bar")) { - context.setPropertyResolved(true); - } - - return true; - } - - public Iterator getFeatureDescriptors(ELContext context, Object base) { - if (context == null) - throw new NullPointerException(); - return null; - } - - public Class getCommonPropertyType(ELContext context, Object base) { - if (context == null) - throw new NullPointerException(); - - if (base == null) - return String.class; - return null; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java b/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java deleted file mode 100644 index 60c14596d5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java +++ /dev/null @@ -1,542 +0,0 @@ -/* - * Copyright (c) 2009, 2024 Oracle and/or its affiliates and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.el.api.resolver; - -import java.util.Objects; - -import jakarta.el.BeanELResolver; -import jakarta.el.CompositeELResolver; -import jakarta.el.ELContext; -import jakarta.el.ELResolver; -import jakarta.el.MethodNotFoundException; -import jakarta.el.PropertyNotFoundException; -import jakarta.el.PropertyNotWritableException; - -public class ResolverTest { - private static final String NL = System.getProperty("line.separator", "\n"); - - /** - * Private as this class will only have static methods and members. - */ - private ResolverTest() { - } - - public static boolean testCompositeELResolver(ELContext elContext, - CompositeELResolver compResolver, StringBuffer buf) { - - boolean pass = true; - - // add() - BarELResolver barResolver = new BarELResolver(); - try { - compResolver.add(barResolver); - buf.append("add() tested successfully" + NL); - - } catch (Exception e) { - buf.append("add() method Test Failed"); - pass = false; - } - - // setValue() - elContext.setPropertyResolved(false); - compResolver.setValue(elContext, null, "Nothing", "rien"); - if (!elContext.isPropertyResolved()) { - buf.append( - "setValue() tested successfully on non-existent " + "property" + NL); - } else { - buf.append("setValue() set property resolved on non-existent " - + "property" + NL); - pass = false; - } - - elContext.setPropertyResolved(false); - try { - compResolver.setValue(elContext, null, "Bar", "rien"); - pass = false; - } catch (PropertyNotWritableException pnwe) { - buf.append( - "setValue() tested successfully on non-writable " + "property" + NL); - buf.append("PropertyNotWritableException caught as expected" + NL); - } - - // getValue() - elContext.setPropertyResolved(false); - String result = (String) compResolver.getValue(elContext, null, "Bar"); - if (!elContext.isPropertyResolved()) { - buf.append("getValue() did not resolve" + NL); - pass = false; - } else if (!result.equals("Foo")) { - buf.append("Invalid value from BarELResolver: " + result + NL); - pass = false; - } else { - buf.append("getValue() tested successfully" + NL); - } - - // getType() - elContext.setPropertyResolved(false); - Class type = compResolver.getType(elContext, null, "Bar"); - if (!elContext.isPropertyResolved()) { - buf.append("getType() did not resolve" + NL); - pass = false; - } else if (type != null) { - buf.append("getType() returns " + type.getName() + NL); - buf.append("not expected result for non-writable property" + NL); - pass = false; - } else { - buf.append("getType() returns null as expected for non-writable " - + "property" + NL); - } - - // isReadOnly - elContext.setPropertyResolved(false); - boolean nonWritable = compResolver.isReadOnly(elContext, null, "Bar"); - if (!elContext.isPropertyResolved()) { - buf.append("isReadOnly() did not resolve" + NL); - pass = false; - } else if (!nonWritable) { - buf.append("isReadOnly() did not return true" + NL); - pass = false; - } else { - buf.append("isReadOnly() returns true as expected" + NL); - } - - // getCommonPropertyType() - elContext.setPropertyResolved(false); - Class commonPropertyType = (compResolver.getCommonPropertyType(elContext, null)); - buf.append("getCommonPropertyType() returns "); - buf.append(commonPropertyType.getName() + NL); - - return pass; - } - - public static boolean testELResolver(ELContext elContext, ELResolver resolver, - Object base, Object property, Object value, StringBuffer buf, - boolean readOnly) { - - boolean pass = true; - - // setValue() - elContext.setPropertyResolved(false); - try { - resolver.setValue(elContext, base, property, value); - if (readOnly) { - buf.append("setValue() failed on non-writable property"); - pass = false; - } else { - buf.append( - "setValue() tested successfully on writable " + "property" + NL); - } - - } catch (PropertyNotWritableException pnwe) { - if (readOnly) { - buf.append("setValue() tested successfully on non-writable " - + "property" + NL); - buf.append("PropertyNotWritableException caught as expected" + NL); - } else { - buf.append("setValue() failed on non-writable property" + NL); - buf.append("Unexpected PropertyNotWritableException caught" + NL); - pass = false; - } - } - - // getValue() - elContext.setPropertyResolved(false); - Object valueRetrieved = resolver.getValue(elContext, base, property); - if (!elContext.isPropertyResolved()) { - buf.append("getValue() did not resolve" + NL); - pass = false; - } - - if (!readOnly && !Objects.equals(valueRetrieved, value)) { - if (valueRetrieved == null) { - buf.append("null value returned from getValue() method call!" + NL); - pass = false; - } else { - buf.append("Invalid value from getValue():" + NL); - buf.append("Value expected: " + value.toString() + NL); - buf.append("Value retrieved: " + valueRetrieved.toString() + NL); - pass = false; - } - } else { - buf.append("getValue() tested successfully" + NL); - if (!readOnly) { - buf.append("Value expected: " + value.toString() + NL); - buf.append("Value retrieved: " + valueRetrieved.toString() + NL); - } - } - - // getType() - elContext.setPropertyResolved(false); - Class type = resolver.getType(elContext, base, property); - if (!elContext.isPropertyResolved()) { - buf.append("getType() did not resolve" + NL); - pass = false; - } else if (type != null) { - buf.append("getType() returns " + type.getName() + NL); - if (readOnly) { - buf.append("result not expected!" + NL); - pass = false; - } else { - buf.append("non-null as expected" + NL); - } - } else { - buf.append("getType() returns null " + NL); - if (!readOnly) { - buf.append("result not expected!" + NL); - pass = false; - } else { - buf.append("as expected" + NL); - } - } - - // isReadOnly - elContext.setPropertyResolved(false); - boolean nonWritable = resolver.isReadOnly(elContext, base, property); - if (!elContext.isPropertyResolved()) { - buf.append("isReadOnly() did not resolve" + NL); - pass = false; - } else if (nonWritable != readOnly) { - buf.append("isReadOnly() returned unexpected value: " + nonWritable + NL); - pass = false; - } else { - buf.append("isReadOnly() returns " + readOnly + " as expected" + NL); - } - - // getCommonPropertyType() - elContext.setPropertyResolved(false); - Class commonPropertyType = (resolver.getCommonPropertyType(elContext, base)); - buf.append("getCommonPropertyType() returns "); - buf.append(commonPropertyType.getName() + "" + NL); - - return pass; - } - - /** - * Test the ELResolver.invoke() mthod. - * - * @param elContext - * - elContext - * @param resolver - * - el Resolver to be tested. - * @param beanName - * - The javabean to be used. - * @param methodName - * - The method in the javabean to call. - * @param types - * - The @class types of the aurgs for the method. - * @param values - * - The args that you want to pass into the method. - * @param negTest - * - Is this a negetive test or not(true, false). - * @param buf - * - String buffer used to capture loggig info. - * @return - */ - public static boolean testELResolverInvoke(ELContext elContext, - ELResolver resolver, Object beanName, Object methodName, Class[] types, - Object[] values, Boolean negTest, StringBuffer buf) { - - boolean pass = true; - - // invoke - elContext.setPropertyResolved(false); - try { - Boolean nameMatch = (Boolean) resolver.invoke(elContext, beanName, - methodName, types, values); - - if (!nameMatch.booleanValue()) { - buf.append("invoke() did not Run properly." + NL); - pass = false; - } - - } catch (MethodNotFoundException mnfe) { - if (negTest.booleanValue()) { - buf.append("Test Passed invoke() threw MethodNotFoundException"); - } else { - pass = false; - mnfe.printStackTrace(); - } - } catch (Exception e) { - pass = false; - e.printStackTrace(); - } - - return pass; - } - - - // --- Start Negative Method Tests --- - public static boolean testELResolverNPE(ELResolver resolver, Object base, - Object property, Object value, StringBuffer buf) { - - boolean pass = true; - - // getType() - try { - resolver.getType(null, base, property); - pass = false; - buf.append("getType test failed with: " + NL - + "EXPECTED: NullPointerException to be thrown " + NL - + "RECEIVED: NO EXCEPTION THROWN AT ALL! " + NL); - } catch (Exception e) { - if (!(e instanceof NullPointerException)) { - buf.append("getType test failed with: " + NL + "EXPECTED: " - + "NullPointerException to be thrown " + NL + "RECEIVED: " - + e.toString() + NL); - pass = false; - - } else { - buf.append("getType() test Passed: throws " - + "NullPointerException as expected " + NL); - } - } - - // getValue - try { - resolver.getValue(null, base, property); - buf.append("Test Failed getValue() did not throw any exception." + NL - + "Expected: NullPointerException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof NullPointerException)) { - buf.append("Test Failed getValue() threw the wrong exception " + NL - + "Expected: NullPointerException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed getValue() threw NullPointerException " + NL); - } - } - - // setValue() - try { - resolver.setValue(null, base, property, value); - buf.append("Test Failed setValue() did not throw any exception." + NL - + "Expected: NullPointerException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof NullPointerException)) { - buf.append("Test Failed setValue() threw the wrong exception " + NL - + "Expected: NullPointerException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed setValue() threw NullPointerException " + NL); - } - } - - // isReadOnly() - try { - resolver.isReadOnly(null, base, property); - buf.append("Test Failed isReadOnly() did not throw any exception." + NL - + "Expected: NullPointerException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof NullPointerException)) { - buf.append("Test Failed isReadOnly() threw the wrong exception " + NL - + "Expected: NullPointerException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append( - "Test Passed isReadOnly() NullPointerException " + "thrown " + NL); - } - } - - return pass; - } - - public static boolean testELResolverPNFE(ELContext elcontext, - ELResolver resolver, Object base, Object property, StringBuffer buf) { - - boolean pass = true; - - // getType() - try { - resolver.getType(elcontext, base, property); - buf.append("Test Failed getType() did not throw any exception." + NL - + "Expected: PropertyNotFoundException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof PropertyNotFoundException)) { - buf.append("Test Failed getType() threw the wrong exception " + NL - + "Expected: PropertyNotFoundException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed getType() threw " - + "PropertyNotFoundException " + NL); - } - } - - // isReadOnly() - try { - resolver.isReadOnly(elcontext, base, property); - buf.append("Test Failed isReadOnly() did not throw any exception." + NL - + "Expected: PropertyNotFoundException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof PropertyNotFoundException)) { - buf.append("Test Failed isReadOnly() threw the wrong exception " + NL - + "Expected: PropertyNotFoundException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed isReadOnly() threw " - + "PropertyNotFoundException " + NL); - } - } - - // setValue() - try { - resolver.setValue(elcontext, base, property, "arbitrary value"); - buf.append("Test Failed setValue() did not throw any exception." + NL - + "Expected: PropertyNotFoundException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof PropertyNotFoundException)) { - buf.append("Test Failed setValue() threw the wrong exception " + NL - + "Expected: PropertyNotFoundException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed setValue() threw " - + "PropertyNotFoundException " + NL); - } - } - - if (!(resolver instanceof BeanELResolver)) { - return pass; - } - - // getValue() - try { - resolver.getValue(elcontext, base, property); - buf.append("Test Failed getValue() did not throw any exception." + NL - + "Expected: PropertyNotFoundException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof PropertyNotFoundException)) { - buf.append("Test Failed getValue() threw the wrong exception " + NL - + "Expected: PropertyNotFoundException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed getValue() threw " - + "PropertyNotFoundException " + NL); - } - } - - return pass; - } - - public static boolean testELResolverIAE(ELContext elcontext, - ELResolver resolver, Object base, Object property, Object value, - StringBuffer buf) { - - boolean pass = true; - - // getValue() - try { - resolver.getValue(elcontext, base, value); - buf.append("Test Failed getValue() did not throw any exception." + NL - + "Expected: IllegalArgumentException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof IllegalArgumentException)) { - buf.append("Test Failed getValue() threw the wrong exception " + NL - + "Expected: IllegalArgumentException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed getValue() threw " - + "IllegalArgumentException " + NL); - } - } - - // setValue() - try { - resolver.setValue(elcontext, base, property, value); - buf.append("Test Failed setValue() did not throw any exception." + NL - + "Expected: IllegalArgumentException " + NL); - - pass = false; - } catch (Exception e) { - if (!(e instanceof IllegalArgumentException)) { - buf.append("Test Failed setValue() threw the wrong exception " - + "Expected: IllegalArgumentException " + NL + "Received: " - + e.toString()); - - pass = false; - } else { - buf.append("Test Passed setValue() threw " - + "IllegalArgumentException " + NL); - } - } - - return pass; - } - - public static boolean testELResolverPNWE(ELContext elcontext, - ELResolver resolver, Object base, Object property, Object value, - StringBuffer buf) { - - boolean pass = true; - - // setValue() - try { - resolver.setValue(elcontext, base, property, value); - buf.append("Test Failed setValue() did not throw any exception." + NL - + "Expected: PropertyNotWritableException " + NL); - pass = false; - - } catch (Exception e) { - if (!(e instanceof PropertyNotWritableException)) { - buf.append("Test Failed setValue() threw the wrong exception " + NL - + "Expected: PropertyNotWritableException " + NL + "Received: " - + e.toString()); - pass = false; - - } else { - buf.append("Test Passed setValue() threw " - + "PropertyNotWritableException " + NL); - } - } - - return pass; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java b/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java deleted file mode 100644 index e192893527..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java +++ /dev/null @@ -1,446 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates and others. - * All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.jspservletsec; - -import java.util.Properties; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.webclient.BaseUrlClient; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class SecBasicClient extends BaseUrlClient { - - private static final Logger lOGGER = LoggerFactory.getLogger(SecBasicClient.class); - - // Constants: - private static final String USERNAME = "user"; - - private static final String PASSWORD = "password"; - - private static final String UNAUTH_USERNAME = "authuser"; - - private static final String UNAUTH_PASSWORD = "authpassword"; - - private static final String CLASS_TRACE_HEADER = "[SecBasicClient]: "; - - private static final String USER_PRINCIPAL_SEARCH = "The user principal is: "; // (+username) - - private static final String REMOTE_USER_SEARCH = "getRemoteUser(): "; // (+username) - - // fields: - protected String pageSec = null; - - protected String pageGuest = null; - - protected String pageUnprotected = null; - - protected String pageRoleReverse = null; - - private String pageJspBase = "/jsp_sec_secbasic_web"; - - private String pageJspSec = pageJspBase + "/jspSec.jsp"; - - private String pageJspGuest = pageJspBase + "/guestPage.jsp"; - - private String pageJspUnprotected = pageJspBase + "/unprotected.jsp"; - - private String pageJspRoleReverse = pageJspBase + "/rolereverse.jsp"; - - private String pageServletBase = "/servlet_sec_secbasic_web"; - - private String pageServletSec = pageServletBase + "/ServletSecTest"; - - private String pageServletGuest = pageServletBase + "/GuestPageTest"; - - private String pageServletUnprotected = pageServletBase + "/UnProtectedTest"; - - private String pageServletRoleReverse = pageServletBase + "/RoleReverseTest"; - - private String username = null; - - private String password = null; - - private String unauthUsername = null; - - private String unauthPassword = null; - - /* - * @class.setup_props: webServerHost; webServerPort; user; password; authuser; - * authpassword; ts_home; - * - * - */ - // Note:Based on the input argument setup will intialize JSP or servlet pages - - public void setup(String[] args, Properties p) throws Exception { - super.setup(args, p); - - try { - username = TestUtil.getProperty(p, USERNAME); - password = TestUtil.getProperty(p, PASSWORD); - unauthUsername = TestUtil.getProperty(p, UNAUTH_USERNAME); - unauthPassword = TestUtil.getProperty(p, UNAUTH_PASSWORD); - - if (args[0].equals("jsp")) { - pageSec = pageJspSec; - pageGuest = pageJspGuest; - pageUnprotected = pageJspUnprotected; - pageRoleReverse = pageJspRoleReverse; - - } else { - pageSec = pageServletSec; - pageGuest = pageServletGuest; - pageUnprotected = pageServletUnprotected; - pageRoleReverse = pageServletRoleReverse; - - } - } catch (Exception e) { - lOGGER.error("Error: got exception: ", e); - } - } - - /* - * testName: test1 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource, the web server requests authentication. - * - * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive - * authentication request. - */ - - public void test1() throws Exception { - logMessage( - "Sending request to validate presence of www-authenticate header..."); - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test1"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); - TEST_PROPS.setProperty(EXPECTED_HEADERS, "www-authenticate:"); - TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED); - invoke(); - - dumpResponse(); // debug aid - - logMessage("Authentication requested"); - } - - /* - * testName: test2 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. Also tests API assertions in section 11.3. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource, and user enters a valid username and password, the - * original web resource is returned and user is authenticated. 2. - * getRemoteUser() returns the user name that the client authenticated with. - * - * @test_Strategy: 1. Send request with correct authentication. 2. Receive - * page (ensure principal is correct, and ensure that getRemoteUser() returns - * the correct name) - */ - - public void test2() throws Exception { - logMessage("Sending request with Authroization header..."); - - StringBuffer sb = new StringBuffer(100); - sb.append(USER_PRINCIPAL_SEARCH).append(username).append("|"); - sb.append(REMOTE_USER_SEARCH).append(username).append("|"); - sb.append("isUserInRole(\"ADM\"): !true!").append("|"); - sb.append("isUserInRole(\"MGR\"): !false!").append("|"); - sb.append("isUserInRole(\"VP\"): !false!").append("|"); - sb.append("isUserInRole(\"EMP\"): !true!").append("|"); - - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test2"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); - TEST_PROPS.setProperty(BASIC_AUTH_USER, username); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); - TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); - invoke(); - - dumpResponse(); // debug aid - - logMessage("isUserInRole() and getRemoteUser() returned expected results"); - } - - /* - * testName: test3 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource, and user enters an invalid username and password, - * the container denies access to the web resource. - * - * @test_Strategy: 1. Re-send request with incorrect authentication. 2. - * Receive authentication request. - */ - - public void test3() throws Exception { - logMessage( - "Sending an request for a protected resource with invalid username/password..."); - - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test3"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); - TEST_PROPS.setProperty(BASIC_AUTH_USER, "invalid"); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); - TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED); - invoke(); - - dumpResponse(); // debug aid - - logMessage("Access Denied"); - } - - /* - * testName: test4 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource, and user enters an valid username and password, but - * for a role that is not authorized to access the resource, the container - * denies access to the web resource. - * - * @test_Strategy: 1. Send request with correct authentication for user - * javajoe for a page javajoe is allowed to access. 2. Receive page (this - * verifies that the javajoe user is set up properly). 3. Send request with - * correct authentication, but incorrect authorization to access resource 4. - * Receive error - */ - - public void test4() throws Exception { - - StringBuffer sb = new StringBuffer(100); - sb.append(USER_PRINCIPAL_SEARCH).append(unauthUsername); - - logMessage("Sending request to resource the user has access to..."); - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test4"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageGuest)); - TEST_PROPS.setProperty(BASIC_AUTH_USER, unauthUsername); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, unauthPassword); - TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); - invoke(); - - dumpResponse(); // debug aid - - logMessage("User successfully accessed the resource"); - - logMessage( - "Sending request to resource with valid username/password, but not the right roles..."); - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test4"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); - TEST_PROPS.setProperty(BASIC_AUTH_USER, unauthUsername); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, unauthPassword); - TEST_PROPS.setProperty(STATUS_CODE, FORBIDDEN); - invoke(); - - dumpResponse(); // debug aid - - logMessage("Access Forbidden"); - } - - /* - * testName: test5 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. Also tests assertions in section 11.3. - * - * 1. If user has not been authenticated and user attempts to access an - * unprotected web resource, the web resource is returned without need to - * authenticate. 2. isUserInRole() must return false for any valid or invalid - * role reference. 3. getRemoteUser() must return false - * - * @test_Strategy: 1. Send request for unprotected.jsp with no authentication. - * 2. Receive page 3. Search the returned page for "!true!", which would - * indicate that at least one call to isUserInRole attempted by - * unprotected.jsp returned true. 4. check that getRemoteUser() returns null. - */ - - public void test5() throws Exception { - StringBuffer sb = new StringBuffer(100); - sb.append(USER_PRINCIPAL_SEARCH).append("|"); - sb.append(REMOTE_USER_SEARCH).append("null"); - - logMessage("Sending request to unprotected resource...."); - TEST_PROPS.setProperty(TEST_NAME, "BasicSec/Test5"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageUnprotected)); - TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); - TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "!true!"); - invoke(); - - dumpResponse(); // debug aid - - logMessage("isUserInRole() and getRemoteUser() returned expected results"); - } - - /* - * testName: test6 - * - * @assertion: Test HTTP-Basic authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. Also tests assertions from section 11.3. - * - * Given two servlets in the same application, each of which calls - * isUserInRole(X), and where X is linked to different roles in the scope of - * each of the servlets (i.e. R1 for servlet 1 and R2 for servlet 2), then a - * user whose identity is mapped to R1 but not R2, shall get a true return - * value from isUserInRole( X ) in servlet 1, and a false return value from - * servlet 2 (a user whose identity is mapped to R2 but not R1 should get the - * inverse set of return values). - * - * @test_Strategy: Since test1 already verifies the functionality for - * isUserInRole returning true, this test needs only verify that it should - * return false for the other jsp. For this test, MGR and ADM are swapped, so - * isUserInRole() should return opposite values from test1. - * - * 1. Send request to access rolereverse.jsp 2. Receive redirect to login - * page, extract location and session id cookie. 3. Send request to access new - * location, send cookie 4. Receive login page 5. Send form response with - * username and password 6. Receive redirect to resource 7. Request resource - * 8. Receive resource (check isUserInRole for all known roles) - */ - public void test6() throws Exception { - - StringBuffer sb = new StringBuffer(100); - sb.append(USER_PRINCIPAL_SEARCH).append(username).append("|"); - sb.append("isUserInRole(\"ADM\"): !false!").append("|"); - sb.append("isUserInRole(\"MGR\"): !true!").append("|"); - sb.append("isUserInRole(\"VP\"): !false!").append("|"); - sb.append("isUserInRole(\"EMP\"): !true!").append("|"); - - logMessage( - "Sending request to validate isUserInRole with roles reversed..."); - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test6"); - TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageRoleReverse)); - TEST_PROPS.setProperty(BASIC_AUTH_USER, username); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); - TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); - invoke(); - - dumpResponse(); // debug aid - - logMessage("isUserInRole() and getRemoteUser() returned expected results"); - } - - /* - * testName: test7 - * - * @assertion: Test BASIC authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.1. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource+ , and user enters an invalid - * username and password, the container denies access to the web resource. - * IMPORTANT: this is not just trying to access a protected resource but - * instead is trying to access pageSec + "/j_security_check" when - * unauthenticated in an attempt to trick/confuse the impl into thinking - * authentication occurred when it did not. - * - * @test_Strategy: 1. send request with incorrect authentication to url + - * "/j_security_check" 2. Receive authentication request. - */ - public void test7() throws Exception { - logMessage( - "Sending an request for a protected resource with invalid username/password..."); - - TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test7"); - TEST_PROPS.setProperty(REQUEST, - getRequestLine("GET", pageSec + "/j_security_check")); - TEST_PROPS.setProperty(BASIC_AUTH_USER, "invalid"); - TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); - // The servlet is mapped to "/ServletSecTest" so this request should result - // in a 404 since no Servlet is mapped to the requested URI or 401 if the container - // rejects the incoming BASIC header. - TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED + "," + NOT_FOUND); - invoke(); - - dumpResponse(); // debug aid - - if ((_testCase != null) && (_testCase.getResponse() != null)) { - // we got a response so lets check it... - // if our search string appears in the response, we were erroneously - // allowed access to a protected page! - String searchString = "Inside ServletSecTestServlet"; - try { - if (_testCase.getResponse().getResponseBodyAsString() - .indexOf(searchString) != -1) { - // ohoh - we should NOT have been allowed to access the page and it - // appears we did access it. log an error - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test7 failed."); - } - } catch (Exception ex) { - // must've had problem getting response so dump exception but continue - // on - ex.printStackTrace(); - } - } - - logMessage("Access properly Denied"); - } - - /** - * Returns a valid HTTP/1.1 request line. - * - * @param method - * the request method - * @param path - * the request path - * @return a valid HTTP/1.1 request line - */ - private static String getRequestLine(String method, String path) { - return method + " " + path + " HTTP/1.1"; - } - - /** - * Simple wrapper around TestUtil.logMessage(). - * - * @param message - * - the message to log - */ - private static void logMessage(String message) { - TestUtil.logMsg(CLASS_TRACE_HEADER + message); - } - - /** - * Simple wrapper around TestUtil.logTrace(). - * - * @param message - * - the message to log - */ - private static void trace(String message) { - TestUtil.logTrace(CLASS_TRACE_HEADER + message); - } - - private void dumpResponse() { - try { - if ((_testCase != null) && (_testCase.getResponse() != null)) { - trace(_testCase.getResponse().getResponseBodyAsString()); - } - } catch (Exception ex) { - // must've had problem getting response so dump exception but continue on - ex.printStackTrace(); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java b/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java deleted file mode 100644 index 12e0ea899f..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java +++ /dev/null @@ -1,2304 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.jspservletsec; - -import java.io.BufferedReader; -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.ConnectException; -import java.net.InetAddress; -import java.net.MalformedURLException; -import java.net.Socket; -import java.net.URL; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Properties; -import java.util.StringTokenizer; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.lib.util.WebUtil; -import com.sun.ts.lib.util.WebUtil.Response; - -public class secformClient extends EETest { - // Configurable constants: - - private String protocol = "http"; - - private String hostname = null; - - private int portnum = 0; - - protected String pageBase = null; - - protected String pageSec = null; - - protected String pageGuest = null; - - protected String pageRoleReverse = null; - - protected String pageUnprotected = null; - - private String pageProgAuthen = null; - - private String pageProgLogin = null; - - private String pageProgLogout = null; - - private String pageOne = null; - - private String pageTwo = null; - - private String pageSample = null; - - private String pageallRoles = null; - - // common for JSP and Servlet - private String pageLogin = "/login.jsp"; - - private String pageError = "/error.jsp"; - - private String pageSecurityCheck = "/j_security_check"; - - private String pageJspBase = "/jsp_sec_secform_web"; - - private String pageJspSec = pageJspBase + "/jspSec.jsp"; - - private String pageJspUnprotected = pageJspBase + "/unprotected.jsp"; - - private String pageJspGuest = pageJspBase + "/guestPage.jsp"; - - private String pageJspRoleReverse = pageJspBase + "/rolereverse.jsp"; - - private String pageJspOne = pageJspBase + "/One.jsp"; - - private String pageJspTwo = pageJspBase + "/Two.jsp"; - - private String pageJspSample = pageJspBase + "/Sample.jsp"; - - private String pageJspallRoles = pageJspBase + "/allRoles.jsp"; - - private String pageServletBase = "/servlet_sec_secform_web"; - - private String pageServletSec = pageServletBase + "/ServletSecTest"; - - private String pageServletUnprotected = pageServletBase + "/UnProtectedTest"; - - private String pageServletProgLogin = pageServletBase - + "/ServletProgrammaticLogin"; - - private String pageServletProgLogout = pageServletBase - + "/ServletProgrammaticLogout"; - - private String pageServletProgAuthen = pageServletBase - + "/ServletProgrammaticAuthen"; - - private String pageServletGuest = pageServletBase + "/GuestPageTest"; - - private String pageServletRoleReverse = pageServletBase + "/RoleReverseTest"; - - private String pageServletOne = pageServletBase + "/OneTest"; - - private String pageServletTwo = pageServletBase + "/TwoTest"; - - private String pageServletSample = pageServletBase + "/SampleTest"; - - private String pageServletallRoles = pageServletBase + "/allRolesTest"; - - private String searchFor = "The user principal is: "; // (+username) - - private String searchForGetRemoteUser = "getRemoteUser(): "; // (+username) - - private String username = ""; - - private String password = ""; - - private String unauthUsername = ""; - - private String unauthPassword = ""; - - private String tshome = ""; - - // Constants: - private final String WebHostProp = "webServerHost"; - - private final String WebPortProp = "webServerPort"; - - private final String UserNameProp = "user"; - - private final String PasswordProp = "password"; - - private final String unauthUserNameProp = "authuser"; - - private final String unauthPasswordProp = "authpassword"; - - private final String tsHomeProp = "ts_home"; - - private String testDir = System.getProperty("user.dir"); - - // Shared test variables: - private Properties props = null; - - private String request = null; - - private WebUtil.Response response = null; - - private WebUtil.Response loginPageRequestResponse = null; - - private WebUtil.Response errorPageRequestResponse = null; - - private Hashtable cookies = null; - - private TSURL tsurl = new TSURL(); - - /* - * @class.setup_props: webServerHost; webServerPort; user; password; authuser; - * authpassword; ts_home; - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - - try { - hostname = TestUtil.getProperty(p, WebHostProp); - portnum = Integer.parseInt(TestUtil.getProperty(p, WebPortProp)); - username = TestUtil.getProperty(p, UserNameProp); - password = TestUtil.getProperty(p, PasswordProp); - unauthUsername = TestUtil.getProperty(p, unauthUserNameProp); - unauthPassword = TestUtil.getProperty(p, unauthPasswordProp); - tshome = TestUtil.getProperty(p, tsHomeProp); - - TestUtil.logMsg("username: " + username); - TestUtil.logMsg("password: " + password); - - if (args[0].equals("jsp")) { - pageBase = pageJspBase; - pageSec = pageJspSec; - pageGuest = pageJspGuest; - pageUnprotected = pageJspUnprotected; - pageRoleReverse = pageJspRoleReverse; - pageOne = pageJspOne; - pageTwo = pageJspTwo; - pageSample = pageJspSample; - pageallRoles = pageJspallRoles; - - // prefix pageJspBase to pageLogin, pageError ,pageSecurityCheck - pageLogin = pageJspBase + pageLogin; - pageError = pageJspBase + pageError; - pageSecurityCheck = pageJspBase + pageSecurityCheck; - - } else { - pageBase = pageServletBase; - pageSec = pageServletSec; - pageGuest = pageServletGuest; - pageUnprotected = pageServletUnprotected; - pageRoleReverse = pageServletRoleReverse; - pageOne = pageServletOne; - pageTwo = pageServletTwo; - pageSample = pageServletSample; - pageallRoles = pageServletallRoles; - pageProgLogin = pageServletProgLogin; - pageProgLogout = pageServletProgLogout; - pageProgAuthen = pageServletProgAuthen; - - // prefix pageServletBase to pageLogin, pageError, pageSecurityCheck - pageLogin = pageServletBase + pageLogin; - pageError = pageServletBase + pageError; - pageSecurityCheck = pageServletBase + pageSecurityCheck; - - } - - } catch (Exception e) { - logErr("Error: got exception: ", e); - } - } - - /* - * testName: test1 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. Also tests an assertion in section 11.3. - * - * 1. If user has not been authenticated and user attempts to access a - * protected web resource, the correct login form is returned. 2. If user has - * not been authenticated and user attempts to access a protected web - * resource, and user enters a valid username and password, the original web - * resource is returned and user is authenticated. A call to getRemoteUser() - * must return the username. 3. If user has been authenticated and user is - * authorized to access a protected web resource, user gets web resource - * without the need to re-authenticate. A call to getRemoteUser() still - * returns the username. - * - * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login - * page(make sure it the expected login page) 3. Send form response with - * username and password 4. Receive jspSec.jsp (ensure principal is correct, - * and ensure getRemoteUser() returns the username, and ensure isUserInRole() - * is working properly) 5. Re-request jspSec.jsp 6. Ensure principal is still - * correct and getRemoteUser() still returns the correct username. Also ensure - * isUserInRole() is still working properly. - */ - public void test1() throws Exception { - try { - // The first part of this test is used in test2 and test3 as - // well, so the code has been moved to a helper method. - requestAndGetLoginPage(pageSec, 1); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - TestUtil.logMsg("response.statusToken:" + response.statusToken); - TestUtil.logMsg("response.content:" + response.content); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test1 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 1); - - // Print response content - TestUtil.logMsg("received response content 1: " + response.content); - - // Check to make sure we are authenticated by checking the page - // content. The jsp should output "The user principal is: j2ee" - String searchString = searchFor + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("User Principal correct."); - - // Check to make sure getRemoteUser returns the user name. - searchString = searchForGetRemoteUser + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("getRemoteUser() did not return " + username + ":"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("getRemoteUser() correct."); - - // Check to make sure isUserInRole is working properly: - Hashtable roleCheck = new Hashtable(); - roleCheck.put("ADM", Boolean.TRUE); - roleCheck.put("MGR", Boolean.FALSE); - roleCheck.put("VP", Boolean.FALSE); - roleCheck.put("EMP", Boolean.TRUE); - // roleCheck.put( "Administrator", new Boolean( false ) ); - if (!checkRoles(response.content, roleCheck)) { - TestUtil.logErr("isUserInRole() does not work correctly."); - TestUtil.logErr("Page Received:"); - TestUtil.logErr(response.content); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("isUserInRole() correct."); - - // Now that we are authenticated, try accessing the resource again - // to ensure we need not go through the login page again. - request = pageSec; - TestUtil.logMsg("Cookies =" + cookies.toString()); - TestUtil.logMsg("Re-sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + pageSec); - throw new Exception("test1 failed."); - } - - // Check to make sure we are still authenticated. - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("User Principal still correct."); - - // Check to make sure getRemoteUser still returns the user name. - searchString = searchForGetRemoteUser + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("getRemoteUser() did not return " + username - + " after lazy authentication:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("getRemoteUser() still correct."); - - // Check to make sure isUserInRole is still working properly: - if (!checkRoles(response.content, roleCheck)) { - TestUtil.logErr("isUserInRole() does not work correctly."); - TestUtil.logErr("Page Received:"); - TestUtil.logErr(response.content); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("isUserInRole() still correct."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test1 failed: ", e); - } - } - - /* - * testName: test2 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. - * - * If user has not been authenticated and user attempts to access a protected - * web resource, and user enters incorrect username and password, the error - * page is returned. - * - * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login page - * 3. Send form response with username and incorrect password 4. Receive error - * page (make sure it is the expected error page) - */ - public void test2() throws Exception { - try { - // The first part of this test is used in test1 and test3 as - // well, so the code has been moved to a helper method. - requestAndGetLoginPage(pageSec, 2); - - // Send response to login form with session id cookie and username - // and incorrect password: - request = pageSecurityCheck; - TestUtil.logMsg("Sending request \"" + request - + "\" with incorrect login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", "incorrect" + password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - TestUtil.logMsg("response.statusToken:" + response.statusToken); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 2); - - // Check to make sure the user principal is null: - String searchString = searchFor + "null"; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User principal is not null in error page:"); - TestUtil.logErr(response.content); - throw new Exception("test2 failed."); - } - - TestUtil.logMsg("User Principal is null as expected."); - - // Request error page - request = pageError; - TestUtil.logMsg("Sending request \"" + request + "\""); - errorPageRequestResponse = WebUtil.sendRequest("GET", - InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), - null, cookies); - - // Check that the page was found (no error). - if (errorPageRequestResponse.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test2 failed."); - } - - // Compare the received error page with the expected error page - // i.e Check whether - // response.content ==errorPageRequestResponse.content - if (response.content.equals(errorPageRequestResponse.content)) { - TestUtil.logMsg("Received the expected error page"); - } else { - TestUtil.logMsg("Received incorrect error page"); - throw new Exception("test2 failed."); - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test2 failed: ", e); - } - } - - /* - * testName: test3 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. - * - * If user has not been authenticated and user attempts to access a protected - * web resource, and user enters correct username and password of a user that - * is authorized to access the resource, the resource is returned (similar to - * test1, but uses user javajoe instead of j2ee). This test establishes that - * the javajoe user is set up properly. - * - * @test_Strategy: 1. Send request to access guestPage.jsp 2. Receive login - * page 3. Send form response with username(javajoe) and password 4. Receive - * resource (check user principal) - * - */ - public void test3() throws Exception { - try { - // The first part of this test is used in test2 and test3 as - // well, so the code has been moved to a helper method. - requestAndGetLoginPage(pageGuest, 3); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg("Sending request \"" + request - + "\" with login information (as " + unauthUsername + ")."); - Properties postData = new Properties(); - postData.setProperty("j_username", unauthUsername); - postData.setProperty("j_password", unauthPassword); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test3 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 3); - - // Check to make sure we are authenticated by checking the page - // content. The jsp should output "The user principal is: javajoe" - String searchString = searchFor + unauthUsername; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test3 failed."); - } - TestUtil.logMsg("User Principal correct."); - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test3 failed: ", e); - } - } - - /* - * testName: test4 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. - * - * If user has not been authenticated and user attempts to access a protected - * web resource, and user enters correct username and password of a user that - * is not authorized to access the resource, the resource is not returned. The - * authenticated user is not denied access to an unprotected page. - * - * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login page - * 3. Send form response with username and password 4. Receive an error - * (expected unauthorized error) 5. Send request to access unprotected.jsp 6. - * Receive unprotected.jsp. - */ - public void test4() throws Exception { - try { - // The first part of this test is used in test1 and test2 as - // well, so the code has been moved to a helper method. - requestAndGetLoginPage(pageSec, 4); - - // Send response to login form with session id cookie and username - // and password: - request = pageSecurityCheck; - TestUtil.logMsg("Sending request \"" + request - + "\" with correct login information (" + unauthUsername + ")" - + ", but incorrect authorization for this resource."); - Properties postData = new Properties(); - postData.setProperty("j_username", unauthUsername); - postData.setProperty("j_password", unauthPassword); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - TestUtil.logMsg("response.content = " + response.content); - - if (response.statusToken.equals("302")) { - // We should receive a redirection page - if (response.location == null) { - TestUtil.logErr("No redirection to login page received."); - throw new Exception("test4 failed."); - } - - // Extract location from redirection and format new request: - request = WebUtil.getRequestFromURL(response.location); - TestUtil.logMsg("Redirect to: " + response.location); - - // update cookies if the webserver choose to send cookies - addNewCookies(cookies, response.cookies); - - // Request redirected page (login page): - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, request, null, cookies); - } - - // Receive "403" or "404" error code for unauthorized access (forbidden). - if ((response.statusToken.equals("403")) - || (response.statusToken.equals("404"))) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected unauthorized access error"); - } else { - TestUtil.logErr( - "Did not receive error for unauthorized access: " + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content:"); - TestUtil.logErr(response.content); - throw new Exception("test4 failed."); - } - - // Request unprotected page (unprotected.jsp page): - request = pageUnprotected; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Check that we did not receive an error and that we did not - // receive a redirection: - if (response.isError()) { - TestUtil.logErr("Error retrieving " + request); - throw new Exception("test4 failed."); - } - - // Check that the page returned is the correct one. The principal - // is not checked. - String searchString = searchFor; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("Incorrect page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should contain: \"" + searchString + "\")"); - throw new Exception("test4 failed."); - } - TestUtil.logMsg("Access to unprotected page granted."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test4 failed: ", e); - } - } - - /* - * testName: test5 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. Also tests assertions from section 11.3. - * - * If user has not been authenticated and user attempts to access an - * unprotected web resource, the resource is returned, and the user is not - * forced to authenticate. Also, isUserInRole() must return false for any - * valid or invalid role reference. A call to getRemoteUser() must return - * null. - * - * @test_Strategy: 1. Send request to access unprotected.jsp 2. Receive - * unprotected.jsp 3. Search the returned page for "!true!", which would - * indicate that at least one call to isUserInRole attempted by - * unprotected.jsp returned true. 4. Check that the call to getRemoteUser() - * returned null. - */ - public void test5() throws Exception { - try { - // Request restricted jsp page. - String request = pageUnprotected; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + pageUnprotected); - throw new Exception("test5 failed."); - } - - // Check that we did not receive an error and that we did not - // receive a redirection: - if (response.isError()) { - TestUtil.logErr("Error retrieving " + request); - throw new Exception("test5 failed."); - } - - // Check that the page returned is the correct one. The principal - // is not checked. - String searchString = searchFor; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("Incorrect page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should contain: \"" + searchString + "\")"); - throw new Exception("test5 failed."); - } - - TestUtil.logMsg("Access to unprotected page granted."); - - // Check to see if any of the calls to isUserInRole returned true: - TestUtil.logMsg("Checking isUserInRole..."); - searchString = "!true!"; - if (response.content.indexOf(searchString) != -1) { - TestUtil.logErr("At least one call to isUserInRole returned true."); - TestUtil.logErr("Page received:"); - TestUtil.logErr(response.content); - throw new Exception("test5 failed."); - } - - TestUtil.logMsg("isUserInRole test passed."); - - // Check to make sure the call to getRemoteUser() returned null. - TestUtil.logMsg("Checking getRemoteUser()..."); - searchString = searchForGetRemoteUser + "null"; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("A call to getRemoteUser() did not return null."); - TestUtil.logErr("Page received:"); - TestUtil.logErr(response.content); - throw new Exception("test5 failed."); - } - TestUtil.logMsg("getRemoteUser() test passed."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test5 failed: ", e); - } - } - - /* - * testName: test6 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. Also tests assertions from section 11.3. - * - * Given two servlets in the same application, each of which calls - * isUserInRole(X), and where X is linked to different roles in the scope of - * each of the servlets (i.e. R1 for servlet 1 and R2 for servlet 2), then a - * user whose identity is mapped to R1 but not R2, shall get a true return - * value from isUserInRole( X ) in servlet 1, and a false return value from - * servlet 2 (a user whose identity is mapped to R2 but not R1 should get the - * inverse set of return values). - * - * @test_Strategy: Since test1 already verifies the functionality for - * isUserInRole returning true, this test needs only verify that it should - * return false for the other jsp. For this test, MGR and ADM are swapped, so - * isUserInRole() should return opposite values from test1. - * - * 1. Send request to access rolereverse.jsp 2. Receive login page 3. Send - * form response with username and password 4. Receive resource (check - * isUserInRole for all known roles) - */ - public void test6() throws Exception { - try { - // The first part of this test is used in test2 and test3 as - // well, so the code has been moved to a helper method. - requestAndGetLoginPage(pageRoleReverse, 6); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg("Sending request \"" + request - + "\" with login information (as " + username + ")."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test6 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 6); - - // Check to make sure we are authenticated by checking the page - // content. The jsp should output "The user principal is: j2ee" - String searchString = searchFor + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test6 failed."); - } - TestUtil.logMsg("User Principal correct."); - - // Check to make sure isUserInRole is working properly: - Hashtable roleCheck = new Hashtable(); - roleCheck.put("ADM", Boolean.FALSE); - roleCheck.put("MGR", Boolean.TRUE); - roleCheck.put("VP", Boolean.FALSE); - roleCheck.put("EMP", Boolean.TRUE); - // roleCheck.put( "Manager", new Boolean( false ) ); - if (!checkRoles(response.content, roleCheck)) { - TestUtil.logErr("isUserInRole() does not work correctly."); - TestUtil.logErr("Page Received:"); - TestUtil.logErr(response.content); - throw new Exception("test6 failed."); - } - TestUtil.logMsg("isUserInRole() correct."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test6 failed: ", e); - } - } - - /* - * testName: test7 - * - * @assertion: Servlet Specification v2.3, sec 9.4 A special directory exists - * within the application hierarchy named WEB-INF. This directory contains all - * things related to the application that aren't in the document root of the - * application. It is important to note that the WEB-INF node is not part of - * the public document tree of the application. No file contained in the - * WEB-INF directory may be served directly to a client. - * - * @test_Strategy: 1) send a http request to WEB-INF directory 2) expect 404 - * or 403 3) repeat step 1 and 2 for the following a) web-inf (for case - * insensitive platforms) b) WEB-INF/web.xml c) web-inf/web.xml 4) based on - * the http return code report test status - */ - public void test7() { - List statusCodes; - - try { - // Try accessing WEB-INF - request = pageBase + "/WEB-INF/"; - - statusCodes = new ArrayList(); - statusCodes.add("404"); - statusCodes.add("403"); - - this.testStatusCodes(request, statusCodes, "test7"); - - // Try accessing /web-inf (for case insensitive platforms) - request = pageBase + "/web-inf/"; - - statusCodes = new ArrayList(); - statusCodes.add("404"); - statusCodes.add("403"); - - this.testStatusCodes(request, statusCodes, "test7"); - - // Try accessing WEB-INF/web.xml - request = pageBase + "/WEB-INF/web.xml"; - - statusCodes = new ArrayList(); - statusCodes.add("404"); - - this.testStatusCodes(request, statusCodes, "test7"); - - // Try accessing web-inf/web.xml (for case insensitive platforms) - request = pageBase + "/web-inf/web.xml"; - - statusCodes = new ArrayList(); - statusCodes.add("404"); - - this.testStatusCodes(request, statusCodes, "test7"); - - // Try accessing WEB-INF/web.xml - request = pageBase + "/WEB-INF/web.xml"; - - statusCodes = new ArrayList(); - statusCodes.add("404"); - - this.testStatusCodes(request, statusCodes, "test7"); - - } catch (Exception e) { - e.printStackTrace(); - } - } - - /* - * testName: test8 - * - * @assertion: Servlet Specification v2.3, sec 9.5 Web applications can be - * packaged and signed, using the standard Java Archive tools, into a Web - * ARchive format (war) file. When packaged into such a form, a META-INF - * directory will be present which contains information useful to the Java - * Archive tools. If this directory is present, the servlet container must not - * allow it be served as content to a web client's request. - * - * @test_Strategy: 1) send a http request to META-INF directory 2) expect 404 - * or a 403 3) repeat step 1 and 2 for the following a) meta-inf (for case - * insensitive platforms) b) META-INF/MANIFEST.MF c) meta-inf/manifest.mf 4) - * based on the http return code, report test status - */ - public void test8() throws Exception { - try { - - // Try accessing META-INF - request = pageBase + "/META-INF/"; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 8); - - // Receive "404" or "403" error code. - if (response.statusToken.equals("404") - || response.statusToken.equals("403")) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected error code"); - } else { - TestUtil.logErr("Did not receive expected error code" + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content:"); - TestUtil.logErr(response.content); - throw new Exception("test8 failed."); - } - - // Try accessing /meta-inf (for case insensitive platforms) - request = pageBase + "/meta-inf/"; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 8); - - // Receive "404" or "403" error code. - if (response.statusToken.equals("404") - || response.statusToken.equals("403")) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected error code"); - } else { - TestUtil.logErr("Did not receive expected error code" + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content:"); - TestUtil.logErr(response.content); - throw new Exception("test8 failed."); - } - - // Try accessing META-INF/MANIFEST.MF - request = pageBase + "/META-INF/MANIFEST.MF"; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 8); - - // Receive "404" or "403" error code. - if (response.statusToken.equals("404") - || response.statusToken.equals("403")) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected error code"); - } else { - TestUtil.logErr("Did not receive expected error code" + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content:"); - TestUtil.logErr(response.content); - throw new Exception("test8 failed."); - } - - // Try accessing meta-inf/manifest.mf(for case insensitive platforms) - request = pageBase + "/meta-inf/manifest.mf"; - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 8); - - // Receive "404" or "403" error code. - if (response.statusToken.equals("404") - || response.statusToken.equals("403")) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected error code"); - } else { - TestUtil.logErr("Did not receive expected error code" + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content:"); - TestUtil.logErr(response.content); - throw new Exception("test8 failed."); - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test8 failed: ", e); - } - } - - /* - * testName: test9 - * - * @assertion: URLMapping from Servlet Specification v2.3, sec 11.2 - * - * 1) A string beginning with a / character and ending with a /* postfix is - * used as a path mapping. 2) A string beginning with a *. prefix is used as - * an extension mapping. 3) All other strings are used as exact matches only - * 4) A string containing only the / character indicates that servlet - * specified by the mapping becomes the "default" servlet of the application. - * In this case the servlet path is the request URI minus the context path and - * the path info is null. - * - * - * @test_Strategy: 1) Deploy a two webcomponents One.jsp and Two.jsp - * exercising various mapping rules 2) Make a http request with a URL(based on - * the above mapping rules) 3) Make a http request with a absolute match URL. - * 4) compare the results obtained through step 2 and 3 and declare test - * result - * - */ - public void test9() throws Exception { - try { - String testURL = null; - String exactMatchURL = null; - - // This tests exercises the URL mapping rules - // See compareURLContents() method description for more info - - // Note: pageOne can be a JSP or Servlet - // 1) for JSP - // pageOne = pageBase + "/One.jsp"; - // 2) for servlet - // pageOne = pageBase + "/OneTest"; - - // Try accessing pageOne using "/One/index.html" - testURL = pageBase + "/One/index.html"; - exactMatchURL = pageOne; - compareURLContents(testURL, 9, exactMatchURL); - - // Try accessing pageOne using "/One/*" - testURL = pageBase + "/One/*"; - exactMatchURL = pageOne; - compareURLContents(testURL, 9, exactMatchURL); - - // Note: pageTwo can be a JSP or Servlet - // 1) for JSP - // pageTwo = pageBase + "/Two.jsp"; - // 2) for servlet - // pageTwo = pageBase + "/TwoTest"; - - // Try accessing pageTwo using "*.jsp" - testURL = pageBase + "/*.jsp"; - exactMatchURL = pageTwo; - compareURLContents(testURL, 9, exactMatchURL); - - // Try accessing pageTwo using "*.two" - testURL = pageBase + "/*.two"; - exactMatchURL = pageTwo; - compareURLContents(testURL, 9, exactMatchURL); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test9 failed: ", e); - } - } - - /* - * testName: test10 - * - * @assertion: Test isUserInRole(), specified in the Java Servlet - * Specification v2.3, Sec 12.3. - * - * The isUserInRole method expets a String rolename. In order that this - * rolename can be adjusted by the application assembler, or the deployer - * without having to recompile the Servlet making the call a - * element should be declared in the deployment descriptor - * with the sub-element containing the rolename passed into this - * call. The value of the sub-element is the of the - * that the programmer is testing that the caller is mapped to - * or not. The container is required to respect this mapping of - * to in this manner when determining the - * return value of the call. - * - * If, however, no has been declared with that - * matches the argument to isUserInRole, the container must default to - * checking the argument against the list of s for this web - * application to determine whether the caller is mapped to the rolename - * passed in. - * - * @test_Strategy: Note: test5 and test6 verifies the first part of the - * assertion. This test verifies only the second part of this assertion - * - * 1. Send request to access Sample.jsp 2. Receive login page(make sure it is - * the expected login page) 3. Send form response with username and password - * 4. Receive Sample.jsp (ensure principal is correct, and ensure - * getRemoteUser() returns the username, and ensure isUserInRole() is working - * properly) - */ - public void test10() throws Exception { - try { - requestAndGetLoginPage(pageSample, 10); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test10 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 10); - - // Check to make sure we are authenticated by checking the page - // content. The jsp should output "The user principal is: j2ee" - String searchString = searchFor + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test10 failed."); - } - TestUtil.logMsg("User Principal correct."); - - // Check to make sure getRemoteUser returns the user name. - searchString = searchForGetRemoteUser + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("getRemoteUser() did not return " + username + ":"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test10 failed."); - } - TestUtil.logMsg("getRemoteUser() correct."); - - // Check to make sure isUserInRole is working properly: - Hashtable roleCheck = new Hashtable(); - roleCheck.put("Administrator", Boolean.TRUE); - if (!checkRoles(response.content, roleCheck)) { - TestUtil.logErr("isUserInRole() does not work correctly."); - TestUtil.logErr("Page Received:"); - TestUtil.logErr(response.content); - throw new Exception("test10 failed."); - } - TestUtil.logMsg("isUserInRole() correct."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test10 failed: ", e); - } - } - - /* - * testName: test11 - * - * @assertion: Servlet Specification v2.3, sec 13.2 DTD The auth-constraint - * element indicates the user roles that should be permitted access to this - * resource collection. The role used here must either in a security-role-ref - * element, or be the specially reserved role-name * that is a compact syntax - * for indicating all roles in the web application. If both * and rolenames - * appear, the container interprets this as all roles. - * - * @test_Strategy: Configure allRoles.jsp to be accessible by allRoles (*) - * - * 1) Try accesing allRoles.jsp as the following user a) j2ee b) javajoe 2) - * Based on the http reply, report test status - * - * - */ - public void test11() throws Exception { - try { - - // Access allRoles.jsp as user "j2ee" - TestUtil.logMsg("\nAccessing allRoles.jsp as user j2ee"); - requestAndGetLoginPage(pageallRoles, 11); - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test11 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 11); - TestUtil.logMsg("Successfully accessed allRoles.jsp as user j2ee"); - - // Access allRoles.jsp as user "javajoe" - TestUtil.logMsg("\nAccessing allRoles.jsp as user javajoe"); - requestAndGetLoginPage(pageallRoles, 11); - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - postData = new Properties(); - postData.setProperty("j_username", unauthUsername); - postData.setProperty("j_password", unauthPassword); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test11 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 11); - - TestUtil.logMsg("Successfully accessed allRoles.jsp as user javajoe"); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test11 failed: ", e); - } - } - - /* - * testName: test12 - * - * @assertion: Servlet Specification v2.3, sec 13.2 (DTD) The - * web-resource-collection element is used to identify a subset of the - * resources and HTTP methods on those resources within a web application to - * which a security constraint applies. If no HTTP methods are specified, then - * the security constraint applies to all HTTP methods. - * - * @test_Strategy: 1) Do not specify any HTTP methods in the security - * constraints of Sample.jsp - * - * 2) Access Sample.jsp using HTTP methods GET, HEAD, POST, DELETE and PUT. - * - * 3) If Sample.jsp is accessible with all of the above HTTP methods then - * declare test successfull otherwise report test failure - * - * Note: test12 is ONLY for JSP Area - * - */ - public void test12() throws Exception { - try { - // Access Sample.jsp using HTTP method POST - TestUtil.logMsg("\nAccessing pageSample Using HTTP method POST"); - requestAndGetLoginPage(pageSample, 12); - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test12 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 12); - - TestUtil.logMsg("response.content :" + response.content); - TestUtil.logMsg("Successfully accessed " + pageSample + " with \"POST\""); - - // Change the request to pageSample - request = pageSample; - - // Access pageSample using HTTP method GET - TestUtil.logMsg("\nAccessing pageSample Using HTTP method GET"); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test12 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 12); - - TestUtil.logMsg("response.content :" + response.content); - TestUtil.logMsg("Successfully accessed " + pageSample + " with \"GET\""); - - // Access pageSample using HTTP method HEAD - TestUtil.logMsg("\nAccessing pageSample Using HTTP method HEAD"); - response = WebUtil.sendRequest("HEAD", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test12 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 12); - - TestUtil.logMsg("response.content :" + response.content); - - TestUtil.logMsg("Successfully accessed " + pageSample + " with \"HEAD\""); - - // Read the contents of Sample.jsp and - // upload it using HTTP method PUT - FileInputStream fstream = new FileInputStream( - tshome + "/src/web/jsp/sec/secform/Sample.jsp"); - int fileContentLength = fstream.available(); - byte[] byteArray = new byte[1024]; - int bytesRead = fstream.read(byteArray, 0, fileContentLength); - - // Now use HTTP method DELETE and later use http method PUT - - // Delete pageSample using HTTP method DELETE - TestUtil - .logMsg("\nDELETE " + pageSample + " Using HTTP method DELETE ...."); - response = WebUtil.sendRequest("DELETE", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - addNewCookies(cookies, response.cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test12 failed."); - } - TestUtil.logMsg("response.content :" + response.content); - TestUtil - .logMsg("Successfully accessed " + pageSample + " with \"DELETE\""); - - // put pageSample using HTTP method PUT - TestUtil.logMsg("\nPUT " + pageSample + " Using HTTP method PUT ...."); - - response = uploadUsingHttpMethodPUT("PUT", - InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), - byteArray, cookies, username, password); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test12 failed."); - } - TestUtil.logMsg("response.content :" + response.content); - TestUtil.logMsg("response.statusToken :" + response.statusToken); - TestUtil.logMsg("uploaded " + pageSample + "using HTTP method PUT"); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test12 failed: ", e); - } - } - - /* - * testName: test13 - * - * @assertion: Servlet Specification v2.3, sec 12.2 The security model does - * not apply when a servlet uses the RequestDispatcher to invoke a static - * resource or servlet using a forward or an include. - * - * - * @test_Strategy: - * - * 1) Configure two servlets (IncludedServlet and ForwardedServlet) to be - * accessible only by administrator. - * - * 2) Configure ControlServlet to be accessible by everyone (i.e no security - * constraints for ControlServlet) - * - * 3) Now as a unauthenticated user access ForwardedServlet and - * IncludedServlet from ControlServlet - * - * ControlServlet ===>ForwardedServlet===>IncludedServlet - * - * i.e 3.1) From a ControlServlet access ForwardedServlet through dispatcher's - * forward method. - * - * 3.2) From the ForwardedServlet access/include IncludedServlet through - * Request dispatcher's include method - * - * 4) If the servlets(ForwardedServlet and IncludedServlet) are accessible - * report the test success otherwise report test failure - * - * Note: test13 is ONLY for SERVLET Area - * - */ - public void test13() throws Exception { - try { - - request = pageServletBase + "/ControlServlet"; - - // Access ControlServlet" - TestUtil.logMsg("\nAccessing ControlServlet"); - TestUtil.logMsg("Sending request " + request); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - TestUtil.logMsg("response.content 1:" + response.content); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test13 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 13); - TestUtil.logMsg("response.content 2:" + response.content); - TestUtil.logMsg("Successfully accessed ControlServlet," - + " ForwardedServlet and IncludedServlet"); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test13 failed: ", e); - } - } - - /* - * testName: test14 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.3, Sec 12.6 - * - * Therefore, a servlet container is required to track authentication - * information at the container level (rather than at the web application - * level). This allows users authenticated for one web application to access - * other resources managed by the container permitted to the same security - * identity. - * - * @test_Strategy: 1. Configure pageSec(jspSec.jsp or ServletSecTest) and - * pageSample(Sample.jsp or SampleTest ) to be accessible only by - * Administrator 2. Send request to access jspSec.jsp 3. Receive login page 4. - * Send form response with username and password 5. Receive jspSec.jsp (ensure - * principal is correct, and ensure getRemoteUser() returns the username, and - * ensure isUserInRole() is working properly) 6. Try accessing - * pageSample(Sample.jsp or SampleTest) which is also configured to be - * accessible with the same security identity, since we are already - * authenticated we should be able to access pageSample without going through - * login page again. 7. Ensure principal is still correct and getRemoteUser() - * still returns the correct username. Also ensure isUserInRole() is still - * working properly. - */ - public void test14() throws Exception { - try { - TestUtil.logMsg("\nAccessing pageSec: " + pageSec); - requestAndGetLoginPage(pageSec, 14); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test14 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 14); - - // Check to make sure we are authenticated by checking the page - // content. The jsp should output "The user principal is: j2ee" - String searchString = searchFor + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test14 failed."); - } - TestUtil.logMsg("User Principal correct."); - - // Check to make sure getRemoteUser returns the user name. - searchString = searchForGetRemoteUser + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("getRemoteUser() did not return " + username + ":"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test1 failed."); - } - TestUtil.logMsg("getRemoteUser() correct."); - - // Check to make sure isUserInRole is working properly: - Hashtable roleCheck = new Hashtable(); - roleCheck.put("ADM", Boolean.TRUE); - roleCheck.put("MGR", Boolean.FALSE); - roleCheck.put("VP", Boolean.FALSE); - roleCheck.put("EMP", Boolean.TRUE); - // roleCheck.put( "Administrator", new Boolean( false ) ); - if (!checkRoles(response.content, roleCheck)) { - TestUtil.logErr("isUserInRole() does not work correctly."); - TestUtil.logErr("Page Received:"); - TestUtil.logErr(response.content); - throw new Exception("test14 failed."); - } - TestUtil.logMsg("isUserInRole() correct."); - - // Now that we are authenticated, try accessing pageSample - // without going through the login page again. - request = pageSample; - TestUtil.logMsg("\nAccessing pageSample :" + request); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + pageSec); - throw new Exception("test14 failed."); - } - - // Check to make sure we are still authenticated. - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("User Principal incorrect. Page received:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test14 failed."); - } - TestUtil.logMsg("User Principal still correct."); - - // Check to make sure getRemoteUser still returns the user name. - searchString = searchForGetRemoteUser + username; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr("getRemoteUser() did not return " + username - + " after lazy authentication:"); - TestUtil.logErr(response.content); - TestUtil.logErr("(Should say: \"" + searchString + "\")"); - throw new Exception("test14 failed."); - } - TestUtil.logMsg("getRemoteUser() still correct."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test14 failed: ", e); - } - } - - /* - * testName: test15 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.3, Sec 12.6 - * - * This is similar to test14 except this is validating that we can not bypass - * security constraints when sso is on by simply adding "/j_security_check" to - * the request url. By adding "j_security_check" to the end of a request but - * not specifying authN creds, we should NOT be redirected to the - * requested/restricted page as we have not yet authenticated (even though we - * tried to trick/confuse the system by appending 'j_security_check' onto our - * request.) - * - * @test_Strategy: 1. attempt to access a protected resource by: Sending a - * request to access url: "/j_security_check" 2. We should not be - * authenticated yet so should get a response back from server with either an - * error or login form (we must verify that we are not authenticated and that - * we did NOT get the requested(and restricted) form back from server. - * - */ - public void test15() throws Exception { - - String modifiedPageSec = pageSec + pageSecurityCheck; - try { - // 1. attempt to access a protected resource - TestUtil.logTrace("Sending request \"" + modifiedPageSec + "\""); - try { - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(modifiedPageSec), null, null); - } catch (Exception ex) { - // if here, problem as we should have been redirected - TestUtil.logErr( - "ERROR - got exception when trying to access restricted page w/out AuthN first."); - ex.printStackTrace(); - throw new Exception("test15 failed."); - } - - if (response != null) { - // if we got directed to login page that is okay too - TestUtil.logTrace("response.content=" + response.content); - - // 2. verify that the requested page was NOT accessed/found - String searchString = "getAuthType()"; // this string appears on the - // pageSec page - if (response.content.indexOf(searchString) != -1) { - // Error - it looks like we were able to access the requested page! - String err = "Error - we were not authenticated but were able to access the "; - err += "following page: " + modifiedPageSec - + " with a return status = " + response.statusToken; - TestUtil.logErr(err); - TestUtil.logErr("response.content = " + response.content); - throw new Exception("test15 failed."); - } else { - TestUtil.logTrace( - "Good - we were not able to access restricted page without authenticating."); - } - } else { - TestUtil.logTrace("response=null"); - } - - TestUtil.logMsg("test15 passed."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test15 failed: ", e); - } - } - - /* - * testName: test16 - * - * @assertion: Test ability to login via the HttpServletRequst.login() method. - * as specified in the Java Servlet Specification v3.1, Sec 13.3 - * - * If user has not been authenticated and user attempts to access an - * unprotected web resource, the user should be able to access it. Since the - * user was not authenticated, calls to getUserPrincipal() should not return - * the name of user "j2ee" since. Once in the servlet, we should be able to - * invoke the HttpServletRequest.login() call to authenticate user "j2ee" and - * then calls to getUserPrincipal() should return user "j2ee" - * - * - * @test_Strategy: 1. Send request to access ServletProgrammaticLogin 2. the - * servlet performs tasks and sends response data back 3. we parse the data to - * see if we got desired output - */ - public void test16() throws Exception { - try { - - // Send request to ProgrammaticLogin servlet and include username - // and password for use within servlet - request = pageProgLogin; - - // set some params that will be needed from within the pageProgLogin - // servlet - Properties postData = new Properties(); - TestUtil.logTrace("setting request parameter my_username = " + username); - TestUtil.logTrace("setting request parameter my_password = " + password); - postData.setProperty("the_username", username); - postData.setProperty("the_password", password); - - TestUtil.logMsg("Sending request " + request); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - TestUtil.logTrace("response.content = \n" + response.content); - - if (!response.statusToken.equals("200")) { - TestUtil.logErr( - "ERROR: not able to do Programmatic Login in: " + pageProgLogin); - throw new Exception("test16 failed."); - } - - // Check that we did not receive an error - if (response.isError()) { - TestUtil.logErr("Error retrieving " + request); - throw new Exception("test16 failed."); - } - - TestUtil.logTrace(response.content); // debug aid - - // verify there were no errors detected fom within our servlet - String searchString = "ERROR - HttpServletRequest.login"; - if (response.content.indexOf(searchString) != -1) { - TestUtil.logErr(response.content); - throw new Exception("test16 failed."); - } - - // verify that we got success - searchString = "HttpServletRequest.login() passed"; - if (response.content.indexOf(searchString) == -1) { - TestUtil.logErr(response.content); - throw new Exception("test16 failed."); - } - - TestUtil.logMsg("test16 passed."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test16 failed: ", e); - } - } - - /* - * testName: test17 - * - * @assertion: Test FORM-based authentication, specified in the Java Servlet - * Specification v2.2, Sec 11.5.3. - * - * If user has been authenticated and user attempts to access a protected web - * resource, and user enters correct username and password of a user that is - * authorized to access the resource, the resource is returned (similar to - * test1) - * - * @test_Strategy: 1. Send request to access protected page (ie. - * pageServletProgLogout) 2. Receive login page 3. Send form response with - * username(j2ee) and password 4. Receive resource 5. make sure no ERRORs - * occurrred on pageServletProgLogout and that it actually did log us out. - * - */ - public void test17() throws Exception { - try { - requestAndGetLoginPage(pageServletProgLogout, 1); - - // Send response to login form with session id cookie: - request = pageSecurityCheck; - TestUtil.logMsg( - "Sending request \"" + request + "\" with login information."); - Properties postData = new Properties(); - postData.setProperty("j_username", username); - postData.setProperty("j_password", password); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Check that the page was found (no error). - TestUtil.logTrace("response.content = " + response.content); // debug aid - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test17 failed."); - } - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 17); - TestUtil.logTrace("response.content = " + response.content); // debug aid - - // Check to make sure we are authenticated by checking the page - // content. It should contain the string below to indicate we - // properly accessed the servlet. - String searchString = "enterred ServletProgrammaticLogout.service()"; - if (response.content.indexOf(searchString) == -1) { - String str = "Error - Did not get expected content from page: " - + pageServletProgLogout; - str += " Content should have contained: " + searchString; - TestUtil.logErr(str); - throw new Exception("test17 failed."); - } - - // now make sure we didnt get any errors in our content - String errString = "ERROR - HttpServletRequest.logout()"; - if (response.content.indexOf(errString) != -1) { - // there was an error msg detected in servlet content - String str = "Error - returned in content from page: " - + pageServletProgLogout; - TestUtil.logErr(str); - throw new Exception("test17 failed."); - } - TestUtil.logMsg("test17 passed."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test17 failed: ", e); - } - } - - /* - * testName: test18 - * - * @assertion: Test ability to authenticate using - * HttpServletRequst.authenticate() as specified in the Java Servlet - * Specification v3.1, Sec 13.3 - * - * If user has not been authenticated and user attempts to access an - * unprotected web resource, the user should be able to access it. Since the - * user was not authenticated, calls to getUserPrincipal() should return null. - * Calls to authenticate() should return false. Once in the servlet, we should - * be able to invoke the HttpServletRequest.login() call to login with user - * "j2ee" and then calls to getUserPrincipal() should return user "j2ee". - * Calls to authenticate() should return true. - * - * @test_Strategy: 1. Send request to access ServletProgrammaticLogin 2. the - * servlet performs tasks and sends response data back 3. we parse the data to - * see if we got desired output - */ - public void test18() throws Exception { - try { - - // Send request to ProgrammaticLogin servlet and include username - // and password for use within servlet - request = pageProgAuthen; - - // set some params that will be needed from within the pageProgLogin - // servlet - Properties postData = new Properties(); - postData.setProperty("the_username", username); - postData.setProperty("the_password", password); - - TestUtil.logMsg("Sending request " + request); - response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), postData, cookies); - - // Call followRedirect() to make sure we receive the required page - TestUtil.logTrace("YYYYY: response.content = \n" + response.content); - - if (!response.statusToken.equals("200")) { - TestUtil.logErr( - "ERROR: not able to do Programmatic Login in: " + pageProgLogin); - throw new Exception("test18 failed."); - } - - // Check that we did not receive an error - if (response.isError()) { - TestUtil.logErr("Error retrieving " + request); - throw new Exception("test18 failed."); - } - - // verify there were no errors detected fom within our servlet - String searchString = "ERROR - HttpServletRequest.authenticate"; - if (response.content.indexOf(searchString) != -1) { - TestUtil.logErr(response.content); - throw new Exception("test18 failed."); - } - - // now verify the authenticate truely passed - if (response.content - .indexOf("HttpServletRequest.authenticate passed") == -1) { - TestUtil.logErr(response.content); - throw new Exception("test18 failed."); - } - - TestUtil.logMsg("test18 passed."); - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception("test18 failed: ", e); - } - } - - /** - * Uploads data from a byteArray to an URL. A WebUtil.Response object is - * returned with the response information. - * - * @param method - * http method "PUT" - * @param addr - * Address of web server - * @param port - * Port of web server - * @param req - * The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) - * @param postData - * is a byteArray which contains the data to be posted - * @param cookieList - * A list of cookies to send when requesting the page. null if no - * cookie list is to be sent. - * @param username - * The username for authentication, null if no authentication - * required. - * @param password - * The password for authentication, null if no authentication - * required. - * @return WebUtil.Response object containing response information - * @exception IOException - * Thrown if request could not be made - */ - public static Response uploadUsingHttpMethodPUT(String method, - InetAddress addr, int port, String req, byte[] postData, - Hashtable cookieList, String username, String password) - throws IOException { - String protocol = "HTTP/1.0"; - URL requestURL; - Socket socket = null; - PrintWriter out = null; - BufferedReader in = null; - String line; - Response response = new Response(); - - try { - requestURL = new URL("http", addr.getHostName(), port, req); - req = method + " " + req + " " + protocol; - - socket = new Socket(addr, port); - - in = new BufferedReader(new InputStreamReader(socket.getInputStream())); - out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); - out.println(req); - - if (cookieList != null) { - // Send cookies: - Enumeration keys = cookieList.keys(); - - // Does at least one cookie exist? - if (keys.hasMoreElements()) { - String cookieString = "Cookie: "; - - // Add each cookie to the string - boolean first = true; - while (keys.hasMoreElements()) { - String key = (String) keys.nextElement(); - String value = (String) cookieList.get(key); - cookieString += (first ? "" : "; ") + key + "=" + value; // + "; - // $Path=/"; - first = false; - } - - // Write cookies: - out.println(cookieString); - } - } - - // Send authentication information if necessary: - if (username != null) { - String code = WebUtil.encodeBase64(username + ":" + password); - out.println("Authorization: Basic " + code.trim()); - } - - // Send extra header information if we are posting. - if (postData != null) { - out.println("Content-type: text/data"); - } - - // Read the file contents from the byte array(postData) - // and store it in a string(fileContents) - StringBuffer content = new StringBuffer(1024); - ByteArrayInputStream bais = new ByteArrayInputStream(postData); - int c; - while ((c = bais.read()) != -1) { - content.append((char) c); - } - String fileContents = content.toString(); - - // TestUtil.logMsg("File Content: "+ fileContents); - - // If this is a post request, send post data: - if ((postData != null) && method.toUpperCase().equals("PUT")) { - String postString = WebUtil.encodeBase64(fileContents); - - // Skip a line: - out.println("Content-length: " + postString.length()); - out.println(""); - out.println(postString); - } else { - // Skip a line: - out.println(""); - } - - out.flush(); - - // Read first line and check for HTTP version and OK. - line = in.readLine(); - if (line != null) { - - StringTokenizer st = new StringTokenizer(line.trim()); - response.versionToken = st.nextToken(); - response.statusToken = st.nextToken(); - } - - // Read each line of the header until we hit a blank line - while ((line = in.readLine()) != null) { - - // Blank line means we are done with the header: - if (line.trim().equals("")) { - break; - } - - // Analyze special tags location and set cookie - if (line.toLowerCase().startsWith("location:")) { - // This is a redirect. Extract valuable infomration: - response.location = line.substring(10); - } else if (line.toLowerCase().startsWith("set-cookie:")) { - // This is a cookie. Add the cookie to the response - // object. - response.parseCookie(line); - } else if (line.toLowerCase().startsWith("www-authenticate:")) { - // Request to authenticate this page. - response.authenticationRequested = true; - } - } - - // The rest is content: - while ((line = in.readLine()) != null) { - response.content += line + "\n"; - } - - in.close(); - out.close(); - } catch (MalformedURLException e) { - throw new IOException("MalformedURLException: " + e.getMessage()); - } catch (UnknownHostException e) { - throw new IOException("UnknownHostException: " + e.getMessage()); - } catch (ConnectException e) { - throw new IOException("ConnectException: " + e.getMessage()); - } - - return response; - } - - /** - * Outputs a single line of text to the given output stream. Appends a \r\n - * automatically. By adding a System.out.println here, you can easily echo - * what is being sent to the web server. - */ - private static void send(PrintWriter out, String s) { - out.print(s + "\r\n"); - // if( debugOutputRequests ) { - // System.out.println( "REQUEST: " + s ); - // } - } - - /** - * Helper method that is used in tests 1, 2 and 3. Performs the following - * actions: - * - * 1. Send request to access passed in url 2. Receive redirect to login page, - * extract location and session id cookie 3. Send request to access new - * location, send cookie 4. Receive login page - * - * @param request - * The initial page to request - * @param testNum - * The test number for correct display of error messages. - */ - private void requestAndGetLoginPage(String request, int testNum) - throws Exception { - // Request restricted jsp page. - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test" + testNum + " failed."); - } - - // if (response.statusToken=302) - // then follow redirect to get the login page - - if (response.statusToken.equals("302")) { - // We should receive a redirection to the login page: - if (response.location == null) { - TestUtil.logErr("No redirection to login page received."); - throw new Exception("test" + testNum + " failed."); - } - - // Extract location from redirection and format new request: - request = WebUtil.getRequestFromURL(response.location); - TestUtil.logMsg("Redirect to: " + response.location); - - // Extract cookies: - cookies = response.cookies; - - TestUtil.logMsg("Before requesting redirected Page:" + "response.content=" - + response.content); - - // Request redirected page (login page): - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, request, null, cookies); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + request); - throw new Exception("test" + testNum + " failed."); - } - - } else { - // Extract cookies: - cookies = response.cookies; - } - - // Because the authentication data is posted on the registered login form, - // There is no need to compare login page here. - /* - * request = pageLogin; - * - * // Request login page TestUtil.logMsg( "Sending request \"" + request + - * "\"" ); loginPageRequestResponse = WebUtil.sendRequest( "GET", - * InetAddress.getByName( hostname ), portnum, tsurl.getRequest(request), - * null, cookies ); - * - * // Check that the page was found (no error). if( - * loginPageRequestResponse.isError() ) { TestUtil.logErr( "Could not find " - * + request ); throw new Exception( "test" + testNum + " failed." ); } - * - * //Compare the received login page with the expected login page // i.e - * Check whether response.content ==loginPageRequestResponse.content if - * (response.content.equals(loginPageRequestResponse.content)) - * TestUtil.logMsg("Received the expected login form"); else { - * TestUtil.logMsg("response.conent\n"+response.content); - * TestUtil.logMsg("loginPageRequestResponse.conent\n"+ - * loginPageRequestResponse.content); - * TestUtil.logMsg("Received incorrect login form"); throw new Exception( "test" - * + testNum + " failed." ); } - */ - - } - - /** - * Helper method that is used in test 9. Performs the following actions: - * - * 1. Send request to access a jsp using testURL (for example testURL can be - * "/*.jsp") 2. Checks the status of the http reply 3. If the page is not - * accessible throw exception 4. If the page is accessible, then compare the - * content from the testURL with the contents of exact match URL. i.e compare - * 1) TEST URL : http://hostname:port/context_root/*.jsp 2) Exact match URL: - * http://hostname:port/context_root/foo.jsp - * - * Note: Here *.jsp is mapped to foo.jsp - * - * If the contents are same then the mapping is correct, otherwise throw - * exception - * - * @param testURL - * The test URL (for example "/*.jsp") - * @param testNum - * The test number for correct display of error messages. - * @param exactMatchURL - * The exact match URL (for example "/foo.jsp") - */ - private void compareURLContents(String testURL, int testNum, - String exactMatchURL) throws Exception { - // Request a jsp page using testURL. - TestUtil.logMsg("Sending request \"" + testURL + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(testURL), null, null); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + testURL); - throw new Exception("test" + testNum + " failed."); - } - - WebUtil.Response response2 = null; - - // Request the jsp page using exactMatchURL. - TestUtil.logMsg("Sending request \"" + exactMatchURL + "\""); - response2 = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(exactMatchURL), null, null); - - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Could not find " + exactMatchURL); - throw new Exception("test" + testNum + " failed."); - } - - TestUtil - .logMsg("Comparing contents of " + testURL + " and " + exactMatchURL); - - // compare the contents of testURL and exactMatchURL - if (!response.content.equals(response2.content)) { - TestUtil.logErr( - "MISMATCH in contents of " + testURL + " and " + exactMatchURL); - TestUtil.logErr("contents of " + testURL); - TestUtil.logErr(response.content); - TestUtil.logErr("contents of " + exactMatchURL); - TestUtil.logErr(response2.content); - throw new Exception("test" + testNum + " failed."); - } else { - TestUtil.logMsg("Contents MATCH : correct URL mapping\n"); - } - - } - - /** - * Helper method to check that isUserInRole is working correctly. Searches the - * given page content for "isUserInRole( x ): !y!" for each x = key in - * Hashtable and y = corresponding value in hashtable. If all results are as - * expected, returns true, else returns false. - */ - private boolean checkRoles(String content, Hashtable roleCheck) { - Enumeration keys = roleCheck.keys(); - boolean pass = true; - - while (pass && keys.hasMoreElements()) { - String key = (String) keys.nextElement(); - boolean expected = ((Boolean) roleCheck.get(key)).booleanValue(); - - String search = "isUserInRole(\"" + key + "\"): !" + expected + "!"; - String logMsg = "Searching for \"" + search + "\": "; - - if (content.indexOf(search) == -1) { - pass = false; - logMsg += "NOT FOUND!"; - } else { - logMsg += "found."; - } - - TestUtil.logMsg(logMsg); - } - - return pass; - } - - public void cleanup() throws Exception { - logMsg("cleanup"); - } - - /** - * Helper method that is used in tests 1, 2, 3, 5 and 6. Performs the - * following actions: - * - * 1. Checks whether the response.statusToken==302 or 301 - * if(response.statusToken==302) || (response.statusToken==301) send request - * to redirected URL 2. Returns Response object - * - * @param response - * The initial page response - * @param testNum - * The test number for correct display of error messages. - */ - public WebUtil.Response followRedirect(WebUtil.Response response, int testNum) - throws Exception { - - // if (response.statusToken=302) - // send request to redirected URL - if ((response.statusToken.equals("301")) - || (response.statusToken.equals("302"))) { - // We should receive a redirection page: - if (response.location == null) { - TestUtil.logErr("redirection URL : null"); - throw new Exception("test" + testNum + " failed."); - } - - // Extract location from redirection and format new request: - request = WebUtil.getRequestFromURL(response.location); - TestUtil.logMsg("Redirect to: " + response.location); - - // update cookies if the webserver choose to send cookies, - // immediately after a successful http post request. - addNewCookies(cookies, response.cookies); - - // Request redirected page - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, request, null, cookies); - - // After a succesful http post request, - // Sun's Reference Implementation returns a redirected URL - // (Note: No cookies are sent back to the client at this point) - // Only when the client accesses the redirected URL, - // Sun RI sends a cookie (single sign on cookie) back to - // the client. So update cookies hashtable with new cookies - addNewCookies(cookies, response.cookies); - - // Do not check for error code for testNum 7 and testNum 8 - // those test access an unauthorized resource and expect - // error code. - if (testNum != 7 && testNum != 8) { - // Check that the page was found (no error). - if (response.isError()) { - TestUtil.logErr("Status Token " + response.statusToken); - TestUtil.logErr("Could not find " + request); - throw new Exception("test" + testNum + " failed."); - } - } - } else { - // After a successful post request, if a webserver - // returns the webresource without redirecting to new URL - // then update any new cookies received during this process. - addNewCookies(cookies, response.cookies); - - } - - return response; - } - - /** - * Helper method that is used to update cookies - * - * This helper method retrieves cookies from "newCookies" hashtable and - * updates it to "oldCookies" hashtable - * - * @param oldCookies - * Hashtable containing original cookies - * @param newCookies - * Hashtable containing new cookies error messages. - */ - public void addNewCookies(Hashtable oldCookies, Hashtable newCookies) { - // Add new cookie/cookies to the existing cookies Hashtable - for (Enumeration e = newCookies.keys(); e.hasMoreElements();) { - // get cookie name - String name = (String) e.nextElement(); - - // get value for this name - String value = (String) newCookies.get(name); - - if (oldCookies == null) { - oldCookies = new Hashtable(); - } - - // Add this name value pair (cookie) to old cookies - oldCookies.put(name.trim(), value.trim()); - - } - } - - /** - * Get the HttpResponse, and check the status code to see if matches one of - * the expected status codes. - * - * @param request- - * @String request URL - * @param expectedCodes - * - @List<@String> status codes we will test for - * @param testName - * - The name calling test - */ - private void testStatusCodes(String request, List expectedCodes, - String testName) throws Exception { - - try { - TestUtil.logMsg("Sending request \"" + request + "\""); - response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), - portnum, tsurl.getRequest(request), null, null); - - // Call followRedirect() to make sure we receive the required page - response = followRedirect(response, 7); - - // Check status code(s). - if (expectedCodes.contains(response.statusToken)) { - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logMsg("Received expected error code"); - - } else { - TestUtil.logErr("Did not receive expected error code" + request); - TestUtil.logMsg("Status Token " + response.statusToken); - TestUtil.logErr("Page content: "); - TestUtil.logErr(response.content); - throw new Exception(testName + " failed."); - } - - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - throw new Exception(testName + " failed: ", e); - } - - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java deleted file mode 100644 index b2968dfc4f..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -public class AttributeEntry { - - public static final String NO_ATTRIBUTE_NAME = "no attribute name"; - - private String name = NO_ATTRIBUTE_NAME; - - private String type = "java.lang.String"; - - private String rtexpr = "false"; - - private String required = "false"; - - public AttributeEntry() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - if (name != null) { - this.name = name; - } - } - - public String getType() { - return type; - } - - public void setType(String type) { - if (type != null) { - this.type = type; - } - } - - public String getRtexpr() { - return rtexpr; - } - - public void setRtexpr(String rtexpr) { - if (rtexpr != null) { - this.rtexpr = rtexpr; - } - } - - public String getRequired() { - return required; - } - - public void setRequired(String required) { - if (required != null) { - this.required = required; - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java deleted file mode 100644 index 7cca268d36..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -public class TagEntry { - - private static final AttributeEntry[] NO_DEFINED_ATTRIBUTES = {}; - - private static final VariableEntry[] NO_DEFINED_VARIABLES = {}; - - private static final String DEFAULT_BODY = "JSP"; - - private Map attributes; - - private Map variables; - - private String name; - - private String body = DEFAULT_BODY; - - public TagEntry() { - attributes = new HashMap(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public String getBody() { - return body; - } - - public void setBody(String body) { - if (body != null) { - this.body = body; - } - } - - public void addVariable(VariableEntry entry) { - variables.put(entry.getNameGiven(), entry); - } - - public VariableEntry getVariable(String name) { - return (VariableEntry) attributes.get(name); - } - - public VariableEntry[] getVariables() { - if (variables.isEmpty()) { - return NO_DEFINED_VARIABLES; - } else { - List list = new ArrayList(); - for (Iterator i = variables.values().iterator(); i.hasNext();) { - list.add(i.next()); - } - return (VariableEntry[]) list.toArray(new VariableEntry[list.size()]); - } - } - - public void addAttribute(AttributeEntry entry) { - attributes.put(entry.getName(), entry); - } - - public AttributeEntry getAttribute(String name) { - return (AttributeEntry) attributes.get(name); - } - - public AttributeEntry[] getAttributes() { - if (attributes.isEmpty()) { - return NO_DEFINED_ATTRIBUTES; - } else { - List list = new ArrayList(); - for (Iterator i = attributes.values().iterator(); i.hasNext();) { - list.add(i.next()); - } - return (AttributeEntry[]) list.toArray(new AttributeEntry[list.size()]); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java deleted file mode 100644 index e3c864e392..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import com.sun.ts.tests.common.taglibsig.validation.ValidationConfiguration; -import com.sun.ts.tests.common.taglibsig.validation.Validator; -import com.sun.ts.tests.common.taglibsig.validation.ValidatorFactory; - -/** - * Provides the ability to compare two TagLibraryDescriptor objects and return - * any differences found. - */ -public class TagLibraryComparitor { - - // The current configuration for this TagLibraryComparitory. - ValidationConfiguration configuration; - - /** - *

- * Constructs a new TagLibraryComparitor that will use the provided - * {@link ValidationConfiguration} to perform its comparison. - *

- * - * @param configuration - * - ValidationConfiguration - */ - public TagLibraryComparitor(ValidationConfiguration configuration) { - this.configuration = configuration; - } - - /** - *

- * Sets a new {@link ValidationConfiguration} to use when performing - * comparisons. - *

- * - * @param configuration - * - ValidationConfiguration - */ - public void setConfiguration(ValidationConfiguration configuration) { - this.configuration = configuration; - } - - /** - *

- * Performs a comparison of two {@link TagLibraryDescriptor} objects using the - * configured {@link ValidationConfiguration}. - * - * @param control - * - the control TagLibraryDescriptor - * @param underTest - * - the TagLibraryDescriptor that we are validating for correctness - * @return an empty array if no differences are found - * @throws IllegalStateException - * if the provided ValidationConfiguration is null, or has not be - * configured. - */ - public String[] compare(TagLibraryDescriptor control, - TagLibraryDescriptor underTest) { - List messages = new ArrayList(); - - if (configuration != null && configuration.hasBeenConfigured()) { - for (Iterator i = configuration.getValidatorNames(); i.hasNext();) { - Validator validator = ValidatorFactory - .getValidator(configuration.getValidatorClass((String) i.next())); - if (validator != null) { - messages.addAll(validator.validate(control, underTest)); - } - } - } else { - throw new IllegalStateException("No Configuration Available..."); - } - return (String[]) messages.toArray(new String[messages.size()]); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java deleted file mode 100644 index f883dc88a5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -import java.io.CharArrayReader; -import java.io.IOException; -import java.io.InputStream; -import java.net.JarURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.List; -import java.util.jar.JarEntry; -import java.util.jar.JarFile; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.xml.sax.EntityResolver; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; - -import com.sun.ts.lib.util.TestUtil; - -/** - * Represents a TLD from a JAR file allowing access to the tag and function and - * validator entries as well as TLD level metatdata such as support container - * version and version of the taglibrary itself. - */ -public class TagLibraryDescriptor { - - private static final String ONE_DOT_TWO_CONTAINER = "1.2"; - - private static final String TWO_DOT_ZERO_CONTAINER = "2.0"; - - private static final String DEFAULT_TAGLIB_VERSION = "1.0"; - - private static final HashMap TAGLIB_CACHE = new HashMap(); - - private static final TagEntry[] EMPTY_TAG_ENTRIES = {}; - - private static final FunctionEntry[] EMPTY_FUNCTION_ENTRIES = {}; - - private static final ValidatorEntry[] EMPTY_VALIDATOR_ENTRIES = {}; - - private String _containerVersion = ONE_DOT_TWO_CONTAINER; - - private String _taglibVersion = DEFAULT_TAGLIB_VERSION; - - private String _uri; - - private List _tagEntries; - - private List _functionEntries; - - private List _validatorEntries; - - // Private - private TagLibraryDescriptor() { - } - - /** - * Returns a TagLibraryDescriptor instance based on the URI the tag library is - * known by (i.e. the element of the TLD). If the TagLibraryDescriptor - * is not found in the cache, the this method will use the URL to the jar file - * and scan the JAR file for TLDs. Any TLD's found will be processed and added - * cache. If, after scanning the JAR file, no TLD's matching the specified - * ttaglib uri can be found, this method will return null. - * - * @param jarUrl - * - The file URL of the JAR file to scan for TLDs if the cache - * doesn't contain the requested TagLibraryDescriptor instance - * @param taglibUri - * - The uri of the tag library of interest - * @return a TagLibraryDescriptor for the provided uri, or null if no tag - * library can be found - */ - public static TagLibraryDescriptor getInstance(String jarUrl, - String taglibUri) { - TagLibraryDescriptor tld = (TagLibraryDescriptor) TAGLIB_CACHE - .get(taglibUri); - if (tld == null) { - URL url = null; - jarUrl = "jar:" + jarUrl + "!/"; - try { - url = new URL(jarUrl); - } catch (MalformedURLException e) { - TestUtil.logErr("Malformed URL: " + jarUrl, e); - } - - // Begin constructing the cache... - TestUtil.logTrace("<<<<<>>>>>"); - try { - TldBuilder builder = new TldBuilder(new TldLocator(url)); - builder.build(); - } catch (BuildException be) { - TestUtil.logErr(be.getMessage(), be); - } - - tld = (TagLibraryDescriptor) TAGLIB_CACHE.get(taglibUri); - } - return tld; - } - - /** - * Returns the tags of this tag library. - * - * @return the tags of this tag library - */ - public TagEntry[] getTagEntries() { - if (_tagEntries == null || _tagEntries.isEmpty()) { - return EMPTY_TAG_ENTRIES; - } else { - return (TagEntry[]) _tagEntries.toArray(new TagEntry[_tagEntries.size()]); - } - } - - /** - * Returns the functions of this tag library. - * - * @return the functions of this tag library - */ - public FunctionEntry[] getFunctionEntries() { - if (_functionEntries == null || _functionEntries.isEmpty()) { - return EMPTY_FUNCTION_ENTRIES; - } else { - return (FunctionEntry[]) _functionEntries - .toArray(new FunctionEntry[_functionEntries.size()]); - } - } - - /** - * The validators of this tag library. - * - * @return the validators of this tag library - */ - public ValidatorEntry[] getValidatorEntries() { - if (_validatorEntries == null || _validatorEntries.isEmpty()) { - return EMPTY_VALIDATOR_ENTRIES; - } else { - return (ValidatorEntry[]) _validatorEntries - .toArray(new ValidatorEntry[_validatorEntries.size()]); - } - } - - /** - * Returns the minimum container version required to use this tag libary. - * - * @return the minimum container version required to use this tag library - */ - public String getRequiredContainerVersion() { - return this._containerVersion; - } - - /** - * Returns the version of this tag library. - * - * @return the version of this tag library - */ - public String getTaglibraryVersion() { - return this._taglibVersion; - } - - /** - * Returns the URI that identifies this tag library - * - * @return the URI that identifies this tag library - */ - public String getURI() { - return this._uri; - } - - /** - * Adds a TagEntry to the internal list of tags - * - * @param entry - * - a TagEntry - */ - private void addTagEntry(TagEntry entry) { - if (_tagEntries == null) - _tagEntries = new ArrayList(); - _tagEntries.add(entry); - } - - /** - * Adds a FunctionEntry to the internal list of functions - * - * @param entry - * - a FunctionEntry - */ - private void addFunctionEntry(FunctionEntry entry) { - if (_functionEntries == null) - _functionEntries = new ArrayList(); - _functionEntries.add(entry); - } - - /** - * Adds a ValidatorEntry to the internal list of validators. - * - * @param entry - * - a ValidatorEntry - */ - private void addValidatorEntry(ValidatorEntry entry) { - if (_validatorEntries == null) - _validatorEntries = new ArrayList(); - _validatorEntries.add(entry); - } - - /** - * Sets the required container version for this tag library. - * - * @param version - * - required container version - */ - private void setRequiredContainerVersion(String version) { - _containerVersion = version; - } - - /** - * Sets the version of this tag library - * - * @param version - * - tag library version - */ - private void setTaglibraryVersion(String version) { - _taglibVersion = version; - } - - /** - * Sets the URI of this tag library - * - * @param uri - * - the URI of this tag library - */ - private void setURI(String uri) { - _uri = uri; - } - - // ======================================== Inner Classes - // ===================== - - /** - * Utility class to encapsulate all XML related functionality in creating - * TagLibraryDescriptor objects. - */ - private static class TldBuilder { - - /** - * Elements that are of interest in a Tag Library Descriptor. - */ - private static final String TLIB_VERSION_ELEMENT = "tlib-version"; - - private static final String JSP_VERSION_ELEMENT = "jsp-version"; - - private static final String VALIDATOR_ELEMENT = "validator"; - - private static final String FUNCTION_ELEMENT = "function"; - - private static final String TAG_ELEMENT = "tag"; - - private static final String NAME_ELEMENT = "name"; - - private static final String ATTRIBUTE_ELEMENT = "attribute"; - - private static final String TYPE_ELEMENT = "type"; - - private static final String VARIABLE_ELEMENT = "variable"; - - private static final String BODY_ELEMENT = "body-content"; - - private static final String URI_ELEMENT = "uri"; - - private static final String RTEXPR_ELEMENT = "rtexprvalue"; - - private static final String REQUIRED_ELEMENT = "required"; - - private static final String NAME_GIVEN_ELEMENT = "name-given"; - - private static final String SCOPE_ELEMENT = "scope"; - - private static final String DECLARE_ELEMENT = "declare"; - - private static final String VARIABLE_CLASS_ELEMENT = "variable-class"; - - private static final String FUNCTION_SIGNATURE_ELEMENT = "function-signature"; - - /** - * The TldLocator used to obtain input streams to the TLD's. - */ - TldLocator _locator; - - /** - * Creates a new TldBuilder instance. - * - * @param locator - * - the TldLocator to get InputStreams from - */ - public TldBuilder(TldLocator locator) { - _locator = locator; - } - - /** - * Builds TagLibraryDescriptor objects based off all TLD's that contain URI - * elements. - * - * @throws BuildException - * if an error occurs during processing. - */ - public void build() throws BuildException { - try { - processTlds(_locator.getTldsAsStreams()); - } catch (Throwable t) { - throw new BuildException( - "Unexpected Exception building TLDs: " + t.toString()); - } - } - - /** - * Utility method to setup and return a DocumentBuilder for XML parsing. - * - * @return - DocumentBuilder instance - */ - private DocumentBuilder getDocumentBuilder() { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - factory.setExpandEntityReferences(false); - factory.setNamespaceAware(false); - factory.setValidating(false); - DocumentBuilder builder = null; - try { - builder = factory.newDocumentBuilder(); - } catch (ParserConfigurationException e) { - TestUtil.logErr(e.getMessage(), e); - } - return builder; - } - - /** - * Parses the provided Document object (created from a TLD), and constructs - * logical TagLibraryDescriptor instances from the information contained - * within the Document. - * - * @param doc - * - Document object representing a TLD - */ - private void processDocument(Document doc) { - TagLibraryDescriptor tld = new TagLibraryDescriptor(); - Element taglib = doc.getDocumentElement(); - - processTopLevelElements(taglib, tld); - - processTagEntries(taglib.getElementsByTagName(TAG_ELEMENT), tld); - processFunctionEntries(taglib.getElementsByTagName(FUNCTION_ELEMENT), - tld); - } - - private void processTopLevelElements(Element taglib, - TagLibraryDescriptor des) { - - des.setTaglibraryVersion(getNodeText(taglib, TLIB_VERSION_ELEMENT)); - des.setRequiredContainerVersion(getNodeText(taglib, JSP_VERSION_ELEMENT)); - String uri = getNodeText(taglib, URI_ELEMENT); - des.setURI(uri); - addCacheEntry(uri, des); - } - - private void processFunctionEntries(NodeList functionNodes, - TagLibraryDescriptor des) { - for (int i = 0, size = functionNodes.getLength(); i < size; i++) { - Element functionElement = (Element) functionNodes.item(i); - FunctionEntry funcEntry = new FunctionEntry(); - funcEntry.setName(getNodeText(functionElement, NAME_ELEMENT)); - funcEntry.setFunctionSignature( - getNodeText(functionElement, FUNCTION_SIGNATURE_ELEMENT)); - } - } - - private void processTagEntries(NodeList tagNodes, - TagLibraryDescriptor des) { - for (int i = 0, size = tagNodes.getLength(); i < size; i++) { - Element tagElement = (Element) tagNodes.item(i); - TagEntry tagEntry = new TagEntry(); - tagEntry.setName(getNodeText(tagElement, NAME_ELEMENT)); - tagEntry.setBody(getNodeText(tagElement, BODY_ELEMENT)); - - processTagAttributes(tagElement.getElementsByTagName(ATTRIBUTE_ELEMENT), - tagEntry); - - processTagVariables(tagElement.getElementsByTagName(VARIABLE_ELEMENT), - tagEntry); - - des.addTagEntry(tagEntry); - } - - } - - private void processTagAttributes(NodeList attrNodes, TagEntry tag) { - for (int i = 0, size = attrNodes.getLength(); i < size; i++) { - Element attrElement = (Element) attrNodes.item(i); - AttributeEntry attrEntry = new AttributeEntry(); - attrEntry.setName(getNodeText(attrElement, NAME_ELEMENT)); - attrEntry.setType(getNodeText(attrElement, TYPE_ELEMENT)); - attrEntry.setRtexpr(getNodeText(attrElement, RTEXPR_ELEMENT)); - attrEntry.setRequired(getNodeText(attrElement, REQUIRED_ELEMENT)); - tag.addAttribute(attrEntry); - } - } - - private void processTagVariables(NodeList varNodes, TagEntry tag) { - for (int i = 0, size = varNodes.getLength(); i < size; i++) { - Element varElement = (Element) varNodes.item(i); - VariableEntry varEntry = new VariableEntry(); - varEntry.setNameGiven(getNodeText(varElement, NAME_GIVEN_ELEMENT)); - varEntry - .setVariableClass(getNodeText(varElement, VARIABLE_CLASS_ELEMENT)); - varEntry.setScope(getNodeText(varElement, SCOPE_ELEMENT)); - varEntry.setDeclare(getNodeText(varElement, DECLARE_ELEMENT)); - tag.addVariable(varEntry); - } - } - - private String getNodeText(Element parent, String nodeName) { - String nodeText = null; - NodeList list = parent.getElementsByTagName(nodeName); - - for (int i = 0, size = list.getLength(); i < size; i++) { - Node node = list.item(0).getFirstChild(); - if (node.getNodeType() == Node.TEXT_NODE) { - nodeText = node.getNodeValue(); - break; - } - } - - return nodeText; - } - - private void addCacheEntry(String key, Object value) { - TAGLIB_CACHE.put(key, value); - } - - /** - * Sequentially processes the array of InputStreams, where each input stream - * represents a TLD. - * - * @param inStreams - * - array of input streams representing one or more TLDs - * @throws SAXException - * - if an unexpected parsing error occurs - * @throws IOException - * - if an unexpected IO error occurs - */ - private void processTlds(InputStream[] inStreams) - throws SAXException, IOException { - DocumentBuilder builder = getDocumentBuilder(); - builder.setEntityResolver(new EntityResolver() { - public InputSource resolveEntity(String publicId, String systemId) - throws SAXException, IOException { - return new InputSource(new CharArrayReader(new char[0])); - } - }); - - for (int i = 0; i < inStreams.length; i++) { - Document doc = builder.parse(inStreams[i]); - processDocument(doc); - } - } - - } - - /** - * Processes the JAR file as identified by the provided URL. Create new - * TagLibraryDescriptor instances based on the any TLD's found. - */ - private static class TldLocator { - - /** - * The META-INF directory of the target JAR URL. - */ - private static final String META_INF = "META-INF/"; - - /** - * The file extension of Tag Library Descriptor files. - */ - private static final String TLD_EXTENSION = ".tld"; - - /** - * The URL of the JAR file. - */ - private URL _url; - - /** - * Creates a new TldLocator instance. - * - * @param url - * - the JAR url to use in scanning for TLDs - */ - public TldLocator(URL url) { - _url = url; - } - - /** - * Scans the JAR file idetified by the provided URL. For each TLD found an - * InputStream will be created for processing. - * - * @return - array of InputStreams representing TLDs found in the JAR - * @throws IOException - * - if an unexpected I/O error occurs - */ - public InputStream[] getTldsAsStreams() throws IOException { - JarURLConnection jarCon = (JarURLConnection) _url.openConnection(); - JarFile jar = jarCon.getJarFile(); - List inputStreams = new ArrayList(); - for (Enumeration e = jar.entries(); e.hasMoreElements();) { - JarEntry entry = (JarEntry) e.nextElement(); - String name = entry.getName(); - if (!name.startsWith(META_INF) || !name.endsWith(TLD_EXTENSION)) { - continue; - } - inputStreams.add(jar.getInputStream(entry)); - } - return (InputStream[]) inputStreams - .toArray(new InputStream[inputStreams.size()]); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java deleted file mode 100644 index 1f469a26e4..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -import com.sun.ts.tests.common.taglibsig.validation.ValidationConfiguration; - -public class Test { - - public Test() { - } - - public static void main(String[] args) { - TagLibraryDescriptor tld = TagLibraryDescriptor.getInstance( - "file:///files/projects/jakarta-taglibs/dist/standard/lib/standard.jar", - "http://java.sun.com/jstl/core_rt"); - - System.out.println(); - if (tld != null) { - System.out.println("URI: " + tld.getURI()); - System.out.println("TAGLIB VERSION: " + tld.getTaglibraryVersion()); - System.out - .println("CONTAINER VERSION: " + tld.getRequiredContainerVersion()); - TagEntry[] tagEntries = tld.getTagEntries(); - for (int i = 0; i < tagEntries.length; i++) { - System.out.println("TAG NAME: " + tagEntries[i].getName()); - System.out.println("TAG BODY: " + tagEntries[i].getBody()); - AttributeEntry[] attrs = tagEntries[i].getAttributes(); - for (int j = 0; j < attrs.length; j++) { - System.out.println("ATTRIBUTE NAME: " + attrs[j].getName()); - System.out.println("ATTRIBUTE TYPE: " + attrs[j].getType()); - System.out.println("ATTRIBUTE REQ: " + attrs[j].getRequired()); - System.out.println("ATTRIBUTE RTEXPR: " + attrs[j].getRtexpr()); - } - } - } else { - System.out.println("OOOPPS"); - } - - TagLibraryDescriptor tld2 = TagLibraryDescriptor.getInstance( - "file:///files/nightly/jstl/lib/standard.jar", - "http://java.sun.com/jstl/fmt"); - - System.out.println(); - if (tld2 != null) { - System.out.println("URI: " + tld2.getURI()); - System.out.println("TAGLIB VERSION: " + tld2.getTaglibraryVersion()); - System.out - .println("CONTAINER VERSION: " + tld2.getRequiredContainerVersion()); - TagEntry[] tagEntries = tld2.getTagEntries(); - for (int i = 0; i < tagEntries.length; i++) { - System.out.println("TAG NAME: " + tagEntries[i].getName()); - System.out.println("TAG BODY: " + tagEntries[i].getBody()); - AttributeEntry[] attrs = tagEntries[i].getAttributes(); - for (int j = 0; j < attrs.length; j++) { - System.out.println("ATTRIBUTE NAME: " + attrs[j].getName()); - System.out.println("ATTRIBUTE TYPE: " + attrs[j].getType()); - System.out.println("ATTRIBUTE REQ: " + attrs[j].getRequired()); - System.out.println("ATTRIBUTE RTEXPR: " + attrs[j].getRtexpr()); - } - } - } else { - System.out.println("OOOPPS"); - } - - ValidationConfiguration configuration = new ValidationConfiguration(); - configuration.addValidator(ValidationConfiguration.URI_VALIDATOR); - - TagLibraryComparitor comparitor = new TagLibraryComparitor(configuration); - String[] messages = comparitor.compare(tld, tld2); - if (messages.length == 0) { - System.out.println("EQUAL"); - } else { - for (int i = 0; i < messages.length; i++) { - System.out.println("ERRORS\n=================="); - System.out.println(messages[i]); - } - } - - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java deleted file mode 100644 index 926442fe19..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig; - -public class VariableEntry { - - public static final String NO_VARIABLE_NAME = "no variable name"; - - private String nameGiven = NO_VARIABLE_NAME; - - private String declare = "false"; - - private String variableClass = "java.lang.String"; - - private String scope = "AT_BEGIN"; - - public VariableEntry() { - } - - public String getNameGiven() { - return nameGiven; - } - - public void setNameGiven(String nameGiven) { - if (nameGiven != null) { - this.nameGiven = nameGiven; - } - } - - public String getDeclare() { - return declare; - } - - public void setDeclare(String declare) { - if (declare != null) { - this.declare = declare; - } - } - - public String getVariableClass() { - return variableClass; - } - - public void setVariableClass(String variableClass) { - if (variableClass != null) { - this.variableClass = variableClass; - } - } - - public String getScope() { - return scope; - } - - public void setScope(String scope) { - if (scope != null) { - this.scope = scope; - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java b/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java deleted file mode 100644 index 6b5badf83b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $URL$ $LastChangedDate$ - */ - -package com.sun.ts.tests.common.taglibsig.validation; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -/** - * This configuration class defines the {@link Validator} names that will be - * used to perform the validation of the TaglibraryDescriptor objects. This - * class is used exclusively by the {@link ValidatorFactory}, which will take - * the names contained within and create {@link Validator} instances. - */ - -public class ValidationConfiguration { - - /* - * All standard Validators will be listed here. - */ - public static final String URI_VALIDATOR = "URIValidator"; - - /* - * Package name for standard validator implementations. - */ - private static final String VALIDATOR_PACKAGE = "com.sun.ts.tests.common.taglibsig.validation."; - - /* - * All standard validators will be stored in here as well. This is used by the - * initValidators() method. - */ - private static final String[] VALIDATORS = { URI_VALIDATOR }; - - /* - * Map of all Validator's and their implementing class. - */ - private static final Map KNOWN_VALIDATORS = new HashMap(); - - static { - // init the standard validator map - initValidators(); - } - - /* - * Map containing the Validators the end-user is interested in. - */ - private Map configuredValidatorMap; - - /** - * Constructs a new ValidationConfiguation instance. - */ - public ValidationConfiguration() { - configuredValidatorMap = new HashMap(); - } - - /** - *

- * Adds the name of a {@link Validator} implementation to this configuration. - * The name must be a known name (i.e. be a constant name defined by this - * class), or a {@link Validator} will not be added. If a non-standard - * validator is required, use addValidator(String, String) - * instead. - *

- * - * @param validatorName - * - Validator name - */ - public void addValidator(String validatorName) { - String className = (String) KNOWN_VALIDATORS.get(validatorName); - if (className != null) - configuredValidatorMap.put(validatorName, className); - } - - /** - *

- * Adds a custom {@link Validator} name to the current configuration. - *

- * - * @param validatorName - * - Validator name - * @param validatorClass - * - The class name of this {@link Validator} - */ - public void addValidator(String validatorName, String validatorClass) { - configuredValidatorMap.put(validatorName, validatorClass); - } - - /** - *

- * Removes the specified {@link Validator} name from the current - * configuration. - *

- * - * @param validatorName - * - Validator name - */ - public void removeValidator(String validatorName) { - configuredValidatorMap.remove(validatorName); - } - - /** - *

- * Returns an Iterator of the {@link Validator} names in the current - * configuration. - *

- * - * @return Iterator of this configuration's {@link Validator} names - */ - public Iterator getValidatorNames() { - return configuredValidatorMap.keySet().iterator(); - } - - /** - *

- * Returns the name of the {@link Validator} implementation class. - *

- * - * @param validatorName - * - Validator name - * @return The name of the {@link Validator} implementation class. - */ - public String getValidatorClass(String validatorName) { - return (String) configuredValidatorMap.get(validatorName); - } - - /** - *

- * True if {@link Validator} names have been added to the current - * configuration, otherwise false. - *

- * - * @return True if {@link Validator} names have been added to the current - * configuration, otherwise false. - */ - public boolean hasBeenConfigured() { - if (configuredValidatorMap.size() > 0) - return true; - return false; - } - - // Initialize all standard validators. - private static void initValidators() { - for (int i = 0; i < VALIDATORS.length; i++) { - KNOWN_VALIDATORS.put(VALIDATORS[i], VALIDATOR_PACKAGE + VALIDATORS[i]); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java b/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java deleted file mode 100644 index 9312ac6018..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java +++ /dev/null @@ -1,186 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.testlogic.ejb.bb.argsemantics; - -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.ejb.calleebeans.SimpleArgument; -import com.sun.ts.tests.common.ejb.calleebeans.StatefulCallee; -import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeHome; -import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeLocal; -import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeLocalHome; - -public class TestLogic { - - /* - * Names used for Callee beans lookups. - */ - public static final String prefix = "java:comp/env/"; - - public static final String statefulRemoteLookup = prefix - + "ejb/StatefulCalleeRemote"; - - public static final String statefulLocalLookup = prefix - + "ejb/StatefulCalleeLocal"; - - public static final String statefulBiRemoteLookup = prefix - + "ejb/StatefulCalleeBothRemote"; - - public static final String statefulBiLocalLookup = prefix - + "ejb/StatefulCalleeBothLocal"; - - /* - * Expected values for our custom argument. - */ - public static final int initialValue = 12; - - public static final int modifiedValue = 24; - - public static final int modifiedValue2 = 48; - - private static StatefulCallee ssfCalleeBean = null; - - private static StatefulCalleeLocal ssfCalleeLocalBean = null; - - public static boolean testStatefulRemote(TSNamingContext nctx, - Properties props) { - - return testStatefulRemote(statefulRemoteLookup, nctx, props); - } - - public static boolean testStatefulLocal(TSNamingContext nctx, - Properties props) { - - return testStatefulLocal(statefulLocalLookup, nctx, props); - } - - public static boolean testStatefulBoth(TSNamingContext nctx, - Properties props) { - - boolean pass; - - pass = testStatefulRemote(statefulBiRemoteLookup, nctx, props); - pass &= testStatefulLocal(statefulBiLocalLookup, nctx, props); - - return pass; - } - - protected static boolean testStatefulRemote(String lookupName, - TSNamingContext nctx, Properties props) { - - StatefulCalleeHome home; - ssfCalleeBean = null; - SimpleArgument arg; - boolean pass; - - try { - arg = new SimpleArgument(initialValue); - TestUtil.logTrace("[TestLogic] Initial value is " + arg.getValue()); - - TestUtil.logTrace("[TestLogic] Looking up Callee " + lookupName + " ..."); - home = (StatefulCalleeHome) nctx.lookup(lookupName, - StatefulCalleeHome.class); - - ssfCalleeBean = home.create(props, arg); - TestUtil.logTrace("[TestLogic] Value after create is " + arg.getValue()); - - ssfCalleeBean.call(props, arg); - TestUtil.logTrace( - "[TestLogic] Value after business " + "method is " + arg.getValue()); - - pass = (arg.getValue() == initialValue); - if (!pass) { - TestUtil.logErr( - "[TestLogic] Argument has been " + "modified to " + arg.getValue()); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("[TestLogic] Unexpected exception", e); - } - - return pass; - } - - protected static boolean testStatefulLocal(String lookupName, - TSNamingContext nctx, Properties props) { - - StatefulCalleeLocalHome home; - ssfCalleeLocalBean = null; - SimpleArgument arg; - String msg; - boolean pass; - - try { - arg = new SimpleArgument(initialValue); - TestUtil.logTrace("[TestLogic] Initial value is " + arg.getValue()); - - TestUtil.logTrace("[TestLogic] Looking up Callee " + lookupName + " ..."); - home = (StatefulCalleeLocalHome) nctx.lookup(lookupName); - - ssfCalleeLocalBean = home.create(props, arg); - TestUtil.logTrace("[TestLogic] Value after create is " + arg.getValue()); - pass = (arg.getValue() == modifiedValue); - if (!pass) { - msg = "Expected Argument to be set to " + modifiedValue; - TestUtil.logErr("[TestLogic] " + msg); - throw new Exception(msg); - } - - ssfCalleeLocalBean.call(props, arg); - TestUtil.logTrace( - "[TestLogic] Value after business " + "method is " + arg.getValue()); - - pass = (arg.getValue() == modifiedValue2); - if (!pass) { - TestUtil.logErr("[TestLogic] Expected argument to be " + "set to " - + modifiedValue2); - } - } catch (Exception e) { - pass = false; - TestUtil.logErr("[TestLogic] Unexpected exception", e); - } - - return pass; - } - - public static void cleanUpStatefulBean() { - TestUtil.logTrace("cleanUpStatefulBean"); - try { - if (ssfCalleeBean != null) { - TestUtil.logTrace("cleanUp Session Stateful Remote Callee Bean"); - ssfCalleeBean.remove(); - ssfCalleeBean = null; - } - - if (ssfCalleeLocalBean != null) { - TestUtil.logTrace("cleanUp Session Stateful Local Callee Bean"); - ssfCalleeLocalBean.remove(); - ssfCalleeLocalBean = null; - } - } catch (Exception e) { - TestUtil.logErr( - "Exception caught trying to remove Stateful Session beans", e); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java deleted file mode 100644 index b8a029f770..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle; - -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.ServiceEETest; -import com.sun.ts.lib.util.TestUtil; - -public class EmptyVehicleRunner implements VehicleRunnable { - - public Status run(String[] argv, Properties p) { - - ServiceEETest theTestClient; - Status sTestStatus = Status.passed(""); - - // create an instance of the test client and run here - try { - String testClassName = TestUtil.getProperty(p, "test_classname"); - Class c = Class.forName(testClassName); - theTestClient = (ServiceEETest) c.newInstance(); - theTestClient.setSharedObject(VehicleClient.getClientSharedObject()); - sTestStatus = theTestClient.run(argv, p); - } catch (ClassNotFoundException cnfe) { - TestUtil.logErr("Failed to create the EETest instance", cnfe); - sTestStatus = Status.failed("Failed to create the EETest instance"); - } catch (InstantiationException ie) { - TestUtil.logErr("Failed to create the EETest instance", ie); - sTestStatus = Status.failed("Failed to create the EETest instance"); - } catch (Exception e) { - TestUtil.logErr("Failed running in a client side vehicle", e); - sTestStatus = Status.failed("Failed running in a client side vehicle"); - } - - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java deleted file mode 100644 index 6e96fc1f6e..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java +++ /dev/null @@ -1,354 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle; - -import java.lang.System.Logger; - -public final class VehicleRunnerFactory { - - private static final Logger logger = System.getLogger(VehicleRunnerFactory.class.getName()); - - private static VehicleRunnable ejbRunner; - - private static VehicleRunnable servletRunner; - - private static VehicleRunnable jspRunner; - - private static VehicleRunnable ejbLiteJsfRunner; - - private static VehicleRunnable ejbLiteJspRunner; - - private static VehicleRunnable ejbLiteSecuredJspRunner; - - private static VehicleRunnable emptyRunner; - - private static VehicleRunnable stateless3Runner; - - private static VehicleRunnable stateful3Runner; - - private static VehicleRunnable appmanagedRunner; - - private static VehicleRunnable appmanagedNoTxRunner; - - private static VehicleRunnable wsejbRunner; - - private static VehicleRunnable wsservletRunner; - - private static VehicleRunnable pmservletRunner; - - private static VehicleRunnable puservletRunner; - - private static VehicleRunnable connectorServletRunner; - - private static VehicleRunnable customVehicleRunner; - - private static VehicleRunnable webRunner; - - private VehicleRunnerFactory() { - } - - private static VehicleRunnable getEJBRunner() { - if (ejbRunner == null) { - try { - Class c = Class - .forName("com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRunner"); - ejbRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return ejbRunner; - } - - private static VehicleRunnable getServletRunner() { - if (servletRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.servlet.ServletVehicleRunner"); - servletRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return servletRunner; - } - - private static VehicleRunnable getJSPRunner() { - if (jspRunner == null) { - try { - Class c = Class - .forName("com.sun.ts.tests.common.vehicle.jsp.JSPVehicleRunner"); - jspRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return jspRunner; - } - - private static VehicleRunnable getEJBLiteJSFRunner() { - if (ejbLiteJsfRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.ejblitejsf.EJBLiteJSFVehicleRunner"); - ejbLiteJsfRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return ejbLiteJsfRunner; - } - - private static VehicleRunnable getEJBLiteWebRunner() { - if (ejbLiteJspRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteWebVehicleRunner"); - ejbLiteJspRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return ejbLiteJspRunner; - } - - private static VehicleRunnable getEJBLiteSecuredWebRunner() { - if (ejbLiteSecuredJspRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteSecuredWebVehicleRunner"); - ejbLiteSecuredJspRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return ejbLiteSecuredJspRunner; - } - - private static VehicleRunnable getWebRunner() { - if (webRunner == null) { - try { - Class c = Class - .forName("com.sun.ts.tests.common.vehicle.web.WebVehicleRunner"); - webRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return webRunner; - } - - private static VehicleRunnable getEmptyRunner() { - if (emptyRunner == null) { - try { - Class c = Class - .forName("com.sun.ts.tests.common.vehicle.EmptyVehicleRunner"); - emptyRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return emptyRunner; - } - - private static VehicleRunnable getStateless3Runner() { - if (stateless3Runner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleRunner"); - stateless3Runner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return stateless3Runner; - } - - private static VehicleRunnable getStateful3Runner() { - if (stateful3Runner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.stateful3.Stateful3VehicleRunner"); - stateful3Runner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return stateful3Runner; - } - - private static VehicleRunnable getAppManagedRunner() { - if (appmanagedRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.appmanaged.AppManagedVehicleRunner"); - appmanagedRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return appmanagedRunner; - } - - private static VehicleRunnable getAppManagedNoTxRunner() { - if (appmanagedNoTxRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.appmanagedNoTx.AppManagedNoTxVehicleRunner"); - appmanagedNoTxRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return appmanagedNoTxRunner; - } - - private static VehicleRunnable getWSEJBRunner() { - if (wsejbRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRunner"); - wsejbRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return wsejbRunner; - } - - private static VehicleRunnable getWSServletRunner() { - if (wsservletRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicleRunner"); - wsservletRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return wsservletRunner; - } - - private static VehicleRunnable getPMServletRunner() { - if (pmservletRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.pmservlet.PMServletVehicleRunner"); - pmservletRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return pmservletRunner; - } - - private static VehicleRunnable getPUServletRunner() { - if (puservletRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.puservlet.PUServletVehicleRunner"); - puservletRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return puservletRunner; - } - - private static VehicleRunnable getConnectorServletRunner() { - if (connectorServletRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.connectorservlet.ConnectorServletVehicleRunner"); - connectorServletRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return connectorServletRunner; - } - - // this supports the rare case of a user defined custome vehicle - private static VehicleRunnable getCustomVehicleRunner() { - if (customVehicleRunner == null) { - try { - Class c = Class.forName( - "com.sun.ts.tests.common.vehicle.customvehicle.CustomVehicleRunner"); - customVehicleRunner = (VehicleRunnable) c.newInstance(); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - return customVehicleRunner; - } - - // runners are stateless and thus can be cached and reused. - // But we cannot have reference to ejb vehicle directory in - // order to compile this class in any tck's. - public static VehicleRunnable getVehicleRunner(String vtype) { - if (vtype.equalsIgnoreCase("ejb")) { - return getEJBRunner(); - } else if (vtype.equalsIgnoreCase("servlet")) { - return getServletRunner(); - } else if (vtype.equalsIgnoreCase("jsp")) { - return getJSPRunner(); - } else if (vtype.equalsIgnoreCase("web")) { - return getWebRunner(); - } else if (vtype.equalsIgnoreCase("stateless3")) { - return getStateless3Runner(); - } else if (vtype.equalsIgnoreCase("stateful3")) { - return getStateful3Runner(); - } else if (vtype.equalsIgnoreCase("appmanaged")) { - return getAppManagedRunner(); - } else if (vtype.equalsIgnoreCase("appmanagedNoTx")) { - return getAppManagedNoTxRunner(); - } else if (vtype.equalsIgnoreCase("wsejb")) { - return getWSEJBRunner(); - } else if (vtype.equalsIgnoreCase("wsservlet")) { - return getWSServletRunner(); - } else if (vtype.equalsIgnoreCase("pmservlet")) { - return getPMServletRunner(); - } else if (vtype.equalsIgnoreCase("puservlet")) { - return getPUServletRunner(); - } else if (vtype.equalsIgnoreCase("connectorservlet")) { - return getConnectorServletRunner(); - } else if (vtype.equalsIgnoreCase("customvehicle")) { - return getCustomVehicleRunner(); - } else if (vtype.equalsIgnoreCase("ejblitejsf")) { - return getEJBLiteJSFRunner(); - } else if (vtype.equalsIgnoreCase("ejblitejsp") - || vtype.equalsIgnoreCase("ejbliteservlet") - || vtype.equalsIgnoreCase("ejbliteservlet2") - || vtype.equalsIgnoreCase("ejbliteservletcal")) { - return getEJBLiteWebRunner(); - } else if (vtype.equalsIgnoreCase("ejblitesecuredjsp")) { - return getEJBLiteSecuredWebRunner(); - } else { - if (!vtype.equalsIgnoreCase("appclient") - && !vtype.equalsIgnoreCase("wsappclient") - && !vtype.equalsIgnoreCase("standalone")) { - logger.log(Logger.Level.WARNING,"Invalid vehicle {"+vtype+"}. Will run test directly."); - - } - return getEmptyRunner(); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java deleted file mode 100644 index 2744434acb..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.appmanaged; - -import java.util.Properties; - -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper; - -import jakarta.annotation.Resource; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceUnit; - -@Stateful(name = "AppManagedVehicleBean") -@Remote({ AppManagedVehicleIF.class }) -public class AppManagedVehicleBean - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean - implements AppManagedVehicleIF, java.io.Serializable { - - public AppManagedVehicleBean() { - super(); - } - - protected String getVehicleType() { - return APPMANAGED; - } - - private EntityManagerFactory emf; - - // ================== business methods ==================================== - @Remove - public RemoteStatus runTest(String[] args, Properties props) { - props.put("persistence.unit.name", "CTS-EM"); - try { - setEntityManager(emf.createEntityManager()); - RemoteStatus retValue; - retValue = super.runTest(args, props); - return retValue; - } finally { - try { - if (getEntityManager().isOpen()) { - getEntityManager().close(); - } - } catch (Exception e) { - System.out.println("Exception caught during em.close()" + e); - } - } - } - ///////////////////////////////////////////////////////////////////////// - - @Resource - public void setSessionContext(SessionContext sessionContext) { - this.sessionContext = sessionContext; - } - - @PersistenceUnit(unitName = "CTS-EM") - public void setEntityManagerFactory(EntityManagerFactory emf) { - this.emf = emf; - this.entityManagerFactory = emf; - } - - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } - - protected EntityTransaction getEntityTransaction() { - return new NoopTransactionWrapper(); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java deleted file mode 100644 index 14720b2a0d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.appmanaged; - -import java.util.Properties; - -import javax.naming.InitialContext; -import javax.naming.NameClassPair; -import javax.naming.NamingEnumeration; -import javax.naming.NamingException; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; - -public class AppManagedVehicleRunner implements VehicleRunnable { - public static final String APPMANAGED_REF_NAME = "java:comp/env/ejb/AppManagedVehicleBean"; - - public Status run(String[] args, Properties props) { - Status sTestStatus = null; - try { - AppManagedVehicleIF bean=null; - TSNamingContext jc = new TSNamingContext(props); - try { - bean = (AppManagedVehicleIF) jc - .lookup(APPMANAGED_REF_NAME); - } catch (Exception e) { - e.printStackTrace(); - dumpJndi("", new InitialContext()); - } - TestUtil.logTrace( - "application-managed JTA runner looked up vehicle: " + bean); - sTestStatus = (bean.runTest(args, props)).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed.", e); - sTestStatus = Status - .failed("Test run in application-managed JTA vehicle failed."); - } - return sTestStatus; - } - - private void dumpJndi(String s,InitialContext jc ) { - try { - dumpTreeEntry(jc, jc.list(s), s); - } catch (Exception ignore) { - } - } - private void dumpTreeEntry(InitialContext jc, NamingEnumeration list, String s) throws NamingException { - System.out.println("\n1. AppManagedVehicleRunner jndi dump walking down tree branch name = " + s); - while (list.hasMore()) { - NameClassPair ncp = list.next(); - System.out.println("2. AppManagedVehicleRunner jndi dump (show name + classname pair): " + ncp.toString()); - if (s.length() == 0) { - dumpJndi(ncp.getName(), jc); - } else { - dumpJndi(s + "/" + ncp.getName(), jc); - } - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java deleted file mode 100644 index a9aa7423e4..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.appmanagedNoTx; - -import java.util.Properties; - -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.tests.common.vehicle.ejb3share.EntityTransactionWrapper; - -import jakarta.annotation.Resource; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceUnit; - -@Stateful(name = "AppManagedNoTxVehicleBean") -@Remote({ AppManagedNoTxVehicleIF.class }) -public class AppManagedNoTxVehicleBean - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean - implements AppManagedNoTxVehicleIF, java.io.Serializable { - - public AppManagedNoTxVehicleBean() { - super(); - } - - protected String getVehicleType() { - return APPMANAGEDNOTX; - } - - private EntityManagerFactory emf; - - // ================== business methods ==================================== - @Remove - public RemoteStatus runTest(String[] args, Properties props) { - props.put("persistence.unit.name", "CTS-EM-NOTX"); - try { - setEntityManager(emf.createEntityManager()); - RemoteStatus retValue; - retValue = super.runTest(args, props); - return retValue; - } finally { - try { - if (getEntityManager().isOpen()) { - getEntityManager().close(); - } - } catch (Exception e) { - System.out.println("Exception caught during em.close()" + e); - } - } - } - ///////////////////////////////////////////////////////////////////////// - - @Resource - public void setSessionContext(SessionContext sessionContext) { - this.sessionContext = sessionContext; - } - - @PersistenceUnit(unitName = "CTS-EM-NOTX") - public void setEntityManagerFactory(EntityManagerFactory emf) { - this.emf = emf; - this.entityManagerFactory = emf; - } - - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } - - protected EntityTransaction getEntityTransaction() { - return new EntityTransactionWrapper(getEntityManager().getTransaction()); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java deleted file mode 100644 index 438ad6f191..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * - */ -package com.sun.ts.tests.common.vehicle.connectorservlet; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.rmi.RemoteException; -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class ConnectorServletVehicle extends HttpServlet { - protected Properties properties = null; - - protected String[] arguments = null; - - protected EETest testObj = null; - - public void init(ServletConfig config) throws ServletException { - TestUtil.logTrace("init " + this.getClass().getName() + " ..."); - super.init(config); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - try { - // get the inputstream and read any objects passed from the - // client, e.g. properties, args, etc. - // wrap the Inputstream in an ObjectInputstream and read - // the properties and args. - TestUtil.logTrace("ConnectorServletVehicle - In doGet"); - - ObjectInputStream objInStream = new ObjectInputStream( - new BufferedInputStream(req.getInputStream())); - System.out.println("ConnectorServletVehicle - got InputStream"); - TestUtil.logTrace("ConnectorServletVehicle - got InputStream"); - properties = (Properties) objInStream.readObject(); - System.out.println("read properties!!!"); - - // create an instance of the test client and run here - String testClassName = TestUtil.getProperty(properties, "test_classname"); - Class c = Class.forName(testClassName); - testObj = (EETest) c.newInstance(); - - // Thread.currentThread().dumpStack(); - arguments = (String[]) objInStream.readObject(); - // arguments = new String[1]; - // arguments[0] = ""; - TestUtil.logTrace("ConnectorServletVehicle - read Objects"); - try { - TestUtil.init(properties); - TestUtil.logTrace("Remote logging set for Servlet Vehicle"); - TestUtil.logTrace("ConnectorServletVehicle - Here are the props"); - TestUtil.list(properties); - } catch (Exception e) { - throw new ServletException("unable to initialize remote logging"); - } - ObjectOutputStream objOutStream = new ObjectOutputStream( - res.getOutputStream()); - System.out.println("got outputstream"); - // now run the test and return the result - RemoteStatus finalStatus = runTest(); - System.out.println("ran test"); - objOutStream.writeObject(finalStatus); - objOutStream.flush(); - objOutStream.close(); - - } catch (Throwable t) { - System.out.println(t.getMessage()); - TestUtil.logTrace(t.getMessage()); - t.printStackTrace(); - throw new ServletException( - "test failed to run within the Servlet Vehicle"); - } - - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - System.out.println("In doPost!"); - TestUtil.logTrace("In doPost"); - doGet(req, res); - } - - protected RemoteStatus runTest() throws RemoteException { - RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); - - try { - // call EETest impl's run method - sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); - - if (sTestStatus.getType() == Status.PASSED) - TestUtil.logMsg("Test running in servlet vehicle passed"); - else - TestUtil.logMsg("Test running in servlet vehicle failed"); - } catch (Throwable e) { - TestUtil.logErr("Test running in servlet vehicle failed", e); - sTestStatus = new RemoteStatus( - Status.failed("Test running in servlet vehicle failed")); - } - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java deleted file mode 100644 index c4e3981aeb..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java +++ /dev/null @@ -1,162 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.vehicle.connectorservlet; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -public class ConnectorVehicleRunner implements VehicleRunnable { - - private static final Logger LOGGER = LoggerFactory.getLogger(ConnectorVehicleRunner.class); - - protected String sVehicle = "connectorservlet"; - - protected Status sTestStatus = Status.passed(""); - - String urlSuffix = ""; - - Status sServletStatus = Status.passed(""); - - String sVehicleArchiveName = ""; - - String contextRootPrefix; - - String[] argv; - - Properties p; - - public Status run(String[] argv, Properties p) { - this.argv = argv; - this.p = p; - sVehicle = TestUtil.getProperty(p, "vehicle"); - - // use this name for the context root or jndi name to eliminate - // naming conflicts for apps deployed at the same time - sVehicleArchiveName = TestUtil.getProperty(p, "vehicle_archive_name"); - - if (sVehicleArchiveName.indexOf("_vehicles") != -1) { - contextRootPrefix = sVehicleArchiveName.substring(0, - sVehicleArchiveName.indexOf("_vehicles") + 1) + sVehicle - + "_vehicle_web"; - } else { - if (sVehicleArchiveName.endsWith("_web")) { - contextRootPrefix = sVehicleArchiveName; - } else { - contextRootPrefix = sVehicleArchiveName + "_web"; - } - } - - // default urlSuffix - urlSuffix = "/" + contextRootPrefix + "/" + sVehicle + "_vehicle"; - - return run(); - } // run - - protected Status run() { - // run in a connectorservlet - urlSuffix = "/" + contextRootPrefix + "/connectorservlet_vehicle"; - sServletStatus = runWebVehicleTest("connectorservlet"); - - LOGGER.info("Test: returning from running in connectorservlet vehicles"); - - if (sServletStatus.isPassed()) { - sTestStatus = Status.passed("Test passed in a connectorservlet "); - } else { - sTestStatus = Status.failed("Test failed in a connectorservlet "); - } - return sTestStatus; - } - - protected Status runWebVehicleTest(String vehicle) { - URLConnection connection = null; - URL url = null; - ObjectOutputStream objOut = null; - ObjectInputStream objIn = null; - Status status; - - try { - String webServerHost = TestUtil.getProperty(p, "webServerHost"); - String webServerPort = TestUtil.getProperty(p, "webServerPort"); - url = new URL("http://" + webServerHost + ":" + Integer.parseInt(webServerPort) + urlSuffix); - connection = url.openConnection(); - LOGGER.info("Opened connection to {}", url); - connection.setDoOutput(true); - connection.setDoInput(true); - connection.setUseCaches(false); - connection.setRequestProperty("Content-Type", - "java-internal/" + p.getClass().getName()); - // connection.connect(); - objOut = new ObjectOutputStream(connection.getOutputStream()); - LOGGER.trace("got outputstream"); - objOut.writeObject(p); - objOut.writeObject(argv); - LOGGER.trace("wrote objects to the {} vehicle", vehicle); - objOut.flush(); - objOut.close(); - objOut = null; - - // read the status when it comes back - objIn = new ObjectInputStream(connection.getInputStream()); - status = ((RemoteStatus) objIn.readObject()).toStatus(); - TestUtil.logMsg("Test status from a " + vehicle + ": " + status.getType() - + ":" + status.getReason()); - - } catch (MalformedURLException e) { - e.printStackTrace(); - status = Status.failed("Fatal: Improper URL"); - } catch (NumberFormatException e) { - e.printStackTrace(); - status = Status.failed( - "Please set an appropriate value for the property: webServerPort"); - } catch (IOException e) { - e.printStackTrace(); - status = Status.failed("Fatal: Problem with connection: " + e); - } catch (Exception e) { - e.printStackTrace(); - status = Status.failed( - "ServiceTest failed inside a " + vehicle + ": " + e.getMessage()); - } finally { - - if (objOut != null) { - try { - objOut.close(); - } catch (Exception e) { - } - } - - if (objIn != null) { - try { - objIn.close(); - } catch (Exception e) { - } - } - } - return status; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java deleted file mode 100644 index 01e1e4c0eb..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.ejb; - -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.EJBException; - -public class EJBVehicle { - private EETest testObj; - - private Properties properties; - - private String[] arguments; - - public void initialize(String[] args, Properties p) { - // Initialize TestUtil Reporting - try { - TestUtil.init(p); - } catch (Exception e) { - TestUtil.logErr("initLogging failed in ejb vehicle.", e); - throw new EJBException(); - } - - arguments = args; - properties = p; - - // create an instance of the test client - try { - String testClassName = TestUtil.getProperty(properties, "test_classname"); - Class c = Class.forName(testClassName); - testObj = (EETest) c.newInstance(); - } catch (Exception e) { - TestUtil.logErr("Failed to create the EETest instance in the vehicle", e); - throw new EJBException(); - } - TestUtil.logTrace("initialize"); - } - - // the run method that we call here will either throw - // an exception (failed), or return void (pass) - public RemoteStatus runTest() { - RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); - - TestUtil.logTrace("in runTest()"); - - try { - // call EETest impl's run method - sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); - - if (sTestStatus.getType() == Status.PASSED) - TestUtil.logMsg("Test running in ejb vehicle passed"); - else - TestUtil.logMsg("Test running in ejb vehicle failed"); - } catch (Throwable e) { - e.printStackTrace(); - TestUtil.logErr("Test running in ejb vehicle failed", e); - sTestStatus = new RemoteStatus( - Status.failed("Test running in ejb vehicle failed")); - } - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java deleted file mode 100644 index 526ffa6133..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.ejb; - -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.porting.TSLoginContext; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; - -public class EJBVehicleRunner implements VehicleRunnable { - public Status run(String[] argv, Properties p) { - - Status sTestStatus = Status.passed(""); - String username = TestUtil.getProperty(p, "user"); - String password = TestUtil.getProperty(p, "password"); - - String isSecuredEjbClientValue = TestUtil.getProperty(p, "secured.ejb.vehicle.client"); - boolean isSecuredEjbClient = (isSecuredEjbClientValue != null); - TestUtil.logTrace("%%%%%%% isSecuredEjbClient = " + isSecuredEjbClient); - - if (isSecuredEjbClient) { - try { - TestUtil.logTrace("Test login in appclient for user " + username - + " password " + password); - TSLoginContext loginContext = new TSLoginContext(); - loginContext.login(username, password); - } catch (Exception e) { - TestUtil.logErr("login failed", e); - sTestStatus = Status.failed("Test login in appclient failed for user " - + username + " password " + password); - } - } - - String sEJBVehicleJndiName = ""; - EJBVehicleRemote ref = null; - try { - TSNamingContext jc = new TSNamingContext(); - sEJBVehicleJndiName = "java:comp/env/ejb/EJBVehicle"; - ref = (EJBVehicleRemote) jc.lookup(sEJBVehicleJndiName, - EJBVehicleRemote.class); - ref.initialize(argv, p); - TestUtil.logTrace("in ejbvehicle: initialize ok; call runTest()"); - sTestStatus = (ref.runTest()).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed", e); - sTestStatus = Status.failed("Test run in ejb vehicle failed"); - } - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java deleted file mode 100644 index 30b7359835..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.vehicle.ejb3share; - -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.SessionContext; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; - -abstract public class EJB3ShareBaseBean implements EJB3ShareIF { - public static final String FINDER_TEST_NAME_KEY = "testName"; - - public static final String STATELESS3 = "stateless3"; - - public static final String STATEFUL3 = "stateful3"; - - public static final String APPMANAGED = "appmanaged"; - - public static final String APPMANAGEDNOTX = "appmanagedNoTx"; - - protected EntityManager entityManager; - - protected EntityManagerFactory entityManagerFactory; - - protected SessionContext sessionContext; - - protected abstract String getVehicleType(); - - protected EJB3ShareBaseBean() { - super(); - } - - // ================== business methods ==================================== - public RemoteStatus runTest(String[] args, Properties props) { - - try { - TestUtil.init(props); - } catch (Exception e) { - TestUtil.logErr("initLogging failed in " + getVehicleType() + " vehicle.", - e); - } - - String testName = getTestName(props); - System.out.println( - "===== Starting " + testName + " in " + getVehicleType() + " ====="); - RemoteStatus sTestStatus = null; - - try { - // create an instance of the test client and run here - String testClassName = TestUtil.getProperty(props, "test_classname"); - Class c = Class.forName(testClassName); - EETest testClient = (EETest) c.newInstance(); - - initClient(testClient); - sTestStatus = new RemoteStatus(testClient.run(args, props)); - if (sTestStatus.getType() == Status.PASSED) - TestUtil.logMsg(testName + " in vehicle passed"); - } catch (Throwable e) { - String fail = testName + " in vehicle failed"; - // e.printStackTrace(); - TestUtil.logErr(fail, e); - sTestStatus = new RemoteStatus(Status.failed(fail)); - } - return sTestStatus; - } - - protected String getTestName(Properties props) { - String testName = TestUtil.getProperty(props, FINDER_TEST_NAME_KEY); - if (testName == null) { - testName = "test"; - } - return testName; - } - - private void initClient(EETest testClient) { - if (testClient instanceof UseEntityManager) { - EntityManager em = getEntityManager(); - if (em == null) { - throw new IllegalStateException("EntityManager is null"); - } - UseEntityManager client2 = (UseEntityManager) testClient; - EntityTransaction et = getEntityTransaction(); - client2.setEntityManager(em); - client2.setEntityTransaction(et); - client2.setInContainer(true); - } - - if (testClient instanceof UseEntityManagerFactory) { - EntityManagerFactory emf = getEntityManagerFactory(); - if (emf != null) { - UseEntityManagerFactory client2 = (UseEntityManagerFactory) testClient; - client2.setEntityManagerFactory(emf); - } - } - - } - - public SessionContext getSessionContext() { - return sessionContext; - } - - abstract public void setSessionContext(SessionContext sessionContext); - - public EntityManager getEntityManager() { - return entityManager; - } - - public EntityManagerFactory getEntityManagerFactory() { - return entityManagerFactory; - } - - public void setEntityManagerFactory(EntityManagerFactory emf) { - // do nothing this gets overridden in subclass - } - - abstract protected EntityTransaction getEntityTransaction(); - - abstract public void setEntityManager(EntityManager entityManager); -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java deleted file mode 100644 index 461a95aa75..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.ejb3share; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceException; -import jakarta.transaction.NotSupportedException; -import jakarta.transaction.Status; -import jakarta.transaction.SystemException; -import jakarta.transaction.UserTransaction; - -final public class UserTransactionWrapper implements EntityTransaction { - private UserTransaction delegate; - - /** - * These are the various status and values for a transaction STATUS_ACTIVE:0 - * STATUS_COMMITTED:3 STATUS_COMMITTING:8 STATUS_MARKED_ROLLBACK:1 - * STATUS_NO_TRANSACTION:6 STATUS_PREPARED:2 STATUS_PREPARING:7 - * STATUS_ROLLEDBACK:4 STATUS_ROLLING_BACK:9 STATUS_UNKNOWN:5 * - */ - public UserTransactionWrapper() { - } - - public UserTransactionWrapper(UserTransaction delegate) { - this.delegate = delegate; - } - - public void setDelegate(UserTransaction delegate) { - this.delegate = delegate; - } - - public void rollback() { - TestUtil.logTrace("in UserTransactionWrapper.rollback()"); - if (!isActive()) { - throw new IllegalStateException("Transaction is not active."); - } - try { - delegate.rollback(); - } catch (SystemException e) { - throw new PersistenceException(e); - } - } - - public boolean isActive() { - boolean active = false; - try { - int txStatus = delegate.getStatus(); - TestUtil.logTrace( - "UserTransactionWrapper.isActive().getStatus():" + txStatus); - if ((txStatus == Status.STATUS_ACTIVE) - || (txStatus == Status.STATUS_MARKED_ROLLBACK)) { - active = true; - } - } catch (SystemException e) { - throw new PersistenceException(e); - } - return active; - } - - @Override - public void setTimeout(Integer timeout) { - - } - - @Override - public Integer getTimeout() { - return null; - } - - public void commit() { - TestUtil.logTrace("in UserTransactionWrapper.commit()"); - - if (!isActive()) { - throw new IllegalStateException("Transaction is not active."); - } - try { - delegate.commit(); - } catch (Exception e) { - throw new jakarta.persistence.RollbackException(e); - } - } - - public void begin() { - TestUtil.logTrace("in UserTransactionWrapper.begin()"); - if (isActive()) { - throw new IllegalStateException("Transaction is already active."); - } - try { - delegate.begin(); - TestUtil.logTrace( - "UserTransactionWrapper.begin().getStatus():" + delegate.getStatus()); - } catch (SystemException e) { - throw new PersistenceException(e); - } catch (NotSupportedException e) { - throw new PersistenceException(e); - } - } - - public void setRollbackOnly() { - TestUtil.logTrace("in UserTransactionWrapper.setRollbackOnly()"); - if (!isActive()) { - throw new IllegalStateException("Transaction is not active."); - } - } - - public boolean getRollbackOnly() { - TestUtil.logTrace("in UserTransactionWrapper.getRollbackOnly()"); - if (!isActive()) { - throw new IllegalStateException("Transaction is not active."); - } - try { - int txStatus = delegate.getStatus(); - TestUtil.logTrace( - "UserTransactionWrapper.getRollbackOnly().getStatus():" + txStatus); - return txStatus == Status.STATUS_MARKED_ROLLBACK; - } catch (SystemException e) { - throw new PersistenceException(e); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java deleted file mode 100644 index cf24ec5a57..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java +++ /dev/null @@ -1,291 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.vehicle.ejbembed; - -import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; -import java.lang.reflect.Method; -import java.util.ArrayList; -import java.util.List; -import java.util.logging.Logger; - -import com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF; - -import jakarta.annotation.PostConstruct; -import jakarta.ejb.EJB; -import jakarta.ejb.EJBs; -import jakarta.ejb.embeddable.EJBContainer; - -/** - * Since JavaEE annotations are not required in ejb embeddable usage, this class - * helps resolving @EJB and @PostConstruct in client classes when tests are - * running in ejbembed vehicle. - * - * It resolves type-level, field and setter @EJB injections, and @PostConstruct - * methods as well. This class constructs a portable jndi name from the metadata - * in @EJB annotations. - * - * All client classes and their superclasses need to be scanned for @EJB - * and @PostConstruct. The most general superclass should be processed first. - * However, all @PostConstruct methods must be invoked after all @EJB injections - * have been resolved and initialized. - * - * For type-level injections, name, beanName, and beanInterface are all - * required, and so they are sufficient to construct the portable jndi name. - * Then a mapping between JavaEE lookup name and portable global jndi name is - * recorded, which can be consulted when test methods look up the ejb ref. - * - * For field and setter @EJB injection, all 3 @EJB attributes are optional. - * beanInterface may be present or be inferred from the field or parameter type. - * Obtaining beanName is complicated and requires searching all ejb bean - * classes, parsing its component- defining annotations and parsing ejb-jar.xml. - * This part is too much for our purpose. - * - * So we make it a rule for test writers that all client classes that are to be - * run in ejbembed vehicle always use beanName attribute in @EJB injections. - * - * After a portable global jndi name is constructed, the field is initialized to - * the lookup result, and the setter method is invoked, passing the lookup - * result as the parameter. - * - * moduleName is set by various vehicles. - */ -public class InjectionResolver { - private static final Logger logger = Logger - .getLogger("com.sun.ts.tests.common.vehicle.ejbembed"); - - private EJBContainer container; - - private EJBLiteClientIF client; - - private List postConstructMethods = new ArrayList(); - - public InjectionResolver(EJBLiteClientIF client, EJBContainer container) { - super(); - this.client = client; - this.container = container; - } - - public void resolve() { - resolve0(client.getClass()); - invokePostConstructMethods(); - } - - public void resolve0(Class cls) { - Class sup = cls.getSuperclass(); - if (sup != null && EJBLiteClientIF.class.isAssignableFrom(sup)) { - resolve0((Class) sup); - } - - resolveTypeLevelInjections(cls); - resolveFieldInjections(cls); - resolveSetterInjections(cls); - resolvePostConstruct(cls); - - logger.info("Resolved " + cls); - } - - private void resolvePostConstruct(Class cls) { - Method[] methods = cls.getDeclaredMethods(); - for (Method m : methods) { - PostConstruct pc = m.getAnnotation(PostConstruct.class); - if (pc != null) { - postConstructMethods.add(m); - } - } - } - - private void invokePostConstructMethods() { - for (Method m : postConstructMethods) { - m.setAccessible(true); - try { - m.invoke(client); - logger.info("Invoked PostConstruct method: " + m); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - } - } - - private void resolveSetterInjections(Class cls) { - Method[] methods = cls.getDeclaredMethods(); - for (Method m : methods) { - EJB b = m.getAnnotation(EJB.class); - if (b == null) { - continue; - } - - logger.info("Resolving setter @EJB injection: " + b); - - String lookup = b.lookup(); // default value is "" - if (lookup.length() > 0 && lookup.startsWith("java:global")) { - logger.info("Got @EJB.lookup " + lookup); - } else { - Class beanInterface = b.beanInterface(); - String beanName = b.beanName(); - if (beanInterface.equals(Object.class)) { - Class[] paramTypes = m.getParameterTypes(); - beanInterface = paramTypes[0]; - } - if (beanName.length() == 0) { - beanName = getBeanNameFromDescription(b.description()); - } - if (beanName.length() == 0) { - throw new RuntimeException( - "beanName is not specified in @EJB injection on method " - + m.toString()); - } - lookup = createGlobalJNDIName(beanInterface, beanName); - } - - Object beanFromLookup = lookup(lookup); - - m.setAccessible(true); - try { - m.invoke(client, beanFromLookup); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - } - } - - private void resolveFieldInjections(Class cls) { - Field[] fields = cls.getDeclaredFields(); - for (Field f : fields) { - EJB b = f.getAnnotation(EJB.class); - if (b == null) { - continue; - } - - logger.info("Resolving field @EJB injection: " + b); - - String lookup = b.lookup(); // default value is "" - if (lookup.length() > 0 && lookup.startsWith("java:global")) { - logger.info("Got @EJB.lookup " + lookup); - } else { - Class beanInterface = b.beanInterface(); - String beanName = b.beanName(); - if (beanInterface.equals(Object.class)) { - beanInterface = f.getType(); - } - if (beanName.length() == 0) { - beanName = getBeanNameFromDescription(b.description()); - } - if (beanName.length() == 0) { - throw new RuntimeException( - "beanName is not specified in @EJB injection on field " - + f.toString()); - } - lookup = createGlobalJNDIName(beanInterface, beanName); - } - - Object beanFromLookup = lookup(lookup); - - f.setAccessible(true); - try { - f.set(client, beanFromLookup); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } - } - } - - /** - * EJB spec requires that lookup and beanName attributes cannot be both - * present in the same @EJB. For those tests that specifically test lookup - * attribute, beanName value has to be indirectly specified in description - * attribute in the form: description="beanName=LookupBean" This method - * extracts the beanName value from description attribute of @EJB - */ - private String getBeanNameFromDescription(String description) { - String[] tokens = description.split("="); - String beanName = ""; - if (tokens.length == 2) { - beanName = tokens[1]; - logger.info("Got beanName indirectly from description: " + beanName); - } - return beanName; - } - - private void resolveTypeLevelInjections( - Class cls) { - EJBs ejbs = cls.getAnnotation(EJBs.class); - EJB ejb = cls.getAnnotation(EJB.class); - - if (ejbs != null) { - for (EJB b : ejbs.value()) { - resolveTypeLevelEJB(b); - } - } - if (ejb != null) { - resolveTypeLevelEJB(ejb); - } - } - - private void resolveTypeLevelEJB(EJB b) { - // For type-level @EJB injections, all 3 attr are required - logger.info("Resolving type-level @EJB injection: " + b); - - Class beanInterface = b.beanInterface(); - String beanName = b.beanName(); - String name = b.name(); - String lookup = b.lookup(); // should be very rare to use lookup attr in - // type-level injections - - if (lookup.length() > 0 && lookup.startsWith("java:global")) { - logger.info("Got @EJB.lookup " + lookup); - } else { - lookup = createGlobalJNDIName(beanInterface, beanName); - } - - client.getJndiMapping().put(createJavaEELookupName(name), lookup); - } - - private String createJavaEELookupName(String name) { - return "java:comp/env/" + name; - } - - // java:global[/]//[!] - private String createGlobalJNDIName(Class beanInterface, String beanName) { - String result = EJBLiteClientIF.JAVA_GLOBAL_PREFIX; - result += client.getModuleName() + "/" + beanName + "!" - + beanInterface.getName(); - - logger.info("Constructed portable global jndi name: " + result); - return result; - } - - private Object lookup(String lookupName) { - Object result = null; - javax.naming.Context context = container.getContext(); - try { - result = context.lookup(lookupName); - } catch (javax.naming.NamingException e) { - throw new RuntimeException(e); - } - - return result; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java deleted file mode 100644 index a822ca7641..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.ejbliteshare; - -import java.io.File; -import java.util.Map; - -import jakarta.ejb.embeddable.EJBContainer; - -public interface EJBLiteClientIF { - public static final String TEST_PASSED = "[TEST PASSED] "; - - public static final String TEST_FAILED = "[TEST FAILED] "; - - public static final String JAVA_GLOBAL_PREFIX = "java:global/"; - - public static final String JAVA_COMP_ENV_PREFIX = "java:comp/env/"; - - public static final String ADDITIONAL_MODULES_KEY = "-additionalModule"; - - public static final String EJBEMBED_JAR_NAME_BASE = "ejbembed_vehicle_ejb"; - - public void setInjectionSupported(Boolean injectionSupported); - - public Boolean getInjectionSupported(); - - public void runTestInVehicle(); - - public String getTestName(); - - public void setTestName(String testName); - - public String getStatus(); - - public String getReason(); - - public String getModuleName(); - - public void setModuleName(String mn); - - public Map getJndiMapping(); - - public EJBContainer getContainer(); - - public void setContainer(EJBContainer container); - - public javax.naming.Context getContext(); - - public void setAdditionalModules(File[] additionalModules); - - public void setContext(javax.naming.Context context); - - /** - * Subclass client can override this method to customize the container - * creation. The default implementation returns null in EJBLiteClientBase. - * Since the method must be invoked prior to container creation, way ahead of - * actual test method, this customization is only possible at test client - * level, not at test method level. - */ - public Map getContainerInitProperties(); - - /** - * This method is called by test client to set context ClassLoader to include - * additional classes and ejb modules. This method is called prior to creating - * EJBContainer. The default implementation does nothing and makes no change - * to the context ClassLoader in the current thread. Subclass client may - * choose to override this method to provide for additional ejb modules and - * classes. - */ - public void setContextClassLoader(); -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java deleted file mode 100644 index a57494b88e..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.tests.common.vehicle.ejbliteshare; - -import static com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.TEST_PASSED; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.Properties; -import java.util.logging.Logger; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.BASE64Encoder; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; - -public class EJBLiteSecuredWebVehicleRunner implements VehicleRunnable { - private final static Logger logger = Logger - .getLogger(EJBLiteSecuredWebVehicleRunner.class.getName()); - - protected String getServletPath(String vehicle) { - return "/" + vehicle + "_vehicle.jsp"; - } - - public Status run(String[] argv, Properties p) { - String testName = TestUtil.getProperty(p, "testName"); - String vehicle = TestUtil.getProperty(p, "vehicle"); - String contextRoot = TestUtil.getProperty(p, "vehicle_archive_name"); - String queryString = "?testName=" + testName; - String requestUrl = "/" + contextRoot + getServletPath(vehicle) - + queryString; - - String username = TestUtil.getProperty(p, "user"); - String password = TestUtil.getProperty(p, "password"); - - TSURL ctsURL = new TSURL(); - URL url = null; - HttpURLConnection connection = null; - int statusCode = Status.NOT_RUN; - String response = null; - try { - url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), - Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), requestUrl); - - // Encode authData - String authData = username + ":" + password; - - BASE64Encoder encoder = new BASE64Encoder(); - - String encodedAuthData = encoder.encode(authData.getBytes()); - - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setUseCaches(false); - - // set request property - connection.setRequestProperty("Authorization", - "Basic " + encodedAuthData.trim()); - - logger.info("Connecting " + url.toExternalForm()); - connection.connect(); - - response = TestUtil.getResponse(connection).trim(); - if (response.indexOf(TEST_PASSED) >= 0) { - statusCode = Status.PASSED; - } else { - statusCode = Status.FAILED; - } - } catch (IOException e) { - statusCode = Status.FAILED; - response = "Failed to connect to the test webapp." - + TestUtil.printStackTraceToString(e); - } - return new ReasonableStatus(statusCode, response); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java deleted file mode 100644 index 860d3cc236..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.vehicle.ejbliteshare; - -import static com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.TEST_PASSED; - -import java.io.IOException; -import java.net.HttpURLConnection; -import java.net.URL; -import java.util.Properties; -import java.util.logging.Logger; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; - -public class EJBLiteWebVehicleRunner implements VehicleRunnable { - private final static Logger logger = Logger - .getLogger(EJBLiteWebVehicleRunner.class.getName()); - - protected String getServletPath(String vehicle) { - return "/" + vehicle + "_vehicle.jsp"; - } - - protected String getQueryString(Properties p) { - return "?testName=" + TestUtil.getProperty(p, "testName"); - } - - public Status run(String[] argv, Properties p) { - String vehicle = TestUtil.getProperty(p, "vehicle"); - String contextRoot = TestUtil.getProperty(p, "vehicle_archive_name"); - String requestUrl = "/" + contextRoot + getServletPath(vehicle) - + getQueryString(p); - - TSURL ctsURL = new TSURL(); - URL url = null; - HttpURLConnection connection = null; - int statusCode = Status.NOT_RUN; - String response = null; - try { - url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), - Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), requestUrl); - - connection = (HttpURLConnection) url.openConnection(); - connection.setRequestMethod("GET"); - connection.setUseCaches(false); - logger.info("Connecting " + url.toExternalForm()); - connection.connect(); - - response = TestUtil.getResponse(connection).trim(); - if (response.indexOf(TEST_PASSED) >= 0) { - statusCode = Status.PASSED; - } else { - statusCode = Status.FAILED; - } - } catch (IOException e) { - statusCode = Status.FAILED; - response = "Failed to connect to the test webapp." - + TestUtil.printStackTraceToString(e); - } - return new ReasonableStatus(statusCode, response); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java deleted file mode 100644 index 5f506b44c2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.vehicle.ejbliteshare; - -import com.sun.ts.lib.harness.Status; - -/** - * This class is used to work around javatest bugs/features: javatest Status - * constructor replaces all unprintable chars with one single space, making any - * multi-line reason unreadable; javatest Status does not have an overrideable - * setReason method. - */ -public class ReasonableStatus extends Status { - private String reason; - - public ReasonableStatus(int c, String r) { - super(c, ""); - reason = r; - - // print the status reason to console, regardless of same.jvm value. - // If it were printed inside exit() method, it will not be called when - // same.jvm is enabled (e.g., with -Dsame.jvm=true from command line) - System.out.println(reason); - } - - @Override - public String getReason() { - return reason; - } - - // In same.jvm mode, when this method is overridden, the test status is - // printed - // three times in jtr report file. When not overridden, only the status - // withou - // detailed reason (only pass/fail/notrun, etc) is included in jtr file. - // - // It does not affect different jvm mode. - // It does not affect test output on the console. - // @Override - // public String toString() { - // return String.format("%s; %s", super.toString(), reason); - // } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java deleted file mode 100644 index 80ad7217d1..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.vehicle.pmservlet; - -import javax.naming.Context; -import javax.naming.InitialContext; -import javax.naming.NamingException; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManager; -import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManagerFactory; -import com.sun.ts.tests.common.vehicle.ejb3share.UserTransactionWrapper; -import com.sun.ts.tests.common.vehicle.servlet.ServletVehicle; - -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceContext; -import jakarta.persistence.PersistenceContexts; -import jakarta.persistence.PersistenceUnit; -import jakarta.transaction.UserTransaction; - -import java.io.PrintWriter; -import java.io.StringWriter; - -@PersistenceContexts({ - @PersistenceContext(name = "persistence/CTS-EM", unitName = "CTS-EM"), - @PersistenceContext(name = "persistence/CTS-EM2", unitName = "CTS-EM2") }) -public class PMServletVehicle extends ServletVehicle { - - private static final String EM_LOOKUP_NAME = "java:comp/env/persistence/CTS-EM"; - - private UserTransaction ut; - - @PersistenceUnit(unitName = "CTS-EM") - EntityManagerFactory emf; - - public EntityTransaction getEntityTransaction() { - try { - TSNamingContext nctx = new TSNamingContext(); - ut = (UserTransaction) nctx.lookup("java:comp/UserTransaction"); - } catch (Exception e) { - TestUtil.logMsg("Naming service exception: " + e.getMessage()); - e.printStackTrace(); - } - return new UserTransactionWrapper(ut); - } - - private Object lookup(String lookupName) throws IllegalStateException { - Object result = null; - try { - Context context = new InitialContext(); - result = context.lookup(lookupName); - } catch (NamingException e) { - throw new IllegalStateException("Failed to lookup:" + lookupName, e); - } - return result; - } - - protected RemoteStatus runTest() { - properties.put("persistence.unit.name", "CTS-EM"); - - RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); - - try { - // call EETest impl's run method - if (testObj instanceof UseEntityManager) { - - // lookup EntityManager for each http request, - // so it's not shared by multiple threads - EntityManager em = (EntityManager) lookup(EM_LOOKUP_NAME); - - if (em == null) { - throw new IllegalStateException("EntityManager is null"); - } - UseEntityManager client2 = (UseEntityManager) testObj; - EntityTransaction et = getEntityTransaction(); - client2.setEntityManager(em); - client2.setEntityTransaction(et); - client2.setInContainer(true); - } - - if (testObj instanceof UseEntityManagerFactory) { - - if (emf == null) { - throw new IllegalStateException("EntityManagerFactory is null"); - } - UseEntityManagerFactory client2 = (UseEntityManagerFactory) testObj; - client2.setEntityManagerFactory(emf); - } - - sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); - - if (sTestStatus.getType() == Status.PASSED) { - System.out.println("Test running in pmservlet vehicle passed"); - } else { - System.out.println("Test running in pmservlet vehicle failed"); - } - } catch (Throwable e) { - StringBuilder sb = new StringBuilder(); - sb.append("Test running in pmservlet vehicle failed: "); - StringWriter sw = new StringWriter(); - e.printStackTrace(new PrintWriter(sw)); - sb.append(sw.toString()); - sTestStatus = new RemoteStatus(Status.failed(sb.toString())); - TestUtil.logErr("Test running in pmservlet vehicle failed", e); - } - - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java deleted file mode 100644 index 2f69de3ae2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.vehicle.puservlet; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManager; -import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManagerFactory; -import com.sun.ts.tests.common.vehicle.servlet.ServletVehicle; - -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceUnit; - -public class PUServletVehicle extends ServletVehicle { - - @PersistenceUnit(unitName = "CTS-EM-NOTX") - EntityManagerFactory emf; - - protected RemoteStatus runTest() { - RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); - properties.put("persistence.unit.name", "CTS-EM-NOTX"); - - EntityManager em = null; - try { - // call EETest impl's run method - if (testObj instanceof UseEntityManager) { - em = emf.createEntityManager(); - if (em == null) { - throw new IllegalStateException("EntityManager is null"); - } - UseEntityManager client2 = (UseEntityManager) testObj; - EntityTransaction et = em.getTransaction(); - client2.setEntityManager(em); - client2.setEntityTransaction(et); - client2.setInContainer(true); - } - - if (testObj instanceof UseEntityManagerFactory) { - if (emf == null) { - throw new IllegalStateException("EntityManagerFactory is null"); - } - UseEntityManagerFactory client2 = (UseEntityManagerFactory) testObj; - client2.setEntityManagerFactory(emf); - } - - sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); - - if (sTestStatus.getType() == Status.PASSED) { - System.out - .println("Test running in PersistenceUnit servlet vehicle passed"); - } else { - System.out - .println("Test running in PersistenceUnit servlet vehicle failed"); - } - } catch (Throwable e) { - sTestStatus = new RemoteStatus(Status - .failed("Test running in PersistenceUnit servlet vehicle failed")); - e.printStackTrace(); - } finally { - if (em != null) { - if (em.isOpen()) - em.close(); - } - } - - return sTestStatus; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java deleted file mode 100644 index af4abdacc7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.stateful3; - -import java.util.Properties; - -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.persistence.EntityManager; -import jakarta.persistence.EntityManagerFactory; -import jakarta.persistence.EntityTransaction; -import jakarta.persistence.PersistenceContext; -import jakarta.persistence.PersistenceUnit; - -@Stateful(name = "Stateful3VehicleBean") -@Remote({ Stateful3VehicleIF.class }) -public class Stateful3VehicleBean - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean - implements Stateful3VehicleIF, java.io.Serializable { - - @PersistenceUnit(name = "STATEFUL3EMF", unitName = "CTS-EM") - EntityManagerFactory emf; - - public Stateful3VehicleBean() { - super(); - } - - protected String getVehicleType() { - return STATEFUL3; - } - - @PostConstruct - public void init() { - try { - System.out.println("In PostContruct"); - EntityManagerFactory emf = (EntityManagerFactory) sessionContext - .lookup("STATEFUL3EMF"); - setEntityManagerFactory(emf); - } catch (Exception e) { - System.out.println("ERROR: " - + " In PostConstruct: Exception caught while setting EntityManagerFactory"); - e.printStackTrace(); - } - } - - // ================== business methods ==================================== - @Remove - public RemoteStatus runTest(String[] args, Properties props) { - RemoteStatus retValue; - props.put("persistence.unit.name", "CTS-EM"); - retValue = super.runTest(args, props); - return retValue; - } - ///////////////////////////////////////////////////////////////////////// - - @Resource - public void setSessionContext(SessionContext sessionContext) { - this.sessionContext = sessionContext; - } - - @PersistenceContext(unitName = "CTS-EM") - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } - - public void setEntityManagerFactory(EntityManagerFactory emf) { - this.entityManagerFactory = emf; - } - - protected EntityTransaction getEntityTransaction() { - return new NoopTransactionWrapper(); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java b/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java deleted file mode 100644 index 40e588d28d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.vehicle.web; - -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.vehicle.VehicleRunnable; - -public class WebVehicleRunner implements VehicleRunnable { - - protected String sVehicle = ""; - - protected Status sTestStatus = Status.passed(""); - - String urlSuffix = ""; - - Status sServletStatus = Status.passed(""); - - Status sJspStatus = Status.passed(""); - - String sVehicleArchiveName = ""; - - String contextRootPrefix; - - String[] argv; - - Properties p; - - public Status run(String[] argv, Properties p) { - this.argv = argv; - this.p = p; - sVehicle = TestUtil.getProperty(p, "vehicle"); - - // use this name for the context root or jndi name to eliminate - // naming conflicts for apps deployed at the same time - sVehicleArchiveName = TestUtil.getProperty(p, "vehicle_archive_name"); - - if (sVehicleArchiveName.indexOf("_vehicles") != -1) { - contextRootPrefix = sVehicleArchiveName.substring(0, - sVehicleArchiveName.indexOf("_vehicles") + 1) + sVehicle - + "_vehicle_web"; - } else { - if (sVehicleArchiveName.endsWith("_web")) { - contextRootPrefix = sVehicleArchiveName; - } else { - contextRootPrefix = sVehicleArchiveName + "_web"; - } - } - - // default urlSuffix - urlSuffix = "/" + contextRootPrefix + "/" + sVehicle + "_vehicle"; - - return run(); - }// run - - protected Status run() { - if (sVehicle.equalsIgnoreCase("web")) { - // run in a servlet - urlSuffix = "/" + contextRootPrefix + "/servlet_vehicle"; - sServletStatus = runWebVehicleTest("servlet"); - - // run in a Jsp - urlSuffix = "/" + contextRootPrefix + "/jsp_vehicle"; - sJspStatus = runWebVehicleTest("jsp"); - - TestUtil.logMsg("Test: returning from running in web vehicles"); - } - - if (sServletStatus.isPassed() && sJspStatus.isPassed()) { - sTestStatus = Status.passed("Test passed in a servlet and in a jsp"); - } else if (sServletStatus.isFailed() && sServletStatus.isFailed()) { - sTestStatus = Status.failed("Test failed in a servlet and in a jsp"); - } else if (sJspStatus.isFailed()) { - sTestStatus = Status - .failed("Test passed in a jsp but failed in a servlet"); - } else { - sTestStatus = Status - .failed("Test passed in a servlet but failed in a jsp"); - } - return sTestStatus; - } - - protected Status runWebVehicleTest(String vehicle) { - URLConnection connection = null; - URL url = null; - ObjectOutputStream objOut = null; - ObjectInputStream objIn = null; - Status status; - - try { - if (vehicle.indexOf("jsp") != -1) { - urlSuffix += ".jsp"; - } - - TSURL ctsURL = new TSURL(); - url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), - Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), urlSuffix); - connection = url.openConnection(); - TestUtil.logMsg("Opened connection to " + url); - connection.setDoOutput(true); - connection.setDoInput(true); - connection.setUseCaches(false); - connection.setRequestProperty("Content-Type", - "java-internal/" + p.getClass().getName()); - // connection.connect(); - objOut = new ObjectOutputStream(connection.getOutputStream()); - TestUtil.logTrace("got outputstream"); - objOut.writeObject(p); - objOut.writeObject(argv); - TestUtil.logTrace("wrote objects to the " + vehicle + " vehicle"); - objOut.flush(); - objOut.close(); - objOut = null; - - // read the status when it comes back - if (vehicle.indexOf("jsp") != -1) { - Properties sprop = TestUtil.getResponseProperties(connection); - int type = Integer.parseInt(TestUtil.getProperty(sprop, "type")); - String reason = TestUtil.getProperty(sprop, "reason"); - status = new Status(type, reason); - } else { - objIn = new ObjectInputStream(connection.getInputStream()); - status = ((RemoteStatus) objIn.readObject()).toStatus(); - } - TestUtil.logMsg("Test status from a " + vehicle + ": " + status.getType() - + ":" + status.getReason()); - - } catch (MalformedURLException e) { - e.printStackTrace(); - status = Status.failed("Fatal: Improper URL"); - } catch (NumberFormatException e) { - e.printStackTrace(); - status = Status.failed( - "Please set an appropriate value for the property: webServerPort"); - } catch (IOException e) { - e.printStackTrace(); - status = Status.failed("Fatal: Problem with connection: " + e); - } catch (Exception e) { - e.printStackTrace(); - status = Status.failed( - "ServiceTest failed inside a " + vehicle + ": " + e.getMessage()); - } finally { - - if (objOut != null) { - try { - objOut.close(); - } catch (Exception e) { - } - } - - if (objIn != null) { - try { - objIn.close(); - } catch (Exception e) { - } - } - } - return status; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java b/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java deleted file mode 100644 index 36958f51ce..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.web; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; - -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -/** - * Provide a testing framework for a Servlet test. - * - * This class is intended to be extended by the actual Servlet test class that - * will define one or more test methods. This is why this class is tagged - * "abstract". - * - * This class shield the final Servlet class from Servlet life cycle and - * specific testing framework. - * - * @see com.sun.ts.tests.common.web.WebServer - */ -public abstract class ServletWrapper extends HttpServlet { - - /** Name of property used to send back test result to client */ - public static final String RESULT_PROP = "ctsWebTestResult"; - - public static final String TEST_NAME_PROP = "ctsWebTestName"; - - protected static TSNamingContext nctx = null; - - private Properties servletProps = null; - - public void init(ServletConfig config) throws ServletException { - super.init(config); - - try { - WebUtil.logTrace("[ServletWrapper] init()"); - WebUtil.logTrace("[ServletWrapper] Getting naming ctx..."); - nctx = new TSNamingContext(); - } catch (Exception e) { - WebUtil.logErr("[ServletWrapper] Cannot get Naming ctx", e); - throw new ServletException("Cannot initialize Servlet"); - } - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - - PrintWriter out = null; - - try { - WebUtil.logTrace("[ServletWrapper] doGet()"); - res.setContentType("text/plain"); - out = res.getWriter(); - servletProps.list(out); - } catch (Exception e) { - WebUtil.logErr("[ServletWrapper] Exception in doGet()", e); - if (null != out) { - e.printStackTrace(out); - } - } finally { - if (null != out) { - out.close(); - } - } - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - - WebUtil.logTrace("[ServletWrapper] doPost()"); - servletProps = WebUtil.executeTest(this, req); - doGet(req, res); - servletProps = null; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java b/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java deleted file mode 100644 index f7281c5412..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java +++ /dev/null @@ -1,196 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.web; - -import java.net.URL; -import java.net.URLConnection; -import java.util.Properties; - -import com.sun.ts.lib.porting.TSURL; -import com.sun.ts.lib.util.TestUtil; - -/** - * Facade class to ease client access to a TS test deployed in the Web - * container. Shield clients from underlying TS and HTPP indiosyncrasies. - */ -public class WebServer { - - protected static final String PROTOCOL = "http"; - - protected static final String WEB_HOST_PROP = "webServerHost"; - - protected static final String WEB_PORT_PROP = "webServerPort"; - - protected static final String RESULT_PROP = "ctsWebTestResult"; - - protected static final String TEST_NAME_PROP = "ctsWebTestName"; - - protected String host; - - protected int port; - - protected URL url; - - protected URLConnection conn; - - protected Properties props; - - /** Constructor */ - private WebServer(String hostName, int portNumber, Properties p) - throws IllegalArgumentException { - - if (null == hostName) { - throw new IllegalArgumentException("null host name!"); - } - - this.host = hostName; - this.port = portNumber; - this.props = p; - } - - /** - * Factory method to build a WebServer object from TS props parsing relevant - * properties. - */ - public static WebServer newInstance(Properties props) - throws IllegalArgumentException { - - String host; - String portValue; - String msg; - int port; - - if (null == props) { - msg = "null properties!"; - TestUtil.logErr("[TSTestURL] " + msg); - throw new IllegalArgumentException(msg); - } - - host = TestUtil.getProperty(props, WEB_HOST_PROP); - if (null == host || host.equals("")) { - msg = "Empty " + WEB_HOST_PROP + " property: " + host; - printConfigError(msg); - throw new IllegalArgumentException(msg); - } - - portValue = TestUtil.getProperty(props, WEB_PORT_PROP); - if (null == portValue || portValue.equals("")) { - msg = "Empty " + WEB_PORT_PROP + " property: " + portValue; - printConfigError(msg); - throw new IllegalArgumentException(msg); - } - - try { - port = Integer.parseInt(portValue); - } catch (Exception e) { - msg = "Invalid " + WEB_PORT_PROP + " property: '" + portValue + "' : " - + e.getMessage(); - printConfigError(msg); - throw new IllegalArgumentException(msg); - } - - return new WebServer(host, port, props); - } - - /** - * Call test 'testName' in web component deployed as 'webFile'. - * - * @param webFile - * file component (see java.net.URL) of the url the web component - * mapped to. - * - * @param testName - * Name of the test to run in this web component. - * - * @return true if test pass. false otherwise. - */ - public boolean test(String webFile, String testName) { - return (null != call(webFile, testName, this.props)); - } - - /** - * Call test 'testName' in web component deployed as 'webFile', passing 'args' - * as input parameters. - * - * @param webFile - * file component (see java.net.URL) of the url the web component - * mapped to. - * - * @param testName - * Name of the test to run in this web component. - * - * @param args - * input parameters in a Properties object. This object need at least - * to have valid TS harness logging properties; - * - * @return output parameters in a Properties object. Return null if a problem - * occured or test failed. - */ - public Properties call(String webFile, String testName, Properties args) - throws IllegalArgumentException { - - URL url; - String status; - Properties results; - - if (null == args) { - throw new IllegalArgumentException("null args!"); - } - - try { - args.setProperty(TEST_NAME_PROP, testName); - - url = (new TSURL()).getURL(PROTOCOL, host, port, webFile); - conn = TestUtil.sendPostData(args, url); - TestUtil - .logMsg("Getting response from url connection: " + url.toString()); - - results = TestUtil.getResponseProperties(conn); - if (null == results) { - TestUtil.logErr("[TSTestURL] null response props!"); - return null; - } - - // Too verbose - TestUtil.list(results); - - /* Check whether test passed, return null if test failed */ - status = results.getProperty(RESULT_PROP); - if (!(Boolean.valueOf(status).booleanValue())) { - return null; - } - } catch (Exception e) { - TestUtil.logErr("Caught exception: " + e.getMessage()); - e.printStackTrace(); - return null; - } - - return results; - } - - /** Convenience method to print TS configuration error messages */ - protected static void printConfigError(String msg) { - TestUtil.logErr("[TSTestURL] " + msg); - TestUtil.logErr( - "Please check you that " + WEB_HOST_PROP + " and " + WEB_PORT_PROP - + " properties are set correctly " + "in you ts.jte file"); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java b/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java deleted file mode 100644 index f7d0ca5ac9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.web; - -import java.lang.reflect.Method; -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServletRequest; - -/** - * Factorize code used by JSP and Servlets. - * - * @see com.sun.ts.tests.common.web.ServletWrapper - * @see com.sun.ts.common.util.TestUtil - */ -public class WebUtil { - - /** Name of property used to send back test result to client */ - public static final String RESULT_PROP = "ctsWebTestResult"; - - /** Name of the property used to get the test method name */ - public static final String TEST_NAME_PROP = "ctsWebTestName"; - - public static void logMsg(String msg) { - TestUtil.logMsg(msg); - System.out.println(msg); - } - - public static void logTrace(String msg) { - TestUtil.logTrace(msg); - System.out.println(msg); - } - - public static void logErr(String msg) { - TestUtil.logErr(msg); - System.out.println(msg); - } - - public static void logErr(String msg, Exception e) { - TestUtil.logErr(msg, e); - System.out.println(msg + " : " + e); - e.printStackTrace(); - } - - /** - * Use information provided in a HTTPRequest to execute a test method on a - * testDriver object. The test method is "discovered" at runtime using the - * reflection API. The testDriver could be any java object. - */ - public static Properties executeTest(Object testDriver, HttpServletRequest req) throws ServletException { - - Boolean pass = Boolean.FALSE; - Properties webProps = null; - Class testDriverClass; - String testName; - Method testMethod; - Class params[] = { Properties.class }; - Object args[] = new Object[1]; - - logTrace("[WebUtil] executeTestOnInstance()"); - - /* - * Get harness properties and initialize logging. - */ - try { - logTrace("[WebUtil] Retrieving harness props..."); - - webProps = new Properties(); - Enumeration names = req.getParameterNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - String value = req.getParameter(name); - webProps.setProperty(name, value); - } - - logTrace("[WebUtil] Initializing Remote Logging..."); - TestUtil.init(webProps); - } catch (Exception e) { - System.out.println("Exception: " + e); - e.printStackTrace(); - throw new ServletException("Cannot Initialize CST Logging"); - } - - /* - * Get name of the test method. - */ - try { - logTrace("[WebUtil] Getting test name..."); - testName = TestUtil.getProperty(webProps, TEST_NAME_PROP); - } catch (Exception e) { - logErr("[WebUtil] Unexpected exception", e); - throw new ServletException("Cannot get test name"); - } - if (null == testName || testName.equals("")) { - logErr("[WebUtil] Invalid test name : " + testName); - throw new ServletException("Invalid test name"); - } - - /* - * Invoke test method on current instance. - */ - try { - logTrace("[WebUtil] Invoke test '" + testName + "'"); - testDriverClass = testDriver.getClass(); - testMethod = testDriverClass.getMethod(testName, params); - args[0] = webProps; - pass = (Boolean) testMethod.invoke(testDriver, args); - } catch (NoSuchMethodException e) { - logErr("[WebUtil] Cannot find method '" + testName - + "' make sure it is defined in sub-class", e); - throw new ServletException("Test method is not defined"); - } catch (java.lang.reflect.InvocationTargetException e) { - logErr("[WebUtil] InvocationTargetException '" + testName + "' caused by " - + e.getTargetException()); - throw new ServletException("Test method is not defined"); - } catch (Exception e) { - logErr("[WebUtil] Unexpected exception", e); - throw new ServletException("Cannot Invoke test method"); - } - - /* - * Set test result and send all properties back to client. - */ - webProps.setProperty(RESULT_PROP, pass.toString()); - - return webProps; - } - - /** - * Convert Java Properties to a String, as expected by on the client side - * (WebServer) - */ - public static String propsToString(Properties props) { - StringBuffer sb = new StringBuffer(1000); - Enumeration keys; - String name; - - if (null == props) { - throw new IllegalArgumentException("null props!"); - } - - keys = props.keys(); - while (keys.hasMoreElements()) { - name = (String) keys.nextElement(); - sb.append(name + "=" + props.getProperty(name) + "\n"); - } - - return sb.toString(); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java b/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java deleted file mode 100644 index 634153d1f9..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java +++ /dev/null @@ -1,602 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient; - -import java.util.Enumeration; -import java.util.Properties; -import java.util.logging.Logger; -import java.util.logging.Level; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TestUtil; -import org.apache.commons.httpclient.HttpState; - -import com.sun.ts.tests.common.webclient.http.HttpRequest; - -/** - *
- * Provides base test initialization and runtime
- * logic into a common class.
- * All test areas will need to extend this class
- * to provided area specific functionality needed for
- * that particular technology.
- * 
- */ -public abstract class BaseUrlClient extends EETest { - private static final Logger LOGGER = Logger.getLogger(BaseUrlClient.class.getName()); - - /** - * Properties parameters - */ - public Properties _props; - - /** - * 401 - Unauthorized - */ - protected static final String UNAUTHORIZED = "401"; - - /** - * 403 - Forbidden - */ - protected static final String FORBIDDEN = "403"; - - /** - * 404 - not found - */ - protected static final String NOT_FOUND = "404"; - - /** - * 200 - ok - */ - protected static final String OK = "200"; - - /** - * 201 - created - */ - protected static final String CREATED = "201"; - - /** - * 500 - internal server error - */ - protected static final String INTERNAL_SERVER_ERROR = "500"; - - /** - * 503 - service unavailable - */ - protected static final String SERVICE_UNAVAILABLE = "503"; - - /** - * 100 - continue - */ - protected static final String CONTINUE = "100"; - - /** - * 302 - moved temporarily - */ - protected static final String MOVED_TEMPORARY = "302"; - - /** - * 410 - GONE - */ - protected static final String GONE = "410"; - - /** - * 411 - length required - */ - protected static final String LENGTH_REQUIRED = "411"; - - /** - * TS Webserver host property - */ - protected static final String SERVLETHOSTPROP = "webServerHost"; - - /** - * TS Webserver port property - */ - protected static final String SERVLETPORTPROP = "webServerPort"; - - /** - * TS home property - */ - protected static final String TSHOME = "ts_home"; - - /** - * Test properties - */ - protected static final Properties TEST_PROPS = new Properties(); - - /** - * StatusCode property - */ - protected static final String STATUS_CODE = "status-code"; - - /** - * Reason-Phrase property - */ - protected static final String REASON_PHRASE = "reason-phrase"; - - /** - * Expected headers property - */ - protected static final String EXPECTED_HEADERS = "expected_headers"; - - /** - * Unexpected header property - */ - protected static final String UNEXPECTED_HEADERS = "unexpected_headers"; - - /** - * Expect response body property - */ - protected static final String EXPECT_RESPONSE_BODY = "expect_response_body"; - - /** - * Request property - */ - protected static final String REQUEST = "request"; - - /** - * Request headers property - */ - protected static final String REQUEST_HEADERS = "request_headers"; - - /** - * Goldenfile property - */ - protected static final String GOLDENFILE = "goldenfile"; - - /** - * Search string property - */ - protected static final String SEARCH_STRING = "search_string"; - - /** - * Search string case insensitive property - */ - protected static final String SEARCH_STRING_IGNORE_CASE = "search_string_ignore_case"; - - /** - * Basic Auth username - */ - protected static final String BASIC_AUTH_USER = "basic_auth_user"; - - /** - * Basic Auth password - */ - protected static final String BASIC_AUTH_PASSWD = "basic_auth_passwd"; - - /** - * Basic Auth realm - */ - protected static final String BASIC_AUTH_REALM = "basic_auth_realm"; - - /** - * Unordered search string property - */ - protected static final String UNORDERED_SEARCH_STRING = "unordered_search_string"; - - /** - * Content property - */ - protected static final String CONTENT = "content"; - - /** - * Test name property - */ - protected static final String TEST_NAME = "testname"; - - /** - * Response Match property - */ - protected static final String RESPONSE_MATCH = "response_match"; - - /** - * Unexpected response match property - */ - protected static final String UNEXPECTED_RESPONSE_MATCH = "unexpected_response_match"; - - /** - * Standard test property - */ - protected static final String STANDARD = "standard"; - - /** - * Ignore response body - */ - protected static final String IGNORE_BODY = "ignore_body"; - - /** - * Validation strategy - */ - protected static final String STRATEGY = "strategy"; - - /** - * Current test directory - */ - protected String TESTDIR = null; - - /** - * Goldenfile directory - */ - protected String GOLDENFILEDIR = "/src/web"; - - /** - * Default request method - */ - protected static final String GET = "GET "; - - /** - * HTTP 1.0 - */ - protected static final String HTTP10 = " HTTP/1.0"; - - /** - * HTTP 1.1 - */ - protected static final String HTTP11 = " HTTP/1.1"; - - /** - * Forward slash - */ - protected static final String SL = "/"; - - /** - * Goldenfile suffix - */ - protected static final String GF_SUFFIX = ".gf"; - - /** - * JSP suffix - */ - protected static final String JSP_SUFFIX = ".jsp"; - - /** - * Use any saved state - */ - protected static final String USE_SAVED_STATE = "use_saved_state"; - - /** - * Save current HTTP state. - */ - protected static final String SAVE_STATE = "save_state"; - - /** - * Ignore HTTP status codes - */ - protected static final String IGNORE_STATUS_CODE = "ignore_status_code"; - - /** - * Current test name - */ - protected String _testName = null; - - /** - * location of _tsHome - */ - protected String _tsHome = null; - - /** - * Context root of target tests - */ - protected String _contextRoot = null; - - /** - * General file/request URI for both gfiles and tests - */ - protected String _generalURI = null; - - /** - * Target webserver hostname - */ - protected String _hostname = null; - - /** - * Target webserver port - */ - protected int _port = 0; - - /** - * HttpState that may be used for multiple invocations requiring state. - */ - protected HttpState _state = null; - - /** - * Test case. - */ - protected WebTestCase _testCase = null; - - /** - * Use saved state. - */ - protected boolean _useSavedState = false; - - /** - * Save state. - */ - protected boolean _saveState = false; - - /** - * Follow redirect. - */ - protected String FOLLOW_REDIRECT = "follow_redirect"; - - protected boolean _redirect = false; - - /* - * public methods - * ======================================================================== - */ - - /** - * setTestDir sets the current test directory. - * - * @param testDir - * a String value - */ - public void setTestDir(String testDir) { - TESTDIR = testDir; - // setGoldenFileDir(testDir); - } - - public void setGeneralURI(String URI) { - _generalURI = URI; - } - - public void setContextRoot(String root) { - _contextRoot = root; - } - - public String getContextRoot() { - return _contextRoot; - } - - /** - * Sets the goldenfile directory - * - * @param goldenDir - * goldenfile directory based off test directory - */ - public void setGoldenFileDir(String goldenDir) { - GOLDENFILEDIR = goldenDir; - } - - /** - * setup is by the test harness to initialize the tests. - * - * @param args - * a String[] value - * @param p - * a Properties value - */ - public void setup(String[] args, Properties p) throws Exception { - _props = p; - String hostname = TestUtil.getProperty(p, SERVLETHOSTPROP).trim(); - String portnum = TestUtil.getProperty(p, SERVLETPORTPROP).trim(); - String tshome = TestUtil.getProperty(p, TSHOME).trim(); - - if (!isNullOrEmpty(hostname)) { - _hostname = hostname; - } else { - throw new Exception( - "[BaseUrlClient] 'webServerHost' was not set in the" + " ts.jte."); - } - - if (!isNullOrEmpty(portnum)) { - _port = Integer.parseInt(portnum); - } else { - throw new Exception( - "[BaseUrlClient] 'webServerPort' was not set in the" + " ts.jte."); - } - - if (!isNullOrEmpty(tshome)) { - _tsHome = tshome; - } else { - throw new Exception( - "[BaseUrlClient] 'tshome' was not set in the " + " ts.jte."); - } - - TestUtil.logMsg("[BaseUrlClient] Test setup OK"); - } - - /** - * cleanup is called by the test harness to cleanup after text - * execution - * - */ - public void cleanup() throws Exception { - TestUtil.logMsg( "[BaseUrlClient] Test cleanup OK"); - } - - /* - * protected methods - * ======================================================================== - */ - - /** - *
-   * Invokes a test based on the properties
-    * stored in TEST_PROPS.  Once the test has completed,
-    * the properties in TEST_PROPS will be cleared.
-   * 
- * - * @throws Exception - * If an error occurs during the test run - */ - protected void invoke() throws Exception { - try { - _testCase = new WebTestCase(); - setTestProperties(_testCase); - TestUtil.logTrace("[BaseUrlClient] EXECUTING"); - LOGGER.fine("[BaseUrlClient] EXECUTING"); - if (_useSavedState && _state != null) { - _testCase.getRequest().setState(_state); - } - if (_redirect != false) { - TestUtil.logTrace("##########Call setFollowRedirects"); - LOGGER.fine("##########Call setFollowRedirects"); - _testCase.getRequest().setFollowRedirects(_redirect); - } - _testCase.execute(); - TestUtil.logMsg(_testCase.getResponse().getResponseBodyAsString()); - if (_saveState) { - _state = _testCase.getResponse().getState(); - } - } catch (TestFailureException tfe) { - Throwable t = tfe.getRootCause(); - if (t != null) { - TestUtil.logErr("Root cause of Failure: " + t.getMessage(), t); - LOGGER.log(Level.WARNING, "Root cause of Failure: " + t.getMessage(), t); - } - throw new Exception("[BaseUrlClient] " + _testName - + " failed! Check output for cause of failure.", tfe); - } finally { - _useSavedState = false; - _saveState = false; - _redirect = false; - clearTestProperties(); - } - } - - /** - *
-   * Sets the appropriate test properties based
-    * on the values stored in TEST_PROPS
-   * 
- */ - protected void setTestProperties(WebTestCase testCase) { - HttpRequest req = testCase.getRequest(); - - // Check for a request object. If doesn't exist, then - // check for a REQUEST property and create the request object. - - if (req == null) { - String request = TEST_PROPS.getProperty(REQUEST); - - if (request.startsWith("GET") || request.startsWith("POST") - || request.startsWith("OPTIONS") || request.startsWith("PUT") - || request.startsWith("DELETE") || request.startsWith("HEAD") - || request.endsWith(HTTP10) || request.endsWith(HTTP11)) { - // user has overriden default request behavior - req = new HttpRequest(request, _hostname, _port); - testCase.setRequest(req); - } else { - req = new HttpRequest(getTSRequest(request), _hostname, _port); - testCase.setRequest(req); - } - } - - String key = null; - String value = null; - // proces the remainder of the properties - for (Enumeration e = TEST_PROPS.propertyNames(); e.hasMoreElements();) { - key = (String) e.nextElement(); - value = TEST_PROPS.getProperty(key); - - if (key.equals(STATUS_CODE)) { - testCase.setExpectedStatusCode(value); - } else if (key.equals(IGNORE_STATUS_CODE)) { - testCase.setExpectedStatusCode("-1"); - } else if (key.equals(REASON_PHRASE)) { - testCase.setExpectedReasonPhrase(value); - } else if (key.equals(EXPECTED_HEADERS)) { - testCase.addExpectedHeader(value); - } else if (key.equals(UNEXPECTED_HEADERS)) { - testCase.addUnexpectedHeader(value); - } else if (key.equals(SEARCH_STRING)) { - testCase.setResponseSearchString(value); - } else if (key.equals(SEARCH_STRING_IGNORE_CASE)) { - testCase.setResponseSearchStringIgnoreCase(value); - } else if (key.equals(STRATEGY)) { - testCase.setStrategy(value); - } else if (key.equals(GOLDENFILE)) { - StringBuffer sb = new StringBuffer(50); - sb.append(_tsHome).append(GOLDENFILEDIR); - sb.append(_generalURI).append(SL); - sb.append(value); - testCase.setGoldenFilePath(sb.toString()); - } else if (key.equals(CONTENT)) { - req.setContent(value); - } else if (key.equals(TEST_NAME)) { - // testName = TEST_PROPS.getProperty(key); - } else if (key.equals(RESPONSE_MATCH)) { - // setResponseMatch(TEST_PROPS.getProperty(key)); - } else if (key.equals(REQUEST_HEADERS)) { - req.addRequestHeader(TEST_PROPS.getProperty(key)); - } else if (key.equals(EXPECT_RESPONSE_BODY)) { - // FIXME - // setExpectResponseBody(false); - } else if (key.equals(IGNORE_BODY)) { - // FIXME - // setIgnoreResponseBody(true); - testCase.setGoldenFilePath(null); - } else if (key.equals(UNEXPECTED_RESPONSE_MATCH)) { - testCase.setUnexpectedResponseSearchString(value); - } else if (key.equals(UNORDERED_SEARCH_STRING)) { - testCase.setUnorderedSearchString(value); - } else if (key.equals(USE_SAVED_STATE)) { - _useSavedState = true; - } else if (key.equals(SAVE_STATE)) { - _saveState = true; - } else if (key.equals(FOLLOW_REDIRECT)) { - LOGGER.fine("##########Found redirect Property"); - _redirect = true; - } else if (key.equals(BASIC_AUTH_USER) || key.equals(BASIC_AUTH_PASSWD) - || key.equals(BASIC_AUTH_REALM)) { - - String user = TEST_PROPS.getProperty(BASIC_AUTH_USER); - String password = TEST_PROPS.getProperty(BASIC_AUTH_PASSWD); - String realm = TEST_PROPS.getProperty(BASIC_AUTH_REALM); - req.setAuthenticationCredentials(user, password, - HttpRequest.BASIC_AUTHENTICATION, realm); - } - } - } - - /* - * private methods - * ======================================================================== - */ - - private String getTSRequest(String request) { - StringBuffer finReq = new StringBuffer(50); - - finReq.append(GET).append(_contextRoot).append(SL).append(_generalURI); - finReq.append(SL).append(request).append(HTTP10); - - return finReq.toString(); - } - - /** - * Clears the contents of TEST_PROPS - */ - private void clearTestProperties() { - TEST_PROPS.clear(); - } - - private boolean isNullOrEmpty(String val) { - if (val == null || val.equals("")) { - return true; - } - return false; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java b/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java deleted file mode 100644 index bdad8c2f5c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java +++ /dev/null @@ -1,158 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient; - -import java.io.ByteArrayInputStream; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; - -import com.sun.ts.lib.util.TestUtil; - -/** - * A representation of a Goldenfile that may be used by a particular test case. - */ - -public class Goldenfile { - - /* - * Message to be returned if the goldenfile cannot be located. - */ - private static final byte[] NOTFOUND = "NO GOLDENFILE FOUND".getBytes(); - - /* - * Message to be returned if the goldenfile doesn't have read permissions. - */ - private static final byte[] NOPERM = "INSUFFICIENT PERMISSIONS".getBytes(); - - /* - * Goldenfile represented by this object. - */ - private File _file = null; - - /* - * Error message to return by public methods if the file is not found or the - * user has insufficient permissions. - */ - private byte[] _errMessage = null; - - /* - * Goldenfile length - */ - private long _length = 0L; - - /* - * Encoding - */ - private String _encoding = null; - - /** - * Creates a new GoldenFile based on the fully qualified filename provided. - * - * @param path - * Fully qualified file name - * @param encoding - * to use when reading the goldenfile - */ - public Goldenfile(String path, String encoding) { - _file = new File(path); - if (!_file.exists()) { - TestUtil.logTrace("[GoldenFile] Goldenfile: " + path + ", not found!"); - _errMessage = NOTFOUND; - _file = null; - } else if (!_file.canRead()) { - _errMessage = NOPERM; - _file = null; - } else { - _length = _file.length(); - _encoding = encoding; - } - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Returns the length of the Goldenfile. - * - * @return long length - */ - public long getLength() { - return _length; - } - - /** - * Returns the byte content of the specified goldenfile using the charset - * encoding specified in the response from the server. - * - * @return the goldenfile as a byte array - * @throws IOException - * if an error occurs processing the file. - */ - public byte[] getGoldenFileAsBytes() throws IOException { - if (_file != null) { - return getGoldenFileAsString().getBytes(); - } else { - return _errMessage; - } - } - - /** - * Retuns a string representation of the specified goldenfile using the - * charset encoding specified in the response from the server. - * - * @return the goldenfile as a String. - * @throws IOException - * if an error occurs processing the file. - */ - public String getGoldenFileAsString() throws IOException { - String gf = null; - if (_file != null) { - TestUtil.logTrace( - "[Goldenfile] Loading goldenfile using " + "encoding: " + _encoding); - FileInputStream in = new FileInputStream(_file); - gf = Util.getEncodedStringFromStream(in, _encoding); - in.close(); - } else { - gf = new String(_errMessage); - } - return gf; - } - - /** - * Returns the goldenfile as an InputStream using the charset encoding - * specified in the response from the server. - * - * @return goldenfile as an InputStream - * @throws IOException - * If an error occurs processing the file. - */ - public InputStream getGoldenFileAsStream() throws IOException { - if (_file != null) { - return new ByteArrayInputStream(getGoldenFileAsBytes()); - } else { - return new ByteArrayInputStream(_errMessage); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java b/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java deleted file mode 100644 index b36cc2f6eb..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient; - -/** - * Signifies a failure at some point during a test cycle. - */ -public class TestFailureException extends java.lang.Exception { - - private static final long serialVersionUID = -4651996590051941456L; - - /** - * Creates a new instance of TestFailureException without a - * detailed message. - */ - public TestFailureException() { - } - - /** - * Creates a new instance of TestFailureException containing the - * root cause of the test failure. - * - * @param t - * - root cause - */ - public TestFailureException(Throwable t) { - super(t); - } - - /** - * Creates a new instance of TestFailureException with the - * specified detail message. - * - * @param msg - * - the detail message. - */ - public TestFailureException(String msg) { - super(msg); - } - - /** - * Creates a new instance of TestFailureException with the - * specified detail message, and the root cause of the test failure - * - * @param msg - * - the detail message - * @param t - * - root cause - */ - public TestFailureException(String msg, Throwable t) { - super(msg, t); - } - - /** - * Returns, if any, the root cause of this Exception. - * - * @return the root cause of this exception, or null - */ - public Throwable getRootCause() { - return getCause(); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java b/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java deleted file mode 100644 index 435491611a..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import com.sun.ts.lib.util.TestUtil; - -/** - * This class represents a logic sequence for executing a series of test cases - * in a specific order. In this case, the execution order will be the same order - * that the test cases were added to the sequence. - * - * The TestSequence has the added benefit of managing state between - * the test invocations. - */ -public class TestSequence implements TestCase { - - private Map _testMap = null; - - private List _testNameList = null; - - private String _name = "DEFAULT"; - - private boolean _managed = false; - - /** Creates a new instance of TestSequence */ - public TestSequence() { - _testMap = new HashMap(); - _testNameList = new ArrayList(); - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Executes the test sequence. - * - * @throws TestFailureException - * if any test in the sequence fails. - */ - public void execute() throws TestFailureException { - - TestUtil.logTrace("[TestSequence] Beginning execution of sequence '" + _name - + "' containing '" + _testNameList.size() + "' test entities."); - - TestCase cse; - for (int i = 0, size = _testNameList.size(); i < size; i++) { - String testName = _testNameList.get(i); - TestUtil.logTrace("[TestSequence] Executing test case: " + testName); - cse = _testMap.get(testName); - if (_managed) { - cse.setState(cse.getState()); - } - cse.execute(); - TestUtil.logTrace("[TestSequence] Test case: " + testName + "complete."); - } - TestUtil.logTrace("[TestSequence] Sequence complete!"); - } - - /** - * enableStateManagement, when enabled, will cause the test - * sequence to manage state between test case invocations. By default, a test - * sequence will not manage state. - * - * @param value - * a value of true enables session management. - */ - public void enableStateManagement(boolean value) { - _managed = value; - } - - /** - * Returns a value indicating whether state management is enabled or not. - * - * @return boolean value indicating state management status - */ - public boolean isStateManagementEnabled() { - return _managed; - } - - /** - * Adds a test case to the sequence denoted by a unique identifier. - * - * @param identifier - * for this test case - * @param cs - * the test case - */ - public void addTestCase(String identifier, TestCase cs) { - _testMap.put(identifier, cs); - _testNameList.add(identifier); - } - - /** - * Removes a test case from the sequence. - * - * @param identifier - */ - public void removeTestCase(String identifier) { - _testMap.remove(identifier); - _testNameList.remove(identifier); - } - - /** - * Sets the name of this TestSequence. If not set, the default value is - * "DEFAULT". - * - * @param name - */ - public void setName(String name) { - _name = name; - } - - /** - * Returns the name of this TestSequence. - * - * @return sequence name - */ - public String getName() { - return _name; - } - - /** - * Sets the initial state for the test sequence to use when invoking test - * cases. - * - * @param state - * the initial state - */ - public void setState(Object state) { - } - - /** - * Returns the state of the sequence. Note: This value can differ depending on - * when it has been called in relation to when execute has been called. - * - * @return state of the sequence - */ - public Object getState() { - throw new UnsupportedOperationException(); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java b/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java deleted file mode 100644 index 5096d0f16b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java +++ /dev/null @@ -1,234 +0,0 @@ -/* - * The Apache Software License, Version 1.1 - * - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2000 The Apache Software Foundation. All rights - * Copyright (c) 2000 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - * - * Portions of this software are based upon public domain software - * originally written at the National Center for Supercomputing Applications, - * University of Illinois, Urbana-Champaign. - */ - -package com.sun.ts.tests.common.webclient; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; - -import com.sun.ts.lib.util.BASE64Encoder; - -public class Util { - - /** - * Zeros - */ - private static final String ZEROS = "00000000"; - - /** - * short pad size - */ - private static final int SHORTPADSIZE = 4; - - /** - * byte pad size - */ - private static final int BYTEPADSIZE = 2; - - /** Creates new Util */ - private Util() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * BASE64 encodes the provided string. - * - * @return BASE64 encoded string. - */ - public static String getBase64EncodedString(String value) { - BASE64Encoder encoder = new BASE64Encoder(); - return encoder.encode(value.getBytes()); - } - - /** - * Returns a charset encoded string based on the provided InputStream and - * charset encoding. - * - * @return encoding string - */ - public static String getEncodedStringFromStream(InputStream in, String enc) - throws IOException { - BufferedReader bin = new BufferedReader(new InputStreamReader(in, enc)); - StringBuffer sb = new StringBuffer(128); - for (int ch = bin.read(); ch != -1; ch = bin.read()) { - sb.append((char) ch); - } - return sb.toString(); - } - - /** - * getHexValue displays a formatted hex representation of the - * passed byte array. It also allows for only a specified offset and length of - * a particular array to be returned. - * - * @param bytes - * byte[] array to process. - * @param pos - * int specifies offset to begin processing. - * @param len - * int specifies the number of bytes to process. - * @return String formatted hex representation of processed - * array. - */ - public static String getHexValue(byte[] bytes, int pos, int len) { - StringBuffer outBuf = new StringBuffer(bytes.length * 2); - int bytesPerLine = 36; - int cnt = 1; - int groups = 4; - int curPos = pos; - int linePos = 1; - boolean displayOffset = true; - - while (len-- > 0) { - if (displayOffset) { - - outBuf.append("\n" + paddedHexString(pos, SHORTPADSIZE, true) + ": "); - displayOffset = false; - } - - outBuf.append(paddedHexString((int) bytes[pos], BYTEPADSIZE, false)); - linePos += 2; // Byte is padded to 2 characters - - if ((cnt % 4) == 0) { - outBuf.append(" "); - linePos++; - } - - // Now display the characters that are printable - if ((cnt % (groups * 4)) == 0) { - outBuf.append(" "); - - while (curPos <= pos) { - if (!Character.isWhitespace((char) bytes[curPos])) { - outBuf.append((char) bytes[curPos]); - } else { - outBuf.append("."); - } - - curPos++; - } - - curPos = pos + 1; - linePos = 1; - displayOffset = true; - } - - cnt++; - pos++; - } - - // pad out the line with spaces - while (linePos++ <= bytesPerLine) { - outBuf.append(" "); - } - - outBuf.append(" "); - // Now display the printable characters for the trailing bytes - while (curPos < pos) { - if (!Character.isWhitespace((char) bytes[curPos])) { - outBuf.append((char) bytes[curPos]); - } else { - outBuf.append("."); - } - - curPos++; - } - - return outBuf.toString(); - } - - /* - * private methods - * ======================================================================== - */ - - /** - * paddedHexString pads the passed value based on the specified - * wordsize and the value of the prefixFlag. - * - * @param val - * an int value - * @param wordsize - * an int value - * @param prefixFlag - * a boolean value - * @return a String value - */ - private static String paddedHexString(int val, int wordsize, - boolean prefixFlag) { - - String prefix = prefixFlag ? "0x" : ""; - String hexVal = Integer.toHexString(val); - - if (hexVal.length() > wordsize) - hexVal = hexVal.substring(hexVal.length() - wordsize); - - return (prefix + (wordsize > hexVal.length() - ? ZEROS.substring(0, wordsize - hexVal.length()) - : "") + hexVal); - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java b/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java deleted file mode 100644 index 762f2f7176..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient; - -import java.io.InputStream; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.StringTokenizer; -import java.util.logging.Logger; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.webclient.http.HttpRequest; -import com.sun.ts.tests.common.webclient.http.HttpResponse; -import com.sun.ts.tests.common.webclient.validation.ValidationFactory; -import com.sun.ts.tests.common.webclient.validation.ValidationStrategy; -import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HttpState; - - -/** - * A TestCase implementation for HTTP-based testing. This allows the user to set - * criteria for test success which will be compared against the response from - * the server. - */ -public class WebTestCase implements TestCase { - - private static final Logger LOGGER = Logger.getLogger(WebTestCase.class.getName()); - - /** - * Tokenized response validation strategy - */ - public static final String TOKENIZED_STRATEGY = "com.sun.ts.tests.common.webclient.validation.TokenizedValidator"; - - /** - * Whitespace response validation strategy - */ - public static final String WHITESPACE_STRATEGY = "com.sun.ts.tests.common.webclient.validation.WhitespaceValidator"; - - /** - * The request for this case. - */ - private HttpRequest _request = null; - - /** - * The server's response. - */ - private HttpResponse _response = null; - - // use HttpMethod instances to store test - // case headers that are expected or not - // expected. - - /** - * Storage for headers that are expected in the response - */ - private Map _expected = null; - - /** - * Storage for headers that are not expected in the response - */ - private Map _unexpected = null; - - /** - * Expected response status code. - */ - private String _statusCode = null; - - /** - * Expected response reason phrase. - */ - private String _reasonPhrase = null; - - /** - * Path to goldenfile. - */ - private String _goldenfilePath = null; - - private InputStream _goldenfileStream = null; - - /** - * A List of strings that will be searched for in the response in the order - * they appear in the list. - */ - private List _searchStrings = null; - - /** - * A List of case insensitive strings that will be searched for in the - * response in the order they appear in the list. - */ - private List _searchStringsNoCase = null; - - /** - * A List of strings that will be search for in the response with no attention - * paid to the order they appear. - */ - private List _unorderedSearchStrings = null; - - /** - * A List of strings that should not be in the server's response. - */ - private List _uSearchStrings = null; - - /** - * Indicates whether a response body should be expected or not. - */ - private boolean _expectResponseBody = true; - - /** - * Strategy to use when validating the test case against the server's - * response. - */ - private ValidationStrategy _strategy = null; - - /** - * Logical name for test case. - */ - private String _name = "Test Case"; - - /** - * Creates a new instance of WebTestCase By default, a new WebTestCase - * instance will use the TokenizedValidator to verify the response with the - * configured properties of the test case. - */ - public WebTestCase() { - _strategy = ValidationFactory.getInstance(TOKENIZED_STRATEGY); - } - - /* - * public methods - * ======================================================================== - */ - /** - * Executes the test case. - * - * @throws TestFailureException - * if the test fails for any reason. - * @throws IllegalStateException - * if no request was configured or if no Validator is available at - * runtime. - */ - public void execute() throws TestFailureException { - - // If no request was created, we can't run. - if (_request == null) { - throw new IllegalStateException("[FATAL] HttpRequest is null."); - } - - // If no stragey instance is available (strange, but has happened), - // fail. - if (_strategy == null) { - throw new IllegalStateException("[FATAL] No Validator available."); - } - - try { - _response = _request.execute(); - } catch (Throwable t) { - String message = t.getMessage(); - throw new TestFailureException("[FATAL] Unexpected failure during " - + "test execution." + (message == null ? t.toString() : message), t); - } - - // Validate this test case instance - if (!_strategy.validate(this)) { - throw new TestFailureException("Test FAILED!"); - } - - } - - /** - * Sets the status code to be expected in the response from the server, i.e. - * 500 or 404, etc. - * - * @param statusCode - * the expected status code - */ - public void setExpectedStatusCode(String statusCode) { - _statusCode = statusCode; - } - - /** - * Sets the reason phrase to be expected in the response from the server. - * - * @param reasonPhrase - * the expected reason-phrase - */ - public void setExpectedReasonPhrase(String reasonPhrase) { - _reasonPhrase = reasonPhrase; - } - - /** - * Adds a header that is to be expected in the response from the server. - * - * @param header - * in the format of : (test:foo) - */ - public void addExpectedHeader(String header) { - if (_expected == null) { - _expected = new HashMap<>(); - } - addHeader(_expected, header); - } - - /** - * Sets the path to the goldenfile the test case should use. - * - * @param gfPath - * a fully qualified path including filename. - */ - public void setGoldenFilePath(String gfPath) { - _goldenfilePath = gfPath; - } - - - /** - * Sets the InputStream of the goldenfile the test case should use. - * - * @param in - * an InputStream value of the goldenfile. - */ - public void setGoldenFileStream(InputStream in) { - _goldenfileStream = in; - } - - /** - * Sets the request that should be dispatched by this test case. - * - * @param request - * the HTTP request used for this test case - */ - public void setRequest(HttpRequest request) { - _request = request; - } - - /** - * Adds a header that is should not be in the server's response. - * - * @param header - * in the format of : (test:foo) - */ - public void addUnexpectedHeader(String header) { - if (_unexpected == null) { - _unexpected = new HashMap(); - } - addHeader(_unexpected, header); - } - - /** - * Enables/Disables an assertion that a response body is present. - * - * @param value - * a value of true will enable the assertion. - */ - public void setAssertNoResponseBody(boolean value) { - } - - /** - * Sets a string that will be scanned for and expected in the response body - * from the server. - * - * If multiple search strings are required, one can either call this method - * for each string, or pass in one string with pipe | delimiting - * the individual search strings within the large string. - * - * @param searchString - * a string expected in the server's response body - */ - public void setResponseSearchString(String searchString) { - if (_searchStrings == null) { - _searchStrings = new ArrayList(); - } - addSearchStrings(_searchStrings, searchString); - } - - /** - * Sets a string that will be scanned for and expected in the response body - * from the server. - * - * If multiple search strings are required, one can either call this method - * for each string, or pass in one string with pipe | delimiting - * the individual search strings within the large string. - * - * @param searchString - * a case insensitive string expected in the server's response body - */ - public void setResponseSearchStringIgnoreCase(String searchString) { - if (_searchStringsNoCase == null) { - _searchStringsNoCase = new ArrayList(); - } - addSearchStrings(_searchStringsNoCase, searchString); - } - - /** - * Sets a string that will be scanned for and should not be present in the - * response body from the server. - * - * If multiple search strings are required, one can either call this method - * for each string, or pass in one string with pipe | delimiting - * the individual search strings within the large string. - * - * @param searchString - * a string that is not expected in the server's response body - */ - public void setUnexpectedResponseSearchString(String searchString) { - if (_uSearchStrings == null) { - _uSearchStrings = new ArrayList(); - } - addSearchStrings(_uSearchStrings, searchString); - } - - /** - * Sets a string or series of strings that will be searched for in the - * response. If multiple search strings are required, one can either call this - * method for each string, or pass in one string with pipe | - * delimiting the individual search strings within the large string. - * - * @param searchString - * a string that is not expected in the server's response body - */ - public void setUnorderedSearchString(String searchString) { - if (_unorderedSearchStrings == null) { - _unorderedSearchStrings = new ArrayList(); - } - addSearchStrings(_unorderedSearchStrings, searchString); - } - - /** - * Returns the list of search strings. - * - * @return the list of search strings. - */ - public List getUnorderedSearchStrings() { - return _unorderedSearchStrings; - } - - /** - * Returns the response for this particular test case. - * - * @return an HttpResponse object - */ - public HttpResponse getResponse() { - return _response; - } - - /** - * Returns an array of Header objects that are expected to be found in the - * responst. - * - * @return an array of headers - */ - public Header[] getExpectedHeaders() { - if (_expected == null) { - return null; - } - return _expected.values().toArray(new Header[_expected.size()]); - } - - /** - * Returns an array of Header objects that are not expected to be found in the - * responst. - * - * @return an array of headers - */ - public Header[] getUnexpectedHeaders() { - if (_unexpected == null) { - return null; - } - return _unexpected.values().toArray(new Header[_unexpected.size()]); - } - - /** - * Returns the status code expected to be found in the server's response - * - * @return status code - */ - public String getStatusCode() { - return _statusCode; - } - - /** - * Returns the reason phrase that is expected to be found in the server's - * response. - * - * @return reason phrase - */ - public String getReasonPhrase() { - return _reasonPhrase; - } - - /** - * Returns the configured list of strings that will be used when scanning the - * server's response. - * - * @return list of Strings - */ - public List getSearchStrings() { - if (_searchStrings == null) { - return null; - } - return _searchStrings; - } - - /** - * Returns the configured list of strings that will be used when scanning the - * server's response. - * - * @return list of case insensitive Strings - */ - public List getSearchStringsNoCase() { - if (_searchStringsNoCase == null) { - return null; - } - return _searchStringsNoCase; - } - - /** - * Returns the configured list of strings that will be used when scanning the - * server's response (these strings are not expected in the response). - * - * @return list of Strings - */ - public List getUnexpectedSearchStrings() { - if (_uSearchStrings == null) { - return null; - } - return _uSearchStrings; - } - - /** - * Returns an indicator on whether a response body is expected or not. - * - * @return boolean value - */ - public boolean getExpectResponseBody() { - return _expectResponseBody; - } - - /** - * Returns the HttpRequest for this particular test case. - * - * @return HttpRequest of this test case - */ - public HttpRequest getRequest() { - return _request; - } - - /** - * Returns the path to the goldenfile. - * - * @return path to the goldenfile - */ - public String getGoldenfilePath() { - return _goldenfilePath; - } - - /** - * Returns the InputStream of the goldenfile. - * - * @return InputStream of the goldenfile - */ - public InputStream getGoldenfileStream() { - return _goldenfileStream; - } - - /** - * Returns the state for this particular test case. - * - * @return test state - */ - public Object getState() { - if (_response != null) { - return _response.getState(); - } else { - // an initial request for state - return _request.getState(); - } - } - - /** - * Sets the state for this test case. - * - * @param state - * test state - */ - public void setState(Object state) { - _request.setState((HttpState) state); - } - - /** - * Sets a logical name for this test case. - * - * @param name - * the logical name for this test - */ - public void setName(String name) { - _name = name; - } - - /** - * Returns the logical name for this test case. - * - * @return test name - */ - public String getName() { - return _name; - } - - /** - * Sets the validation strategy for this test case instance. - * - * @param validator - * - the fully qualified class name of the response validator to use. - */ - public void setStrategy(String validator) { - ValidationStrategy strat = ValidationFactory.getInstance(validator); - if (strat != null) { - _strategy = strat; - } else { - TestUtil.logMsg("[WebTestCase][WARNING] An attempt was made to use a " - + "non-existing validator (" + validator + ")" - + ". Falling back to the TokenizedValidator"); - } - } - - /** - * Returns the class name of the response validator used. - * - * @return the fully qualified class of the validator used - */ - public String getStrategy() { - return _strategy.getClass().getName(); - } - - /* - * Private Methods - * =========================================================================== - */ - - /** - * Utility method to add headers to test case holder objects. - * - * @param map - * the object in which to add header to - * @param headerString - * String representation of a header in the form of - * : - */ - private void addHeader(Map map, String headerString) { - LOGGER.fine("[WebTestCase] addHeader utility method called: " + headerString); - StringTokenizer st = new StringTokenizer(headerString, "|"); - while (st.hasMoreTokens()) { - String head = st.nextToken(); - int colIdx = head.indexOf(':'); - String name = head.substring(0, colIdx).trim(); - String value = head.substring(colIdx + 1).trim(); - LOGGER.fine("[WebTestCase] Adding test header: " + name + ", " + value); - Header header = map.get(name); - if (header != null) { - map.put(name, createNewHeader(value, header)); - } else { - map.put(name, new Header(name, value)); - } - } - } - - /** - * Creates a new header based of the provided header and value. - * - * @param newValue - * - the new value to add to an existing header - * @param header - * - the original header - * @return new Header - */ - private Header createNewHeader(String newValue, Header header) { - String oldValue = header.getValue(); - return new Header(header.getName(), oldValue + ", " + newValue); - } - - /** - * Adds a search string to the provided list - * - * @param stringList - * - list to add the string to - * @param s - * - the search string - */ - private void addSearchStrings(List stringList, String s) { - StringTokenizer st = new StringTokenizer(s, "|"); - while (st.hasMoreTokens()) { - stringList.add(st.nextToken()); - } - } -} \ No newline at end of file diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java b/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java deleted file mode 100644 index 4d2dacbec2..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.common.webclient.handler; - -import java.util.StringTokenizer; - -import org.apache.commons.httpclient.Header; - -import com.sun.ts.lib.util.TestUtil; - -public class ALLOWHandler implements Handler { - - private static final Handler HANDLER = new ALLOWHandler(); - - private static final String DELIM = "##"; - - private ALLOWHandler() { - } - - public static Handler getInstance() { - return HANDLER; - } - - public boolean invoke(Header configuredHeader, Header responseHeader) { - String ALLOWHeader = responseHeader.getValue().toLowerCase(); - String expectedValues = configuredHeader.getValue().toLowerCase() - .replace(" ", ""); - - TestUtil.logTrace("[ALLOWHandler] ALLOW header received: " + ALLOWHeader); - - StringTokenizer conf = new StringTokenizer(expectedValues, ","); - while (conf.hasMoreTokens()) { - String token = conf.nextToken(); - String token1 = token; - - if ((ALLOWHeader.indexOf(token) < 0) - && (ALLOWHeader.indexOf(token1) < 0)) { - TestUtil.logErr("[ALLOWHandler] Unable to find '" + token - + "' within the ALLOW header returned by the server."); - return false; - } else { - TestUtil.logTrace("[ALLOWHandler] Found expected value, '" + token - + "' in ALLOW header returned by server."); - } - } - return true; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java b/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java deleted file mode 100644 index 944f3448c5..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.handler; - -import java.util.StringTokenizer; - -import org.apache.commons.httpclient.Header; - -import com.sun.ts.lib.util.TestUtil; - -public class SetCookieHandler implements Handler { - - private static final Handler HANDLER = new SetCookieHandler(); - - private static final String DELIM = "##"; - - private SetCookieHandler() { - } - - public static Handler getInstance() { - return HANDLER; - } - - public boolean invoke(Header configuredHeader, Header responseHeader) { - String setCookieHeader = responseHeader.getValue().toLowerCase(); - String expectedValues = configuredHeader.getValue().toLowerCase(); - - TestUtil.logTrace( - "[SetCookieHandler] Set-Cookie header received: " + setCookieHeader); - - StringTokenizer conf = new StringTokenizer(expectedValues, DELIM); - while (conf.hasMoreTokens()) { - String token = conf.nextToken(); - String token1 = token; - - if (token.endsWith("\"") && (token.indexOf("=\"") > 1)) { - token1 = token.replace("=\"", "="); - token1 = token1.substring(0, token.length() - 2); - } - - if (token.startsWith("!")) { - String attr = token.substring(1); - String attr1 = token1.substring(1); - if ((setCookieHeader.indexOf(attr) > -1) - || (setCookieHeader.indexOf(attr1) > -1)) { - TestUtil.logErr("[SetCookieHandler] Unexpected attribute found " - + " Set-Cookie header. Attribute: " + attr - + "\nSet-Cookie header: " + setCookieHeader); - return false; - } - } else { - if ((setCookieHeader.indexOf(token) < 0) - && (setCookieHeader.indexOf(token1) < 0)) { - TestUtil.logErr("[SetCookieHandler] Unable to find '" + token - + "' within the Set-Cookie header returned by the server."); - return false; - } else { - TestUtil.logTrace("[SetCookieHandler] Found expected value, '" + token - + "' in Set-Cookie header returned by server."); - } - } - } - - return true; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java b/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java deleted file mode 100644 index 2edfad04a7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java +++ /dev/null @@ -1,588 +0,0 @@ -/* - * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.http; - -import java.io.IOException; -import java.util.StringTokenizer; - -import org.apache.commons.httpclient.Cookie; -import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HttpClient; -import org.apache.commons.httpclient.HttpConnection; -import org.apache.commons.httpclient.HttpException; -import org.apache.commons.httpclient.HttpMethod; -import org.apache.commons.httpclient.HttpState; -import org.apache.commons.httpclient.UsernamePasswordCredentials; -import org.apache.commons.httpclient.auth.AuthScope; -import org.apache.commons.httpclient.cookie.CookiePolicy; -import org.apache.commons.httpclient.methods.EntityEnclosingMethod; -import org.apache.commons.httpclient.methods.StringRequestEntity; -import org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory; -import org.apache.commons.httpclient.protocol.Protocol; -import org.apache.commons.httpclient.protocol.ProtocolSocketFactory; -import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory; -// this import is used to force this class to get compiled -import com.sun.ts.tests.common.webclient.log.WebLog; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.webclient.Util; - -/** - * Represents an HTTP client Request - */ - -public class HttpRequest { - - static { - if (TestUtil.traceflag) { - System.setProperty("org.apache.commons.logging.Log", - "com.sun.ts.tests.common.webclient.log.WebLog"); - System.setProperty( - "org.apache.commons.logging.simplelog.log.httpclient.wire", "debug"); - } - } - - /** - * Default HTTP port. - */ - public static int DEFAULT_HTTP_PORT = 80; - - /** - * Default HTTP SSL port. - */ - public static final int DEFAULT_SSL_PORT = 443; - - /** - * No authentication - */ - public static final int NO_AUTHENTICATION = 0; - - /** - * Basic authentication - */ - public static final int BASIC_AUTHENTICATION = 1; - - /** - * Digest authenctication - */ - public static final int DIGEST_AUTHENTICATION = 2; - - /** - * Method representation of request. - */ - private HttpMethod _method = null; - - /** - * Target web container host - */ - private String _host = null; - - /** - * Target web container port - */ - private int _port = DEFAULT_HTTP_PORT; - - /** - * Is the request going over SSL - */ - private boolean _isSecure = false; - - /** - * HTTP state - */ - private HttpState _state = null; - - /** - * Original request line for this request. - */ - private String _requestLine = null; - - /** - * Authentication type for current request - */ - private int _authType = NO_AUTHENTICATION; - - /** - * Flag to determine if session tracking will be used or not. - */ - private boolean _useCookies = false; - - /** - * Content length of request body. - */ - private int _contentLength = 0; - - /** - * FollowRedirects - */ - private boolean _redirect = false; - - Header[] _headers = null; - - protected HttpClient client = null; - - /** - * Creates new HttpRequest based of the passed request line. The request line - * provied must be in the form of:
- * - *
-   *     METHOD PATH HTTP-VERSION
-   *     Ex.  GET /index.html HTTP/1.0
-   * 
- */ - public HttpRequest(String requestLine, String host, int port) { - client = new HttpClient(); - _method = MethodFactory.getInstance(requestLine); - _method.setFollowRedirects(false); - _host = host; - _port = port; - - if (port == DEFAULT_SSL_PORT) { - _isSecure = true; - } - - // If we got this far, the request line is in the proper - // format - _requestLine = requestLine; - } - - /* - * public methods - * ======================================================================== - */ - - /** - * getRequestPath returns the request path for this particular - * request. - * - * @return String request path - */ - public String getRequestPath() { - return _method.getPath(); - } - - /** - * getRequestMethod returns the request type, i.e., GET, POST, - * etc. - * - * @return String request type - */ - public String getRequestMethod() { - return _method.getName(); - } - - /** - * isSecureConnection() indicates if the Request is secure or - * not. - * - * @return boolean whether Request is using SSL or not. - */ - public boolean isSecureRequest() { - return _isSecure; - } - - /** - * setSecureRequest configures this request to use SSL. - * - * @param secure - * - whether the Request uses SSL or not. - */ - public void setSecureRequest(boolean secure) { - _isSecure = secure; - } - - /** - * setContent will set the body for this request. Note, this is - * only valid for POST and PUT operations, however, if called and the request - * represents some other HTTP method, it will be no-op'd. - * - * @param content - * request content - */ - public void setContent(String content) { - if (_method instanceof EntityEnclosingMethod) { - ((EntityEnclosingMethod) _method) - .setRequestEntity(new StringRequestEntity(content)); - } - _contentLength = content.length(); - } - - /** - * setAuthenticationCredentials configures the request to - * perform authentication. - * - *

username and password cannot be null. - *

- * - *

- * It is legal for realm to be null. - *

- * - * @param username - * the user - * @param password - * the user's password - * @param authType - * authentication type - * @param realm - * authentication realm - */ - public void setAuthenticationCredentials(String username, String password, - int authType, String realm) { - if (username == null) { - throw new IllegalArgumentException("Username cannot be null"); - } - - if (password == null) { - throw new IllegalArgumentException("Password cannot be null"); - } - - UsernamePasswordCredentials cred = new UsernamePasswordCredentials(username, - password); - AuthScope scope = new AuthScope(_host, _port, realm); - getState().setCredentials(scope, cred); - TestUtil.logTrace("[HttpRequest] Added credentials for '" + username - + "' with password '" + password + "' in realm '" + realm + "'"); - - _authType = authType; - } - - /** - * addRequestHeader adds a request header to this request. If a - * request header of the same name already exists, the new value, will be - * added to the set of already existing values. - * - * NOTE: that header names are not case-sensitive. - * - * @param headerName - * request header name - * @param headerValue - * request header value - */ - public void addRequestHeader(String headerName, String headerValue) { - _method.addRequestHeader(headerName, headerValue); - TestUtil.logTrace("[HttpRequest] Added request header: " - + _method.getRequestHeader(headerName).toExternalForm()); - } - - public void addRequestHeader(String header) { - StringTokenizer st = new StringTokenizer(header, "|"); - while (st.hasMoreTokens()) { - String h = st.nextToken(); - if (h.toLowerCase().startsWith("cookie")) { - createCookie(h); - continue; - } - int col = h.indexOf(':'); - addRequestHeader(h.substring(0, col).trim(), h.substring(col + 1).trim()); - } - } - - /** - * setRequestHeader sets a request header for this request - * overwritting any previously existing header/values with the same name. - * - * NOTE: Header names are not case-sensitive. - * - * @param headerName - * request header name - * @param headerValue - * request header value - */ - public void setRequestHeader(String headerName, String headerValue) { - _method.setRequestHeader(headerName, headerValue); - TestUtil.logTrace("[HttpRequest] Set request header: " - + _method.getRequestHeader(headerName).toExternalForm()); - - } - - /** - * setFollowRedirects indicates whether HTTP redirects are - * followed. By default, redirects are not followed. - */ - public void setFollowRedirects(boolean followRedirects) { - _method.setFollowRedirects(followRedirects); - } - - /** - * getFollowRedirects indicates whether HTTP redirects are - * followed. - */ - public boolean getFollowRedirects() { - return _method.getFollowRedirects(); - } - - /** - * setState will set the HTTP state for the current request (i.e. - * session tracking). This has the side affect - */ - public void setState(HttpState state) { - _state = state; - _useCookies = true; - } - - /** - * execute will dispatch the current request to the target - * server. - * - * @return HttpResponse the server's response. - * @throws IOException - * if an I/O error occurs during dispatch. - */ - public HttpResponse execute() throws IOException, HttpException { - String method; - int defaultPort; - ProtocolSocketFactory factory; - - if (_method.getFollowRedirects()) { - client = new HttpClient(); - - if (_isSecure) { - method = "https"; - defaultPort = DEFAULT_SSL_PORT; - factory = new SSLProtocolSocketFactory(); - } else { - method = "http"; - defaultPort = DEFAULT_HTTP_PORT; - factory = new DefaultProtocolSocketFactory(); - } - - Protocol protocol = new Protocol(method, factory, defaultPort); - HttpConnection conn = new HttpConnection(_host, _port, protocol); - - if (conn.isOpen()) { - throw new IllegalStateException("Connection incorrectly opened"); - } - - conn.open(); - - TestUtil.logMsg("[HttpRequest] Dispatching request: '" + _requestLine - + "' to target server at '" + _host + ":" + _port + "'"); - - addSupportHeaders(); - _headers = _method.getRequestHeaders(); - - TestUtil.logTrace( - "########## The real value set: " + _method.getFollowRedirects()); - - client.getHostConfiguration().setHost(_host, _port, protocol); - - client.executeMethod(_method); - - return new HttpResponse(_host, _port, _isSecure, _method, getState()); - } else { - if (_isSecure) { - method = "https"; - defaultPort = DEFAULT_SSL_PORT; - factory = new SSLProtocolSocketFactory(); - } else { - method = "http"; - defaultPort = DEFAULT_HTTP_PORT; - factory = new DefaultProtocolSocketFactory(); - } - - Protocol protocol = new Protocol(method, factory, defaultPort); - HttpConnection conn = new HttpConnection(_host, _port, protocol); - - if (conn.isOpen()) { - throw new IllegalStateException("Connection incorrectly opened"); - } - - conn.open(); - - TestUtil.logMsg("[HttpRequest] Dispatching request: '" + _requestLine - + "' to target server at '" + _host + ":" + _port + "'"); - - addSupportHeaders(); - _headers = _method.getRequestHeaders(); - - TestUtil.logTrace( - "########## The real value set: " + _method.getFollowRedirects()); - - _method.execute(getState(), conn); - - return new HttpResponse(_host, _port, _isSecure, _method, getState()); - } - } - - /** - * Returns the current state for this request. - * - * @return HttpState current state - */ - public HttpState getState() { - if (_state == null) { - _state = new HttpState(); - } - return _state; - } - - public String toString() { - StringBuffer sb = new StringBuffer(255); - sb.append("[REQUEST LINE] -> ").append(_requestLine).append('\n'); - - if (_headers != null && _headers.length != 0) { - - for (Header _header : _headers) { - sb.append(" [REQUEST HEADER] -> "); - sb.append(_header.toExternalForm()).append('\n'); - } - } - - if (_contentLength != 0) { - sb.append(" [REQUEST BODY LENGTH] -> ").append(_contentLength); - sb.append('\n'); - } - - return sb.toString(); - - } - - /* - * private methods - * ======================================================================== - */ - - private void createCookie(String cookieHeader) { - String cookieLine = cookieHeader.substring(cookieHeader.indexOf(':') + 1) - .trim(); - StringTokenizer st = new StringTokenizer(cookieLine, " ;"); - Cookie cookie = new Cookie(); - cookie.setVersion(1); - - getState(); - - if (cookieLine.indexOf("$Version") == -1) { - cookie.setVersion(0); - _method.getParams().setCookiePolicy(CookiePolicy.NETSCAPE); - } - - while (st.hasMoreTokens()) { - String token = st.nextToken(); - - if (token.charAt(0) != '$' && !token.startsWith("Domain") - && !token.startsWith("Path")) { - cookie.setName(token.substring(0, token.indexOf('='))); - cookie.setValue(token.substring(token.indexOf('=') + 1)); - } else if (token.indexOf("Domain") > -1) { - cookie.setDomainAttributeSpecified(true); - cookie.setDomain(token.substring(token.indexOf('=') + 1)); - } else if (token.indexOf("Path") > -1) { - cookie.setPathAttributeSpecified(true); - cookie.setPath(token.substring(token.indexOf('=') + 1)); - } - } - _state.addCookie(cookie); - - } - - /** - * Adds any support request headers necessary for this request. These headers - * will be added based on the state of the request. - */ - private void addSupportHeaders() { - - // Authentication headers - // NOTE: Possibly move logic to generic method - switch (_authType) { - case NO_AUTHENTICATION: - break; - case BASIC_AUTHENTICATION: - setBasicAuthorizationHeader(); - break; - case DIGEST_AUTHENTICATION: - throw new UnsupportedOperationException( - "Digest Authentication is not currently " + "supported"); - } - - // A Host header will be added to each request to handle - // cases where virtual hosts are used, or there is no DNS - // available on the system where the container is running. - setHostHeader(); - - // Content length header - setContentLengthHeader(); - - // Cookies - setCookieHeader(); - } - - /** - * Sets a basic authentication header in the request is Request is configured - * to use basic authentication - */ - private void setBasicAuthorizationHeader() { - UsernamePasswordCredentials cred = (UsernamePasswordCredentials) getState() - .getCredentials(new AuthScope(_host, _port, null)); - String authString = null; - if (cred != null) { - authString = "Basic " + Util.getBase64EncodedString( - cred.getUserName() + ":" + cred.getPassword()); - } else { - TestUtil.logTrace("[HttpRequest] NULL CREDENTIALS"); - } - _method.setRequestHeader("Authorization", authString); - } - - /** - * Sets a Content-Length header in the request if content is present - */ - private void setContentLengthHeader() { - if (_contentLength > 0) { - _method.setRequestHeader("Content-Length", - Integer.toString(_contentLength)); - } - } - - /** - * Sets a host header in the request. If the configured host value is an IP - * address, the Host header will be sent, but without any value. - * - * If we adhered to the HTTP/1.1 spec, the Host header must be empty of the - * target server is identified via IP address. However, no user agents I've - * tested follow this. And if a custom client library does this, it may not - * work properly with the target server. For now, the Host request-header will - * always have a value. - */ - private void setHostHeader() { - if (_port == DEFAULT_HTTP_PORT || _port == DEFAULT_SSL_PORT) { - _method.setRequestHeader("Host", _host); - } else { - _method.setRequestHeader("Host", _host + ":" + _port); - } - } - - /** - * Sets a Cookie header if this request is using cookies. - */ - private void setCookieHeader() { - if (_useCookies) { - Cookie[] cookies = _state.getCookies(); - if (cookies != null && cookies.length > 0) { - Header cHeader = CookiePolicy.getCookieSpec(CookiePolicy.RFC_2109) - .formatCookieHeader(_state.getCookies()); - if (cHeader != null) { - _method.setRequestHeader(cHeader); - } - } - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java b/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java deleted file mode 100644 index 4aaa06d978..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java +++ /dev/null @@ -1,313 +0,0 @@ -/* - * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.http; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; - -import org.apache.commons.httpclient.Header; -import org.apache.commons.httpclient.HttpMethod; -import org.apache.commons.httpclient.HttpMethodBase; -import org.apache.commons.httpclient.HttpState; -import org.apache.commons.httpclient.HttpVersion; - -import com.sun.ts.tests.common.webclient.Util; - -/** - * This class represents an HTTP response from the server. - */ - -public class HttpResponse { - - /** - * Default encoding based on Servlet Specification - */ - private static final String DEFAULT_ENCODING = "ISO-8859-1"; - - /** - * Content-Type header - */ - private static final String CONTENT_TYPE = "Content-Type"; - - /** - * Wrapped HttpMethod used to pull response info from. - */ - private HttpMethod _method = null; - - /** - * HttpState obtained after execution of request - */ - private HttpState _state = null; - - /** - * Charset encoding returned in the response - */ - private String _encoding = DEFAULT_ENCODING; - - /** - * The response body. Initialized after first call to one of the - * getResponseBody methods and cached for subsequent calls. - */ - private String _responseBody = null; - - /** - * Host name used for processing request - */ - private String _host = null; - - /** - * Port number used for processing request - */ - private int _port; - - /** - * Issecure - */ - private boolean _isSecure; - - /** Creates new HttpResponse */ - public HttpResponse(String host, int port, boolean isSecure, - HttpMethod method, HttpState state) { - - _host = host; - _port = port; - _isSecure = isSecure; - _method = method; - _state = state; - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Returns the HTTP status code returned by the server - * - * @return HTTP status code - */ - public String getStatusCode() { - return Integer.toString(_method.getStatusCode()); - } - - /** - * Returns the HTTP reason-phrase returned by the server - * - * @return HTTP reason-phrase - */ - public String getReasonPhrase() { - return _method.getStatusText(); - } - - /** - * Returns the headers received in the response from the server. - * - * @return response headers - */ - public Header[] getResponseHeaders() { - return _method.getResponseHeaders(); - } - - /** - * Returns the headers designated by the name provided. - * - * @return response headers - */ - public Header[] getResponseHeaders(String headerName) { - return _method.getResponseHeaders(headerName); - } - - /** - * Returns the response header designated by the name provided. - * - * @return a specfic response header or null if the specified header doesn't - * exist. - */ - public Header getResponseHeader(String headerName) { - return _method.getResponseHeader(headerName); - } - - /** - * Returns the response body as a byte array using the charset specified in - * the server's response. - * - * @return response body as an array of bytes. - */ - public byte[] getResponseBodyAsBytes() throws IOException { - return getEncodedResponse().getBytes(); - } - - /** - * Returns the response as bytes (no encoding is performed by client. - * - * @return the raw response bytes - * @throws IOException - * if an error occurs reading from server - */ - public byte[] getResponseBodyAsRawBytes() throws IOException { - return _method.getResponseBody(); - } - - /** - * Returns the response body as a string using the charset specified in the - * server's response. - * - * @return response body as a String - */ - public String getResponseBodyAsString() throws IOException { - return getEncodedResponse(); - } - - /** - * Returns the response body of the server without being encoding by the - * client. - * - * @return an unecoded String representation of the response - * @throws IOException - * if an error occurs reading from the server - */ - public String getResponseBodyAsRawString() throws IOException { - return _method.getResponseBodyAsString(); - } - - /** - * Returns the response body as an InputStream using the encoding specified in - * the server's response. - * - * @return response body as an InputStream - */ - public InputStream getResponseBodyAsStream() throws IOException { - return new ByteArrayInputStream(getEncodedResponse().getBytes()); - } - - /** - * Returns the response body as an InputStream without any encoding applied by - * the client. - * - * @return an InputStream to read the response - * @throws IOException - * if an error occurs reading from the server - */ - public InputStream getResponseBodyAsRawStream() throws IOException { - return _method.getResponseBodyAsStream(); - } - - /** - * Returns the charset encoding for this response. - * - * @return charset encoding - */ - public String getResponseEncoding() { - Header content = _method.getResponseHeader(CONTENT_TYPE); - if (content != null) { - String headerVal = content.getValue(); - int idx = headerVal.indexOf(";charset="); - if (idx > -1) { - // content encoding included in response - _encoding = headerVal.substring(idx + 9); - } - } - return _encoding; - } - - /** - * Returns the post-request state. - * - * @return an HttpState object - */ - public HttpState getState() { - return _state; - } - - /** - * Displays a String representation of the response. - * - * @return string representation of response - */ - public String toString() { - StringBuffer sb = new StringBuffer(255); - - sb.append("[RESPONSE STATUS LINE] -> "); - sb.append(((HttpMethodBase) _method).getParams().getVersion() - .equals(HttpVersion.HTTP_1_1) ? "HTTP/1.1 " : "HTTP/1.0 "); - sb.append(_method.getStatusCode()).append(' '); - sb.append(_method.getStatusText()).append('\n'); - Header[] headers = _method.getResponseHeaders(); - if (headers != null && headers.length != 0) { - for (int i = 0; i < headers.length; i++) { - sb.append(" [RESPONSE HEADER] -> "); - sb.append(headers[i].toExternalForm()).append('\n'); - } - } - - String resBody; - try { - resBody = _method.getResponseBodyAsString(); - } catch (IOException ioe) { - resBody = "UNEXECTED EXCEPTION: " + ioe.toString(); - } - if (resBody != null && resBody.length() != 0) { - sb.append("------ [RESPONSE BODY] ------\n"); - sb.append(resBody); - sb.append("\n-----------------------------\n\n"); - } - return sb.toString(); - } - - /* - * Eventually they need to come from _method - */ - - public String getHost() { - return _host; - } - - public int getPort() { - return _port; - } - - public String getProtocol() { - return _isSecure ? "https" : "http"; - } - - public String getPath() { - return _method.getPath(); - } - - /* - * Private Methods - * ========================================================================== - */ - - /** - * Returns the response body using the encoding returned in the response. - * - * @return encoded response String. - */ - private String getEncodedResponse() throws IOException { - if (_responseBody == null) { - _responseBody = Util.getEncodedStringFromStream( - _method.getResponseBodyAsStream(), getResponseEncoding()); - } - return _responseBody; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java b/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java deleted file mode 100644 index 1aecde8229..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.http; - -import java.util.NoSuchElementException; -import java.util.StringTokenizer; - -import org.apache.commons.httpclient.HttpMethod; -import org.apache.commons.httpclient.HttpMethodBase; -import org.apache.commons.httpclient.HttpVersion; -import org.apache.commons.httpclient.methods.DeleteMethod; -import org.apache.commons.httpclient.methods.GetMethod; -import org.apache.commons.httpclient.methods.HeadMethod; -import org.apache.commons.httpclient.methods.OptionsMethod; -import org.apache.commons.httpclient.methods.PostMethod; -import org.apache.commons.httpclient.methods.PutMethod; - -import com.sun.ts.lib.porting.TSURL; - -/** - * Simple factory class which returns HttpMethod implementations based on a - * request line. - *

- * For example, a request line of GET /index.jsp HTTP/1.0 would return - * an HttpMethod implementation that handles GET requests using HTTP/1.0. - *

- */ - -public class MethodFactory { - - /** - * HTTP GET - */ - private static final String GET_METHOD = "GET"; - - /** - * HTTP POST - */ - private static final String POST_METHOD = "POST"; - - /** - * HTTP HEAD - */ - private static final String HEAD_METHOD = "HEAD"; - - /** - * HTTP PUT - */ - private static final String PUT_METHOD = "PUT"; - - /** - * HTTP DELETE - */ - private static final String DELETE_METHOD = "DELETE"; - - /** - * HTTP OPTIONS - */ - private static final String OPTIONS_METHOD = "OPTIONS"; - - /** - * TSURL implementation - */ - private static final TSURL TS_URL = new TSURL(); - - /** - * Private constructor as all interaction with this class is through the - * getInstance() method. - */ - private MethodFactory() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Returns the approriate request method based on the provided request string. - * The request must be in the format of METHOD URI_PATH HTTP_VERSION, i.e. GET - * /index.jsp HTTP/1.1. - * - * @return HttpMethod based in request. - */ - public static HttpMethod getInstance(String request) { - StringTokenizer st = new StringTokenizer(request); - String method; - String query = null; - String uri; - String version; - try { - method = st.nextToken(); - uri = TS_URL.getRequest(st.nextToken()); - version = st.nextToken(); - } catch (NoSuchElementException nsee) { - throw new IllegalArgumentException( - "Request provided: " + request + " is malformed."); - } - - // check to see if there is a query string appended - // to the URI - int queryStart = uri.indexOf('?'); - if (queryStart != -1) { - query = uri.substring(queryStart + 1); - uri = uri.substring(0, queryStart); - } - - HttpMethodBase req; - - if (method.equals(GET_METHOD)) { - req = new GetMethod(uri); - } else if (method.equals(POST_METHOD)) { - req = new PostMethod(uri); - } else if (method.equals(PUT_METHOD)) { - req = new PutMethod(uri); - } else if (method.equals(DELETE_METHOD)) { - req = new DeleteMethod(uri); - } else if (method.equals(HEAD_METHOD)) { - req = new HeadMethod(uri); - } else if (method.equals(OPTIONS_METHOD)) { - req = new OptionsMethod(uri); - } else { - throw new IllegalArgumentException("Invalid method: " + method); - } - - setHttpVersion(version, req); - - if (query != null) { - req.setQueryString(query); - } - - return req; - } - - /* - * private methods - * ======================================================================== - */ - - /** - * Sets the HTTP version for the method in question. - * - * @param version - * HTTP version to use for this request - * @param method - * method to adjust HTTP version - */ - private static void setHttpVersion(String version, HttpMethodBase method) { - final String oneOne = "HTTP/1.1"; - method.getParams().setVersion( - (version.equals(oneOne) ? HttpVersion.HTTP_1_1 : HttpVersion.HTTP_1_0)); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java b/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java deleted file mode 100644 index b74ff95a2c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.validation; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStreamWriter; -import java.util.StringTokenizer; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.webclient.Goldenfile; -import com.sun.ts.tests.common.webclient.Util; - -/** - *
- * This class provides all of the functionality of the
- * WebValidatorBase class.  Additionally, it will compare
- * the server's response body with the test case's configured
- * goldenfile using a StringTokenizer.
- * 
- */ -public class TokenizedValidator extends WebValidatorBase { - - /** - * System property that will cause the specified goldenfile to be written if - * it doesn't already exist. - */ - private static final String RECORD_GF = "ts.record.gf"; - - /** - * Creates a new instance of TokenizedValidator - */ - public TokenizedValidator() { - } - - /* - * protected methods - * ======================================================================== - */ - - /** - * Compare the server response and golenfile using a StringTokenizer. - * - * @return true if response and goldenfile are the same. - * @throws IOException - * if an error occurs will processing the Goldenfile - */ - protected boolean checkGoldenfile() throws IOException { - String gf = null; - String path = _case.getGoldenfilePath(); - String enc = _res.getResponseEncoding(); - - if (path == null) { - return true; - } - - Goldenfile file = new Goldenfile(_case.getGoldenfilePath(), enc); - - try { - File goldenFile = new File(_case.getGoldenfilePath()); - if(goldenFile.exists()){ - gf = file.getGoldenFileAsString(); - } - else if(_case.getGoldenfileStream()!=null){ - gf = Util.getEncodedStringFromStream(_case.getGoldenfileStream(), enc); - } - } catch (IOException ioe) { - TestUtil - .logErr("[TokenizedValidator] Unexpected exception while accessing " - + "goldenfile! " + ioe.toString()); - return false; - } - - String response = _res.getResponseBodyAsString(); - StringTokenizer gfTokenizer = new StringTokenizer(gf); - StringTokenizer resTokenizer = new StringTokenizer(response); - int gfCount = gfTokenizer.countTokens(); - int resCount = resTokenizer.countTokens(); - - // Logic to handle the recording of goldenfiles. - if (gf.equals("NO GOLDENFILE FOUND") && Boolean.getBoolean(RECORD_GF)) { - - TestUtil - .logTrace("[TokenizedValidator][INFO] RECORDING GOLDENFILE: " + path); - OutputStreamWriter out = new OutputStreamWriter( - new FileOutputStream(path), enc); - out.write(response); - out.flush(); - out.close(); - } - - // If the token counts are the same, continue checking - // each individual token, otherwise, immediately fail. - if (gfCount == resCount) { - while (gfTokenizer.hasMoreTokens()) { - String exp = gfTokenizer.nextToken(); - String res = resTokenizer.nextToken(); - if (!exp.equals(res)) { - StringBuffer sb = new StringBuffer(255); - sb.append("[TokenizedValidator]: Server's response and "); - sb.append("goldenfile to not match!\n"); - sb.append("\n Goldenfile token: ").append(exp); - sb.append("\n Response token: ").append(res); - TestUtil.logErr(sb.toString()); - dumpResponseInfo(response, gf); - return false; - } - } - } else { - TestUtil - .logErr("[TokenizedValidator]: Token count between server response " - + "and goldenfile do not match.\n Response Token" + "count: " - + resCount + "\nGoldenfile Token count: " + gfCount); - - dumpResponseInfo(response, gf); - return false; - } - TestUtil.logTrace("[TokenizedValidator]: Server's response matches the " - + "configured goldenfile."); - return true; - } - - /* - * private methods - * ======================================================================== - */ - - /** - * Dumps the response from the server and the content of the Goldenfile/ - * - * @param serverResponse - * the response body from the server. - * @param goldenFile - * the test goldenfile - */ - private static void dumpResponseInfo(String serverResponse, - String goldenFile) { - StringBuffer sb = new StringBuffer(255); - sb.append("\nServer Response (below):\n"); - sb.append("------------------------------------------\n"); - sb.append(serverResponse); - sb.append("\n------------------------------------------\n"); - sb.append("\nGoldenfile (below):\n"); - sb.append("------------------------------------------\n"); - sb.append(goldenFile); - sb.append("\n------------------------------------------\n"); - TestUtil.logErr(sb.toString()); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java b/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java deleted file mode 100644 index 80d8310d17..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.validation; - -import com.sun.ts.lib.util.TestUtil; - -/** - * Returns a ValidationStrategy instance used to validate a response against a - * particular WebTestCase - * - * @author Ryan Lubke - * @version %I% - */ -public class ValidationFactory { - - /** - * Private constructor as all interaction with the class is through the - * getInstance() method. - */ - private ValidationFactory() { - } - - /* - * public methods - * ======================================================================== - */ - - /** - * Returns a ValidationStrategy instance based on the available factory types. - * - * @param validator - * Validator instance to obtain - * @return a ValidationStrategy instance or null if the instance could not be - * obtained. - */ - public static ValidationStrategy getInstance(String validator) { - try { - Object o = Thread.currentThread().getContextClassLoader() - .loadClass(validator).newInstance(); - if (o instanceof ValidationStrategy) { - return (ValidationStrategy) o; - } - } catch (Throwable t) { - TestUtil.logMsg("[ValidationFactory] Unable to obtain " - + "ValidationStrategy instance: " + validator); - } - return null; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java b/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java deleted file mode 100644 index 3bff6024af..0000000000 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java +++ /dev/null @@ -1,684 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.common.webclient.validation; - -import java.io.IOException; -import java.util.Iterator; -import java.util.List; - -import org.apache.commons.httpclient.Header; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.common.webclient.WebTestCase; -import com.sun.ts.tests.common.webclient.handler.Handler; -import com.sun.ts.tests.common.webclient.handler.HandlerFactory; -import com.sun.ts.tests.common.webclient.http.HttpRequest; -import com.sun.ts.tests.common.webclient.http.HttpResponse; - -/** - * Base abstract class for WebTestCase validation. - */ -public abstract class WebValidatorBase implements ValidationStrategy { - - /** - * Used to detect 4xx class HTTP errors to allow fail fast situations when 4xx - * errors are not expected. - */ - protected static final char CLIENT_ERROR = '4'; - - /** - * Used to detect 5xx class HTTP errors to allows fail fast situations when - * 5xx errors are not expected. - */ - protected static final char SERVER_ERROR = '5'; - - /** - * This test case's HttpResponse - */ - protected HttpResponse _res = null; - - /** - * This test case's HttpRequest - */ - protected HttpRequest _req = null; - - /** - * The test case being validated - */ - protected WebTestCase _case = null; - - /** - * validate Will validate the response against the configured - * TestCase. - * - * - *
    - *
  • Check the HTTP status-code
  • - *
  • Check the HTTP reason-phrase
  • - *
  • Check for expected headers
  • - *
  • Check from unexpected headers
  • - *
  • Check expected search strings
  • - *
  • Check unexpected search strings
  • - *
  • Check the goldenfile
  • - *
- */ - public boolean validate(WebTestCase testCase) { - _res = testCase.getResponse(); - _req = testCase.getRequest(); - _case = testCase; - - // begin the check - try { - if (!checkStatusCode() || !checkReasonPhrase() || !checkExpectedHeaders() - || !checkUnexpectedHeaders() || !checkSearchStrings() - || !checkSearchStringsNoCase() || !checkUnorderedSearchStrings() - || !checkUnexpectedSearchStrings() || !checkGoldenfile()) { - return false; - } - } catch (IOException ioe) { - TestUtil - .logErr("[WebValidatorBase] Unexpected Exception: " + ioe.toString()); - return false; - } - return true; - } - - /** - * checkStatusCode will perform status code comparisons based on - * the algorithm below - *
    - *
  • Check the HTTP status code
  • - *
      - *
    • - *

      - * If status code is -1, then return true - *

      - *
    • - *
    • - *

      - * If test case status code null and response 4xx, return failure, print - * error; return false - *

      - *
    • - *
    • - *

      - * If test case status code null and response 5xx, return failure include - * response body; return false - *

      - *

    • - *
    • - *

      - * If test case status code null, and response not 4xx or 5xx, return true - *

      - *
    • - *
    • - *

      - * Test case status code not null, compare it with the response status code; - * return true if equal - *

      - *

    • - *
    - *
- * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected boolean checkStatusCode() throws IOException { - String sCode = _case.getStatusCode(); - String resCode = _res.getStatusCode(); - if ("-1".equals(sCode)) - return true; - - if (sCode == null && resCode.charAt(0) == CLIENT_ERROR) { - TestUtil - .logErr("[WebValidatorBase] Unexpected " + resCode + " received from " - + "target server! Request path: " + _req.getRequestPath()); - return false; - } - - if (sCode == null && (resCode.charAt(0) == SERVER_ERROR)) { - String resBody = _res.getResponseBodyAsRawString(); - StringBuffer sb = new StringBuffer(75 + resBody.length()); - sb.append("[WebValidatorBase] Unexpected '"); - sb.append(resCode).append("' received from target server!\n"); - sb.append("Error response recieved from server:\n"); - sb.append("------------------------------------------------\n"); - sb.append(resBody != null ? resBody : "NO RESPONSE"); - TestUtil.logErr(sb.toString()); - return false; - } - - if (sCode == null) { - return true; - } - - /* - * Take sCode as a comma separated list of status codes. - * - * If prefixed by "!" the response status code must not match any in the list. - * - * Otherwise matching any in the list is accepted. - */ - - boolean exclusions = sCode.charAt(0) == '!'; - String[] sCodes = exclusions ? sCode.substring(1).split(",") : sCode.split(","); - - if (exclusions) { - for (String current : sCodes) { - if (current.equals(resCode)) { - TestUtil.logErr("[WebValidatorBase] Unexpected Status Code " - + "recieved from server. Expected any value except '" + sCode - + "', received '" + resCode + "'"); - return false; - } - } - } else { - boolean found = false; - for (String current : sCodes) { - if (current.equals(resCode)) { - TestUtil.logTrace("[WebValidatorBase] Expected Status Code '" + current - + "' found in response line!"); - found = true; - break; - } - } - - if (!found) { - TestUtil.logTrace("[WebValidatorBase] Status Code '" + sCode - + "' not found in response line!"); - - return false; - } - } - - return true; - } - - /** - * checkSearchStrings will scan the response for the configured - * strings that are to be expected in the response. - *
    - *
  • Check search strings
  • - *
      - *
    • - *

      - * If list of Strings is null, return true. - *

      - *
    • - *
    • - *

      - * If list of Strings is not null, scan response body. If string is found, - * return true, otherwise display error and return false. - *

      - *
    • - *
    - *
- * NOTE: If there are multiple search strings, the search will be - * performed as such to preserve the order. For example, if the list of search - * strings contains two entities, the search for the second entity will be - * started after the index if the first match. - * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected boolean checkSearchStrings() throws IOException { - List list = _case.getSearchStrings(); - boolean found = true; - if (list != null && !list.isEmpty()) { - String responseBody = _res.getResponseBodyAsRawString(); - - String search = null; - - for (int i = 0, n = list.size(), startIdx = 0, bodyLength = responseBody - .length(); i < n; i++) { - - // set the startIdx to the same value as the body length - // and let the test fail (prevents index based runtime - // exceptions). - if (startIdx >= bodyLength) { - startIdx = bodyLength; - } - - search = (String) list.get(i); - int searchIdx = responseBody.indexOf(search, startIdx); - - TestUtil.logTrace( - "[WebValidatorBase] Scanning response for " + "search string: '" - + search + "' starting at index " + "location: " + startIdx); - if (searchIdx < 0) { - found = false; - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Unable to find the following "); - sb.append("search string in the server's "); - sb.append("response: '").append(search).append("' at index: "); - sb.append(startIdx); - sb.append("\n[WebValidatorBase] Server's response:\n"); - sb.append("-------------------------------------------\n"); - sb.append(responseBody); - sb.append("\n-------------------------------------------\n"); - TestUtil.logErr(sb.toString()); - break; - } - - TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search - + "' at index '" + searchIdx + "' in the server's " + "response"); - // the new searchIdx is the old index plus the lenght of the - // search string. - startIdx = searchIdx + search.length(); - } - } - return found; - } - - /** - * checkSearchStringsNoCase will scan the response for the - * configured case insensitive strings that are to be expected in the - * response. - *
    - *
  • Check search strings
  • - *
      - *
    • - *

      - * If list of Strings is null, return true. - *

      - *
    • - *
    • - *

      - * If list of Strings is not null, scan response body. If string is found, - * return true, otherwise display error and return false. - *

      - *
    • - *
    - *
- * NOTE: If there are multiple search strings, the search will be - * performed as such to preserve the order. For example, if the list of search - * strings contains two entities, the search for the second entity will be - * started after the index if the first match. - * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected boolean checkSearchStringsNoCase() throws IOException { - List list = _case.getSearchStringsNoCase(); - boolean found = true; - if (list != null && !list.isEmpty()) { - String responseBody = _res.getResponseBodyAsRawString(); - - String search = null; - - for (int i = 0, n = list.size(), startIdx = 0, bodyLength = responseBody - .length(); i < n; i++) { - - // set the startIdx to the same value as the body length - // and let the test fail (prevents index based runtime - // exceptions). - if (startIdx >= bodyLength) { - startIdx = bodyLength; - } - - search = (String) list.get(i); - int searchIdx = responseBody.toLowerCase().indexOf(search.toLowerCase(), - startIdx); - - TestUtil.logTrace( - "[WebValidatorBase] Scanning response for " + "search string: '" - + search + "' starting at index " + "location: " + startIdx); - if (searchIdx < 0) { - found = false; - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Unable to find the following "); - sb.append("search string in the server's "); - sb.append("response: '").append(search).append("' at index: "); - sb.append(startIdx); - sb.append("\n[WebValidatorBase] Server's response:\n"); - sb.append("-------------------------------------------\n"); - sb.append(responseBody); - sb.append("\n-------------------------------------------\n"); - TestUtil.logErr(sb.toString()); - break; - } - - TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search - + "' at index '" + searchIdx + "' in the server's " + "response"); - // the new searchIdx is the old index plus the lenght of the - // search string. - startIdx = searchIdx + search.length(); - } - } - return found; - } - - /** - * checkUnorderedSearchStrings will scan the response for the - * configured strings that are to be expected in the response. - *
    - *
  • Check search strings
  • - *
      - *
    • - *

      - * If list of Strings is null, return true. - *

      - *
    • - *
    • - *

      - * If list of Strings is not null, scan response body. If string is found, - * return true, otherwise display error and return false. - *

      - *
    • - *
    - *
- * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected boolean checkUnorderedSearchStrings() throws IOException { - List list = _case.getUnorderedSearchStrings(); - boolean found = true; - if (list != null && !list.isEmpty()) { - String responseBody = _res.getResponseBodyAsRawString(); - - String search = null; - - for (int i = 0, n = list.size(); i < n; i++) { - - search = (String) list.get(i); - int searchIdx = responseBody.indexOf(search); - - TestUtil.logTrace("[WebValidatorBase] Scanning response for " - + "search string: '" + search + "'..."); - if (searchIdx < 0) { - found = false; - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Unable to find the following "); - sb.append("search string in the server's "); - sb.append("response: '").append(search); - sb.append("\n[WebValidatorBase] Server's response:\n"); - sb.append("-------------------------------------------\n"); - sb.append(responseBody); - sb.append("\n-------------------------------------------\n"); - TestUtil.logErr(sb.toString()); - break; - } - - TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search - + "' at index '" + searchIdx + "' in the server's " + "response"); - } - } - return found; - } - - /** - * checkUnexpectedSearchStrings will scan the response for the - * configured strings that are not expected in the response. - *
    - *
  • Check unexpected search strings
  • - *
      - *
    • - *

      - * If list of Strings is null, return true. - *

      - *
    • - *
    • - *

      - * If list of Strings is not null, scan response body. If string is not found, - * return true, otherwise display error and return false. - *

      - *

    • - *
    - *
- * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected boolean checkUnexpectedSearchStrings() throws IOException { - List list = _case.getUnexpectedSearchStrings(); - if (list != null && !list.isEmpty()) { - String responseBody = _res.getResponseBodyAsRawString(); - Iterator iter = list.iterator(); - while (iter.hasNext()) { - String search = (String) iter.next(); - TestUtil.logTrace("[WebValidatorBase] Scanning response. The following" - + " string should not be present in the response: '" + search - + "'"); - if (responseBody.indexOf(search) > -1) { - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Found the following unexpected "); - sb.append("search string in the server's "); - sb.append("response: '").append(search).append("'"); - sb.append("\n[WebValidatorBase] Server's response:\n"); - sb.append("-------------------------------------------\n"); - sb.append(responseBody); - sb.append("\n-------------------------------------------\n"); - TestUtil.logErr(sb.toString()); - return false; - } - } - } - return true; - } - - /** - * checkGoldenFile compare the server's response with the - * configured goldenfile - *
    - *
  • Check the goldenfile
  • - *
      - *
    • - *

      - * If goldenfile is null, return true. - *

      - *
    • - *
    • - *

      - * If goldenfile is not null, compare the goldenfile with the response. If - * equal, return true, otherwise display error and return false. - *

      - *

    • - *
    - *
- * - * @return boolen result of check - * @throws IOException - * if an IO error occurs during validation - */ - protected abstract boolean checkGoldenfile() throws IOException; - - /** - * checkReasonPhrase will perform comparisons between the - * configued reason-phrase and that of the response. - *
    - *
  • Check reason-phrase
  • - *
      - *
    • - *

      - * If configured reason-phrase is null, return true. - *

      - *
    • - *
    • - *

      - * If configured reason-phrase is not null, compare the reason-phrases with - * the response. If equal, return true, otherwise display error and return - * false. - *

      - *

    • - *
    - *
- * - * @return boolen result of check - */ - protected boolean checkReasonPhrase() { - String sReason = _case.getReasonPhrase(); - String resReason = _res.getReasonPhrase(); - - if (sReason == null) { - return true; - } else if (sReason.equalsIgnoreCase(resReason)) { - return true; - } else { - return false; - } - } - - /** - * checkExpectedHeaders will check the response for the - * configured expected headers. - *
    - *
  • Check expected headers
  • - *
      - *
    • - *

      - * If there are no expected headers, return true. - *

      - *
    • - *
    • - *

      - * If there are expected headers, scan the response for the expected headers. - * If all expected headers are found, return true, otherwise display an error - * and return false. - *

      - *

    • - *
    - *
- * - * @return boolen result of check - */ - protected boolean checkExpectedHeaders() { - Header[] expected = _case.getExpectedHeaders(); - if (isEmpty(expected)) { - return true; - } else { - boolean found = true; - Header currentHeader = null; - for (int i = 0; i < expected.length; i++) { - currentHeader = expected[i]; - Header resHeader = _res.getResponseHeader(currentHeader.getName()); - if (resHeader != null) { - Handler handler = HandlerFactory.getHandler(currentHeader.getName()); - if (!handler.invoke(currentHeader, resHeader)) { - found = false; - break; - } - } else { - found = false; - break; - } - } - if (!found) { - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Unable to find the following header"); - sb.append(" in the server's response: "); - sb.append(currentHeader.toExternalForm()).append("\n"); - sb.append("[WebValidatorBase] Response headers recieved from"); - sb.append(" server:"); - - Header[] resHeaders = _res.getResponseHeaders(); - for (int i = 0; i < resHeaders.length; i++) { - sb.append("\n\tResponseHeader -> "); - sb.append(resHeaders[i].toExternalForm()); - } - sb.append("\n"); - TestUtil.logErr(sb.toString()); - - return false; - } else { - TestUtil.logTrace("[WebValidatorBase] Found expected header: " - + currentHeader.toExternalForm()); - return true; - } - } - } - - /** - * checkUnexpectedHeaders will check the response for the - * configured unexpected expected headers. - *
    - *
  • Check unexpected headers
  • - *
      - *
    • - *

      - * If there are no configured unexpected headers, return true. - *

      - *
    • - *
    • - *

      - * If there are configured unexpected headers, scan the response for the - * unexpected headers. If the headers are not found, return true, otherwise - * display an error and return false. - *

      - *

    • - *
    - *
- * - * @return boolen result of check - */ - protected boolean checkUnexpectedHeaders() { - Header[] unexpected = _case.getUnexpectedHeaders(); - if (isEmpty(unexpected)) { - return true; - } else { - Header currentHeader = null; - for (int i = 0; i < unexpected.length; i++) { - currentHeader = unexpected[i]; - String currName = currentHeader.getName(); - String currValue = currentHeader.getValue(); - Header resHeader = _res.getResponseHeader(currName); - if (resHeader != null) { - if (resHeader.getValue().equals(currValue)) { - StringBuffer sb = new StringBuffer(255); - sb.append("[WebValidatorBase] Unexpected header found in the "); - sb.append("server's response: "); - sb.append(currentHeader.toExternalForm()).append("\n"); - sb.append("[WebValidatorBase] Response headers recieved from"); - sb.append("server:"); - - Header[] resHeaders = _res.getResponseHeaders(); - for (int j = 0; j < resHeaders.length; j++) { - sb.append("\n\tResponseHeader -> "); - sb.append(resHeaders[j].toExternalForm()); - } - sb.append("\n"); - TestUtil.logErr(sb.toString()); - - return false; - } - } - } - } - return true; - } - - /** - * Utility method to determine of the expected or unexpected headers are empty - * or not. - */ - protected boolean isEmpty(Header[] headers) { - if (headers == null || headers.length == 0) { - return true; - } else { - return false; - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java b/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java deleted file mode 100644 index 95f0a9869b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jms.common; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.EOFException; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.ObjectStreamField; - -import jakarta.jms.BytesMessage; -import jakarta.jms.JMSException; -import jakarta.jms.MessageEOFException; -import jakarta.jms.MessageFormatException; -import jakarta.jms.MessageNotReadableException; -import jakarta.jms.MessageNotWriteableException; - -/** - * Class Declaration. - * - * @see - * - * @author - */ -public class BytesMessageTestImpl extends MessageTestImpl - implements BytesMessage { - static final private ObjectStreamField[] serialPersistentFields = { - new ObjectStreamField("buf", byte[].class) }; - - long bodyLength = 0; - - transient ByteArrayInputStream bais; - - transient DataInputStream dis; - - byte[] buf; - - transient ByteArrayOutputStream baos; - - transient DataOutputStream dos; - - /** - * Class Constructor. - * - * @see - */ - public BytesMessageTestImpl() { - super(); - init(); - } - - /** - * Method Declaration. - * - * - * @see - */ - private void init() { - buf = new byte[0]; - baos = new ByteArrayOutputStream(); - dos = new DataOutputStream(baos); - } - - /** - * Method Declaration. - * - * @param oos - * - * @exception IOException - * - * @see - */ - private void writeObject(ObjectOutputStream oos) throws IOException { - dos.flush(); - buf = baos.toByteArray(); - oos.defaultWriteObject(); - } - - /** - * Method Declaration. - * - * @param ois - * - * @exception ClassNotFoundException - * @exception IOException - * - * @see - */ - private void readObject(ObjectInputStream ois) - throws ClassNotFoundException, IOException { - ois.defaultReadObject(); - baos = new ByteArrayOutputStream(); - dos = new DataOutputStream(baos); - if (buf != null) { - dos.write(buf); - buf = null; - } - } - - /** - * Method Declaration. - * - * @exception JMSException - * - * @see - */ - public void clearBody() throws JMSException { - buf = null; - bais = null; - dis = null; - readMode = false; - } - - /** - * Read a boolean from the BytesMessage. - * - * @return the boolean value read. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if end of message stream - */ - public boolean readBoolean() throws JMSException { - boolean ret = false; - checkReadAccess(); - - try { - ret = dis.readBoolean(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readBoolean() - - /** - * Read a signed 8-bit value from the BytesMessage. - * - * @return the next byte from the BytesMessage as a signed 8-bit - * byte. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public byte readByte() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readByte"); - checkReadAccess(); - - byte ret = 0; - try { - ret = dis.readByte(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readByte() - - /** - * Read an unsigned 8-bit number from the BytesMessage. - * - * @return the next byte from the BytesMessage, interpreted as an unsigned - * 8-bit number. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public int readUnsignedByte() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readUnsignedByte"); - int ret = 0; - checkReadAccess(); - - try { - ret = dis.readUnsignedByte(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readUnsignedByte() - - /** - * Read a signed 16-bit number from the BytesMessage. - * - * @return the next two bytes from the BytesMessage, interpreted as a signed - * 16-bit number. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public short readShort() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readShort"); - checkReadAccess(); - short ret = 0; - - try { - ret = dis.readShort(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readShort() - - /** - * Read an unsigned 16-bit number from the BytesMessage. - * - * @return the next two bytes from the BytesMessage, interpreted as an - * unsigned 16-bit integer. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public int readUnsignedShort() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readUnsignedShort"); - checkReadAccess(); - int ret = 0; - - try { - ret = dis.readUnsignedShort(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readUnsignedShort() - - /** - * Read a Unicode character value from the BytesMessage. - * - * @return the next two bytes from the BytesMessage as a Unicode character. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public char readChar() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readChar"); - checkReadAccess(); - char ret = 0; - - try { - ret = dis.readChar(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readChar() - - /** - * Read a signed 32-bit integer from the BytesMessage. - * - * @return the next four bytes from the BytesMessage, interpreted as an - * int. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public int readInt() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readInt"); - checkReadAccess(); - int ret = 0; - - try { - ret = dis.readInt(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readInt() - - /** - * Read a signed 64-bit integer from the BytesMessage. - * - * @return the next eight bytes from the BytesMessage, interpreted as a - * long. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public long readLong() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readLong"); - checkReadAccess(); - long ret = 0; - - try { - ret = dis.readLong(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readLong() - - /** - * Read a float from the BytesMessage. - * - * @return the next four bytes from the BytesMessage, interpreted as a - * float. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public float readFloat() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readFloat"); - checkReadAccess(); - float ret = 0; - - try { - ret = dis.readFloat(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readFloat() - - /** - * Read a double from the BytesMessage. - * - * @return the next eight bytes from the BytesMessage, interpreted as a - * double. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public double readDouble() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readDouble"); - checkReadAccess(); - double ret = 0; - - try { - ret = dis.readDouble(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readDouble() - - /** - * Read in a string that has been encoded using a modified UTF-8 format from - * the BytesMessage. - * - *

- * For more information on the UTF-8 format, see "File System Safe UCS - * Transformation Format (FSS_UFT)", X/Open Preliminary Specification, X/Open - * Company Ltd., Document Number: P316. This information also appears in - * ISO/IEC 10646, Annex P. - * - * @return a Unicode string from the BytesMessage. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public String readUTF() throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readUTF"); - checkReadAccess(); - String ret = null; - - try { - ret = dis.readUTF(); - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readUTF() - - /** - * Read a byte array from the BytesMessage. - * - * @param value - * the buffer into which the data is read. - * - * @return the total number of bytes read into the buffer, or -1 if there is - * no more data because the end of the stream has been reached. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public int readBytes(byte[] value) throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readBytes"); - checkReadAccess(); - int ret = -1; - - try { - ret = dis.read(value); - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readBytes() - - /** - * Read a portion of the bytes message. - * - * @param value - * the buffer into which the data is read. - * @param length - * the number of bytes to read. - * - * @return the total number of bytes read into the buffer, or -1 if there is - * no more data because the end of the stream has been reached. - * - * @exception MessageNotReadableException - * if message in write-only mode. - * @exception MessageEOFException - * if end of message stream - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public int readBytes(byte[] value, int length) throws JMSException { - com.sun.ts.lib.util.TestUtil.logTrace("readBytes"); - checkReadAccess(); - int ret = -1; - - if ((length < 0) || (length > value.length)) { - throw new IndexOutOfBoundsException(); - } - try { - ret = dis.read(value, 0, length); - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readBytes() - - /** - * Write a boolean to the BytesMessage as a 1-byte value. The - * value true is written out as the value (byte)1; - * the value false is written out as the value - * (byte)0. - * - * @param value - * the boolean value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeBoolean(boolean writeBoolean) throws JMSException { - - try { - dos.writeBoolean(writeBoolean); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeBoolean() - - /** - * Write out a byte to the BytesMessage as a 1-byte value. - * - * @param value - * the byte value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeByte(byte value) throws JMSException { - - try { - dos.writeByte((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeByte() - - /** - * Write a short to the BytesMessage as two bytes, high byte - * first. - * - * @param value - * the short to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeShort(short value) throws JMSException { - - try { - dos.writeShort((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeShort() - - /** - * Write a char to the BytesMessage as a 2-byte value, high byte - * first. - * - * @param value - * the char value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeChar(char value) throws JMSException { - - try { - dos.writeChar((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeChar() - - /** - * Write an int to the BytesMessage as four bytes, high byte - * first. - * - * @param value - * the int to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeInt(int value) throws JMSException { - try { - dos.writeInt(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeInt() - - /** - * Write a long to the BytesMessage as eight bytes, high byte - * first. - * - * @param value - * the long to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeLong(long value) throws JMSException { - try { - dos.writeLong(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeLong() - - /** - * Convert the float argument to an int using the - * floatToIntBits method in class Float, and then - * writes that int value to the stream message as a 4-byte - * quantity, high byte first. - * - * @param value - * the float value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeFloat(float value) throws JMSException { - try { - dos.writeFloat(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeFloat() - - /** - * Convert the double argument to a long using the - * doubleToLongBits method in class Double, and then - * writes that long value to the stream message as an 8-byte - * quantity, high byte first. - * - * @param value - * the double value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeDouble(double value) throws JMSException { - try { - dos.writeDouble(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeDouble() - - /** - * Write a string to the BytesMessage using UTF-8 encoding in a - * machine-independent manner. - * - *

- * For more information on the UTF-8 format, see "File System Safe UCS - * Transformation Format (FSS_UFT)", X/Open Preliminary Specification, X/Open - * Company Ltd., Document Number: P316. This information also appears in - * ISO/IEC 10646, Annex P. - * - * @param value - * the String value to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeUTF(String value) throws JMSException { - try { - dos.writeUTF(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeUTF() - - /** - * Write a byte array to the BytesMessage. - * - * @param value - * the byte array to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeBytes(byte[] value) throws JMSException { - try { - dos.write(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeBytes() - - /** - * Write a portion of a byte array to the BytesMessage. - * - * @param value - * the byte array value to be written. - * @param offset - * the initial offset within the byte array. - * @param length - * the number of bytes to use. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeBytes(byte[] value, int offset, int length) - throws JMSException { - try { - dos.write(value, offset, length); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } - } // writeBytes() - - /** - * Write a Java object to the BytesMessage. - * - *

- * Note that this method only works for the objectified primitive object types - * (Integer, Double, Long ...), String's and byte arrays. - * - * @param value - * the Java object to be written. - * - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception MessageFormatException - * if object is invalid type. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - */ - public void writeObject(Object value) throws JMSException { - if (value == null) { - throw new NullPointerException(); - } - if (value instanceof Boolean) { - writeBoolean(((Boolean) value).booleanValue()); - } else if (value instanceof Byte) { - writeByte(((Byte) value).byteValue()); - } else if (value instanceof Character) { - writeChar(((Character) value).charValue()); - } else if (value instanceof Double) { - writeDouble(((Double) value).doubleValue()); - } else if (value instanceof Float) { - writeFloat(((Float) value).floatValue()); - } else if (value instanceof Integer) { - writeInt(((Integer) value).intValue()); - } else if (value instanceof Long) { - writeLong(((Long) value).longValue()); - } else if (value instanceof Short) { - writeShort(((Short) value).shortValue()); - } else if (value instanceof String) { - writeUTF((String) value); - } else if (value instanceof byte[]) { - writeBytes((byte[]) value); - } else { - throw new MessageFormatException("Invalid type"); // I18N - } // if .. else - } // writeObject() - - /** - * Put the message in read-only mode, and reposition the stream of bytes to - * the beginning. - * - * @exception JMSException - * if JMS fails to reset the message due to some internal JMS - * error. - * @exception MessageFormatException - * if message has an invalid format - */ - public void reset() throws JMSException { - - // forces any buffered output bytes to be written out to the stream - // not really needed in this case, because the underlying output stream - // is a ByteArrayOutputStream - try { - if (bufferIsDirty) { - com.sun.ts.lib.util.TestUtil.logTrace("flush dos"); - dos.flush(); - dos.close(); - baos.close(); - } - - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); - jmsEx.setLinkedException(e); - throw jmsEx; - } - - if (baos != null) { - - // copy the content of DataOutputStream dos to buf - buf = baos.toByteArray(); - com.sun.ts.lib.util.TestUtil.logTrace("baos.toByteArray"); - - } else { - if (buf == null) { - buf = new byte[0]; - com.sun.ts.lib.util.TestUtil.logTrace("buf = new byte[0]"); - } - } - bais = new ByteArrayInputStream(buf); - com.sun.ts.lib.util.TestUtil.logTrace("dis = new DataInputStream(bais)"); - dis = new DataInputStream(bais); - - setBufferIsDirty(false); - readMode = true; - } - - public long getBodyLength() { - return bodyLength; - } - - public void setBodyLength(long l) { - bodyLength = l; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java b/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java deleted file mode 100644 index 3778fb16de..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jms.common; - -import java.util.ArrayList; -import java.util.Enumeration; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.Connection; -import jakarta.jms.ConnectionFactory; -import jakarta.jms.Destination; -import jakarta.jms.Message; -import jakarta.jms.MessageConsumer; -import jakarta.jms.MessageProducer; -import jakarta.jms.ObjectMessage; -import jakarta.jms.Queue; -import jakarta.jms.QueueBrowser; -import jakarta.jms.Session; - -public final class Cleanup { - private String user = null; - - private String pass = null; - - private ConnectionFactory cf = null; - - public static final String JMSDEFAULT = "jmsDefault"; - - /** - * Default constructor - */ - public Cleanup() { - this(JMSDEFAULT, JMSDEFAULT, null); - } - - /** - * Second constructor - * - * @param ConnectionFactory - * connfactory the connection factory object - */ - public Cleanup(ConnectionFactory cf) { - this(JMSDEFAULT, JMSDEFAULT, cf); - } - - /** - * Third constructor - * - * @param String - * user the username credentials - * @param String - * pass the password credentials - * @param ConnectionFactory - * connfactory the connection factory object - */ - public Cleanup(String user, String pass, ConnectionFactory cf) { - this.user = user; - this.pass = pass; - this.cf = cf; - } - - /** - * Use this method at cleanup time to remove any connections and messages that - * have remained on the queue. - * - * @param ArrayList - * connections list of open connections - * @param ArrayList - * queues list of queues to flush - */ - public void doClientQueueTestCleanup(ArrayList connections, - ArrayList queues) { - TestUtil.logTrace("Entering doClientQueueTestCleanup()"); - try { - closeAllConnections(connections); - flushQueue(queues); - if (queues != null) { - queues.clear(); - } - - if (connections != null) { - connections.clear(); - } - } catch (Exception e) { - TestUtil.logTrace("Ignoring exception: " + e); - } - TestUtil.logTrace("Leaving doClientQueueTestCleanup()"); - } - - /** - * Close any connections opened by the tests - * - * @param ArrayList - * connections list of connections to close - */ - public void closeAllConnections(ArrayList connections) { - TestUtil.logTrace("Entering closeAllConnections()"); - try { - if (connections != null) { - if (!connections.isEmpty()) { - for (int i = 0; i < connections.size(); i++) { - ((Connection) connections.get(i)).close(); - } - } - } - } catch (Exception e) { - } - TestUtil.logTrace("Leaving closeAllConnections()"); - } - - /********************************************************************************** - * flushDestination(Destination) - * - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - **********************************************************************************/ - public void flushDestination(Destination destination) throws Exception { - Connection conn = null; - MessageConsumer consumer = null; - MessageProducer producer = null; - Session sess = null; - ObjectMessage msg = null; - int priority = 0; - int numMsgsFlushed = 0; - - TestUtil.logTrace("Entering flushDestination()"); - try { - TestUtil.logTrace( - "Create new Connection,Session,MessageProducer,MessageConsumer to flush Destination"); - conn = cf.createConnection(user, pass); - sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - producer = sess.createProducer(destination); - consumer = sess.createConsumer(destination); - conn.start(); // start the connections so that messages may be received. - - // send a low priority message - // any other messages on the queue should be received first - // and low priority message should signal the end - msg = sess.createObjectMessage(); - msg.setObject("Flush Destination"); - msg.setStringProperty("COM_SUN_JMS_TESTNAME", "flushDestination"); - TestUtil.logTrace( - "Send low priority message to Destination to signal the last message"); - producer.send(msg, jakarta.jms.Message.DEFAULT_DELIVERY_MODE, priority, - jakarta.jms.Message.DEFAULT_TIME_TO_LIVE); - - // flush the Destination - TestUtil.logTrace("Now flush the Destination"); - Message rmsg = consumer.receive(5000); - while (rmsg != null) { - String tname = rmsg.getStringProperty("COM_SUN_JMS_TESTNAME"); - if (tname != null && tname.equals("flushDestination")) { - // Should be last message (try receiveNoWait() to make sure it is) - rmsg = consumer.receiveNoWait(); - while (rmsg != null) { - numMsgsFlushed++; - rmsg = consumer.receiveNoWait(); - } - break; - } else { - numMsgsFlushed++; - rmsg = consumer.receiveNoWait(); - } - } - if (numMsgsFlushed > 0) { - TestUtil.logTrace("#######flushed " + numMsgsFlushed + " messages"); - } - } catch (Exception e) { - TestUtil.logErr("flushDestination exception: " + e.toString()); - TestUtil.printStackTrace(e); - } finally { - try { - conn.close(); - } catch (Exception e) { - } - } - TestUtil.logTrace("Leaving flushDestination()"); - } - - /********************************************************************************** - * flushQueue(ArrayList) - * - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - * - * @param Queue - * qToFlush[] QUEUES - **********************************************************************************/ - public void flushQueue(ArrayList queues) throws Exception { - Connection qc = null; - MessageConsumer qconsumer = null; - Session qs = null; - ObjectMessage msg = null; - Enumeration msgs = null; - int priority = 0; - int numMsgsFlushed = 0; - int numMsgs = 0; - - TestUtil.logTrace("Entering flushQueue(Arraylist)"); - try { - TestUtil.logTrace("Create new Connection,Session to flush Queue"); - qc = cf.createConnection(user, pass); - qs = qc.createSession(false, Session.AUTO_ACKNOWLEDGE); - qc.start(); // start the connections so that messages may be received. - - for (int i = 0; i < queues.size(); i++) { - TestUtil.logTrace( - "Create QueueBrowser to count number of messages left on Queue"); - QueueBrowser qBrowser = qs.createBrowser((Queue) queues.get(i)); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - - if (numMsgs == 0) { - TestUtil.logTrace("No messages left on Queue " - + ((Queue) queues.get(i)).getQueueName()); - } else { - TestUtil.logTrace(numMsgs + " messages left on Queue " - + ((Queue) queues.get(i)).getQueueName()); - - TestUtil.logTrace( - "Create new MessageConsumer to flush messages in Queue"); - qconsumer = qs.createConsumer((Queue) queues.get(i)); - - // flush the queue - TestUtil.logTrace("Now flush the Queue"); - Message rmsg = qconsumer.receive(5000); - while (rmsg != null) { - numMsgsFlushed++; - rmsg = qconsumer.receiveNoWait(); - if (rmsg == null) { - // Should be last message (try receiveNoWait() one more time to - // make sure it is) - rmsg = qconsumer.receiveNoWait(); - } - } - - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } - } - } - } catch (Exception e) { - TestUtil.logErr("flushQueue exception: " + e.toString()); - TestUtil.printStackTrace(e); - } finally { - try { - qc.close(); - } catch (Exception e) { - } - } - TestUtil.logTrace("Leaving flushQueue(ArrayList)"); - } - - /********************************************************************************** - * flushQueue(Queue, Session) - * - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - * - * @param Queue - * queue the queue to flush - * @param Session - * session the session - **********************************************************************************/ - public void flushQueue(Queue queue, Session session) throws Exception { - int numMsgsFlushed = 0; - int numMsgs = 0; - Enumeration msgs = null; - - TestUtil.logTrace("Entering flushQueue(Queue, Session)"); - try { - QueueBrowser qBrowser = session.createBrowser(queue); - MessageConsumer consumer = session.createConsumer(queue); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - - if (numMsgs == 0) { - TestUtil.logTrace("No messages left on Queue " + queue.getQueueName()); - } else { - TestUtil.logTrace( - numMsgs + " messages left on Queue " + queue.getQueueName()); - if (consumer != null) { - // flush the queue - Message msg = consumer.receiveNoWait(); - while (msg != null) { - numMsgsFlushed++; - msg = consumer.receiveNoWait(); - } - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } - - // if Session is transacted be sure to commit consumed messages - if (numMsgsFlushed > 0 && session.getTransacted()) { - session.commit(); - } - } - } - } catch (Exception e) { - } - TestUtil.logTrace("Leaving flushQueue(Queue, Session)"); - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java b/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java deleted file mode 100644 index b801e4f7b0..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java +++ /dev/null @@ -1,1673 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jms.common; - -import java.util.ArrayList; -import java.util.Enumeration; - -import com.sun.ts.lib.porting.TSJMSObjects; -import com.sun.ts.lib.porting.TSJMSObjectsInterface; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.Connection; -import jakarta.jms.ConnectionFactory; -import jakarta.jms.Destination; -import jakarta.jms.JMSConsumer; -import jakarta.jms.JMSContext; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.MessageConsumer; -import jakarta.jms.MessageProducer; -import jakarta.jms.ObjectMessage; -import jakarta.jms.Queue; -import jakarta.jms.QueueBrowser; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueReceiver; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.Topic; -import jakarta.jms.TopicConnection; -import jakarta.jms.TopicConnectionFactory; -import jakarta.jms.TopicPublisher; -import jakarta.jms.TopicSession; -import jakarta.jms.TopicSubscriber; - -public class JmsTool { - - // QUEUE declarations - private Queue testQueue = null; - - private QueueConnection qConnection = null; - - private QueueSession qSession = null; - - private QueueReceiver qReceiver = null; - - private QueueSender qSender = null; - - // TOPIC declarations - private Topic testTopic = null; - - private TopicConnection tConnection = null; - - private TopicSession tSession = null; - - private TopicSubscriber tSubscriber = null; - - private TopicPublisher tPublisher = null; - - // COMMON declarations - private Destination testDestination = null; - - private Connection conn = null; - - private Session sess = null; - - private MessageConsumer receiver = null; - - private MessageProducer sender = null; - - private boolean durableTopic = false; - - private boolean transacted = false; - - private int ttype = 0; - - private int ftype = 5; - - private String username = null; - - private String password = null; - - private String jndiLookupName = null; - - // constants - public static final int QUEUE = 0; - - public static final int TOPIC = 1; - - public static final int TX_QUEUE = 2; - - public static final int TX_TOPIC = 3; - - public static final int DURABLE_TOPIC = 4; - - public static final int DURABLE_TX_TOPIC = 5; - - public static final int FACTORIES_ONLY = 6; - - public static final int QUEUE_FACTORY = 7; - - public static final int TOPIC_FACTORY = 8; - - public static final int DURABLE_TOPIC_FACTORY = 9; - - public static final int FACTORY_Q = 10; - - public static final int FACTORY_T = 11; - - public static final int FACTORY_DT = 12; - - public static final int COMMON_Q = 13; - - public static final int COMMON_T = 14; - - public static final int COMMON_QTX = 15; - - public static final int COMMON_TTX = 16; - - public static final int COMMON_FACTORY = 17; - - public static final String JMS_VERSION = "3.1"; - - public static final int JMS_MAJOR_VERSION = 3; - - public static final int JMS_MINOR_VERSION = 1; - - // JNDI names for JMS objects (Standalone mode) - public static final String TCKTESTQUEUENAME = "MY_QUEUE"; - - public static final String TCKTESTTOPICNAME = "MY_TOPIC"; - - public static final String TCKCONNECTIONFACTORY = "MyConnectionFactory"; - - public static final String TCKQUEUECONNECTIONFACTORY = "MyQueueConnectionFactory"; - - public static final String TCKTOPICCONNECTIONFACTORY = "MyTopicConnectionFactory"; - - public static final String TCKDURABLETOPICCONNECTIONFACTORY = "DURABLE_SUB_CONNECTION_FACTORY"; - - // JNDI names for JMS objects (JakartaEE mode) - public static final String TESTQUEUENAME = "java:comp/env/jms/MY_QUEUE"; - - public static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; - - public static final String CONNECTIONFACTORY = "java:comp/env/jms/MyConnectionFactory"; - - public static final String QUEUECONNECTIONFACTORY = "java:comp/env/jms/MyQueueConnectionFactory"; - - public static final String TOPICCONNECTIONFACTORY = "java:comp/env/jms/MyTopicConnectionFactory"; - - public static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/DURABLE_SUB_CONNECTION_FACTORY"; - - public static final String JMSDEFAULT = "jmsDefault"; - - // statics - private TSNamingContext jndiContext = null; - - private QueueConnectionFactory qcf = null; - - private TopicConnectionFactory tcf = null; - - private TopicConnectionFactory tcf2 = null; - - private ConnectionFactory cf = null; - - private ConnectionFactory cf2 = null; - - private TSJMSObjectsInterface jmsObjects = null; - - private String mode = "jakartaEE"; - - /********************************************************************************** - * Public constructor. Takes a connection type and mode argument. Create - * connection factory, connection type, and single producer/consumer for - * either QUEUE or TOPIC client. - * - * @param int - * type (QUEUE type or TOPIC type) - * @param String - * m (JakartaEE mode or Standalone mode) - **********************************************************************************/ - public JmsTool(int type, String m) throws Exception { - - this(type, JMSDEFAULT, JMSDEFAULT, m); - } - - /********************************************************************************** - * Public constructor. Takes connection type, username, password, jndi lookup - * name, and mode argument. Create connection factory, connection type, and - * single producer/consumer for TOPIC client. - * - * @param int - * type (TOPIC type) - * @param String - * user (username) - * @param String - * pw (password) - * @param String - * lookup (connection factory to lookup) - * @param String - * m (JakartaEE mode or Standalone mode) - **********************************************************************************/ - public JmsTool(int type, String user, String pw, String lookup, String m) - throws Exception { - username = user; - password = pw; - ttype = type; - mode = m; - - if (mode.equals("jakartaEE")) { - getJNDIContext(); - } else { - jmsObjects = TSJMSObjects.getJMSObjectsInstance(); - } - - if (type == TOPIC) { - transacted = false; - createTopicSetup(lookup); - } else if (type == TX_TOPIC) { - transacted = true; - createTopicSetup(lookup); - } else if (type == DURABLE_TOPIC) { - transacted = false; - createTopicSetup(lookup); - } else if (type == DURABLE_TX_TOPIC) { - transacted = true; - createTopicSetup(lookup); - } else if (type == COMMON_T) { - transacted = false; - createCommonTSetup(lookup); - } else if (type == COMMON_TTX) { - transacted = true; - createCommonTSetup(lookup); - } else { - String eMsg = "Type must be JmsTool.TOPIC, JmsTool.TX_TOPIC, JmsTool.DURABLE_TOPIC, " - + "JmsTool.DURABLE_TX_TOPIC, JmsTool.COMMON_T, JmsTool.COMMON_TTX."; - throw new Exception(eMsg); - } - } - - /********************************************************************************** - * Public constructor. Takes connection type, username, password, and mode - * argument. Create connection factory, connection type, and single - * producer/consumer for either QUEUE or TOPIC client. If just a FACTORY type - * is passed then just create the connection factory type. - * - * @param int - * type (QUEUE type or TOPIC type or FACTORY type) - * @param String - * user (username) - * @param String - * pw (password) - * @param String - * m (JakartaEE mode or Standalone mode) - **********************************************************************************/ - public JmsTool(int type, String user, String pw, String m) throws Exception { - username = user; - password = pw; - ttype = type; - mode = m; - - if (mode.equals("jakartaEE")) { - getJNDIContext(); - } else { - jmsObjects = TSJMSObjects.getJMSObjectsInstance(); - } - - if (type == QUEUE) { - transacted = false; - createQueueSetup(); - } else if (type == TX_QUEUE) { - transacted = true; - createQueueSetup(); - } else if (type == TOPIC) { - durableTopic = false; - transacted = false; - createTopicSetup(); - } else if (type == TX_TOPIC) { - durableTopic = false; - transacted = true; - createTopicSetup(); - } else if (type == DURABLE_TOPIC) { - durableTopic = true; - transacted = false; - createTopicSetup(); - } else if (type == DURABLE_TX_TOPIC) { - durableTopic = true; - transacted = true; - createTopicSetup(); - } else if (type == COMMON_Q) { - transacted = false; - createCommonQSetup(); - } else if (type == COMMON_T) { - transacted = false; - createCommonTSetup(); - } else if (type == COMMON_QTX) { - transacted = true; - createCommonQSetup(); - } else if (type == COMMON_TTX) { - transacted = true; - createCommonTSetup(); - } else if ((type == FACTORIES_ONLY) || (type == QUEUE_FACTORY) - || (type == DURABLE_TOPIC_FACTORY) || (type == TOPIC_FACTORY) - || (type == COMMON_FACTORY) || (type == FACTORY_Q) - || (type == FACTORY_DT) || (type == FACTORY_T)) - getConnectionFactoriesOnly(type); - else { - String eMsg = "Type must be JmsTool.QUEUE, JmsTool.TOPIC, JmsTool.TX_QUEUE, JmsTool.TX_TOPIC, " - + "JmsTool.DURABLE_TOPIC, JmsTool.DURABLE_TX_TOPIC, JmsTool.FACTORIES_ONLY, " - + "JmsTool.QUEUE_FACTORY, JmsTool.TOPIC_FACTORY, JmsTool.COMMON_FACTORY, " - + "JmsTool.FACTORY_Q, JmsTool.FACTORY_T, JmsTool.FACTORY_DT, " - + "JmsTool.DURABLE_TOPIC_FACTORY, JmsTool.COMMON_Q, JmsTool.COMMON_T, " - + "JmsTool.COMMON_QTX, or JmsTool.COMMON_TTX."; - throw new Exception(eMsg); - } - } - - private void getJNDIContext() throws Exception { - - if (jndiContext == null) { - - try { - TestUtil.logTrace("Getting initial context"); - jndiContext = new TSNamingContext(); - } catch (javax.naming.NamingException ne) { - TestUtil.logErr("Could not create JNDI context because: ", ne); - throw ne; - } - } - } - - /************************************************************************ - * Used by tests that create all their own connections - ***********************************************************************/ - private void getConnectionFactoriesOnly(int factype) throws Exception { - - try { - ftype = factype; - this.getConnectionFactoriesOnly(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw e; - } - } - - /************************************************************************ - * Used by tests that create all their own connections - ***********************************************************************/ - private void getConnectionFactoriesOnly() throws Exception { - - if ((ftype == QUEUE_FACTORY) || (ftype == FACTORIES_ONLY)) { - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace( - "Getting QueueConnectionFactory " + QUEUECONNECTIONFACTORY); - qcf = (QueueConnectionFactory) jndiContext - .lookup(QUEUECONNECTIONFACTORY); - jndiLookupName = QUEUECONNECTIONFACTORY; - } else { - TestUtil.logTrace( - "Getting QueueConnectionFactory " + TCKQUEUECONNECTIONFACTORY); - qcf = (QueueConnectionFactory) jmsObjects - .getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); - jndiLookupName = TCKQUEUECONNECTIONFACTORY; - } - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - TestUtil.printStackTrace(e); - throw e; - } - } - - if ((ftype == TOPIC_FACTORY) || (ftype == FACTORIES_ONLY)) { - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace( - "Getting TopicConnectionFactory " + TOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jndiContext - .lookup(TOPICCONNECTIONFACTORY); - jndiLookupName = TOPICCONNECTIONFACTORY; - } else { - TestUtil.logTrace( - "Getting TopicConnectionFactory " + TCKTOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); - jndiLookupName = TCKTOPICCONNECTIONFACTORY; - } - - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - TestUtil.printStackTrace(e); - throw e; - } - } - - if (ftype == DURABLE_TOPIC_FACTORY) { - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Durable TopicConnectionFactory " - + DURABLETOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jndiContext - .lookup(DURABLETOPICCONNECTIONFACTORY); - jndiLookupName = DURABLETOPICCONNECTIONFACTORY; - } else { - TestUtil.logTrace("Getting Durable TopicConnectionFactory " - + TCKDURABLETOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); - jndiLookupName = TCKDURABLETOPICCONNECTIONFACTORY; - } - - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - TestUtil.printStackTrace(e); - throw e; - } - } - - if (ftype == COMMON_FACTORY) { - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting ConnectionFactory " + CONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext.lookup(CONNECTIONFACTORY); - jndiLookupName = CONNECTIONFACTORY; - } else { - TestUtil - .logTrace("Getting ConnectionFactory " + TCKCONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getConnectionFactory(TCKCONNECTIONFACTORY); - jndiLookupName = TCKCONNECTIONFACTORY; - } - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - throw e; - } - } - - if ((ftype == FACTORY_T) || (ftype == FACTORIES_ONLY)) { - try { - if (mode.equals("jakartaEE")) { - TestUtil - .logTrace("Getting TopicConnectionFactory as a ConnectionFactory " - + TOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); - jndiLookupName = TOPICCONNECTIONFACTORY; - } else { - TestUtil - .logTrace("Getting TopicConnectionFactory as a ConnectionFactory " - + TCKTOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); - jndiLookupName = TCKTOPICCONNECTIONFACTORY; - } - - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - throw e; - } - } - - if (ftype == FACTORY_DT) { - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace( - "Getting Durable TopicConnectionFactory as a ConnectionFactory " - + DURABLETOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext - .lookup(DURABLETOPICCONNECTIONFACTORY); - jndiLookupName = DURABLETOPICCONNECTIONFACTORY; - } else { - TestUtil.logTrace( - "Getting Durable TopicConnectionFactory as a ConnectionFactory " - + TCKDURABLETOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); - jndiLookupName = TCKDURABLETOPICCONNECTIONFACTORY; - } - - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - throw e; - } - } - - if ((ftype == FACTORY_Q) || (ftype == FACTORIES_ONLY)) { - try { - if (mode.equals("jakartaEE")) { - TestUtil - .logTrace("Getting QueueConnectionFactory as a ConnectionFactory " - + QUEUECONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); - jndiLookupName = QUEUECONNECTIONFACTORY; - } else { - TestUtil - .logTrace("Getting QueueConnectionFactory as a ConnectionFactory " - + TCKQUEUECONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); - jndiLookupName = TCKQUEUECONNECTIONFACTORY; - } - qcf = (QueueConnectionFactory) cf; - } catch (Exception e) { - TestUtil.logErr("Failed to lookup connection factory using name " - + jndiLookupName + " because: ", e); - throw e; - } - } - - } - - /************************************************************************ - * Queue setup using Queue specific classes/interfaces - ************************************************************************/ - private void createQueueSetup() throws Exception { - - String eMsg = ""; // error Message if exception thrown - - try { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace( - "Getting QueueConnectionFactory " + QUEUECONNECTIONFACTORY); - qcf = (QueueConnectionFactory) jndiContext - .lookup(QUEUECONNECTIONFACTORY); - eMsg = "Failed to lookup QueueConnectionFactory using name " - + QUEUECONNECTIONFACTORY; - } else { - TestUtil.logTrace( - "Getting QueueConnectionFactory " + TCKQUEUECONNECTIONFACTORY); - qcf = (QueueConnectionFactory) jmsObjects - .getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); - eMsg = "Failed to lookup QueueConnectionFactory using name " - + TCKQUEUECONNECTIONFACTORY; - } - - // now lookup the queue - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Queue " + TESTQUEUENAME); - testQueue = (Queue) jndiContext.lookup(TESTQUEUENAME); - eMsg = "Failed to lookup Queue " + TESTQUEUENAME; - } else { - TestUtil.logTrace("Getting Queue " + TCKTESTQUEUENAME); - testQueue = (Queue) jmsObjects.getQueue(TCKTESTQUEUENAME); - eMsg = "Failed to lookup Queue " + TCKTESTQUEUENAME; - } - - // create default connection - TestUtil.logTrace("Creating QueueConnection"); - eMsg = "Failed to create queue connection using username, " + username - + " password, " + password; - qConnection = (QueueConnection) createNewConnection(ttype, username, - password); - - // create default QueueSession and Queue reference - TestUtil.logTrace("Creating QueueSession"); - eMsg = "Failed to create queue session"; - - qSession = qConnection.createQueueSession(transacted, - Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating receiver"); - eMsg = "Failed to create receiver for queue " + testQueue; - qReceiver = qSession.createReceiver(testQueue); - - TestUtil.logTrace("Creating sender"); - eMsg = "Failed to create sender for queue " + testQueue; - qSender = qSession.createSender(testQueue); - TestUtil.logTrace("Success - Queue Setup done"); - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - TestUtil.printStackTrace(e); - throw e; - } - } - - /************************************************************************ - * Topic setup using Topic specific classes/interfaces - ************************************************************************/ - private void createTopicSetup() throws Exception { - String eMsg = ""; - - try { - - if (durableTopic) { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Durable TopicConnectionFactory " - + DURABLETOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jndiContext - .lookup(DURABLETOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup TopicConnectionFactory using name " - + DURABLETOPICCONNECTIONFACTORY; - } else { - TestUtil.logTrace("Getting Durable TopicConnectionFactory " - + TCKDURABLETOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup TopicConnectionFactory using name " - + TCKDURABLETOPICCONNECTIONFACTORY; - } - } else { - if (mode.equals("jakartaEE")) { - TestUtil.logTrace( - "Getting TopicConnectionFactory " + TOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jndiContext - .lookup(TOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup TopicConnectionFactory using name " - + TOPICCONNECTIONFACTORY; - } else { - TestUtil.logTrace( - "Getting TopicConnectionFactory " + TCKTOPICCONNECTIONFACTORY); - tcf = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup TopicConnectionFactory using name " - + TCKTOPICCONNECTIONFACTORY; - } - } - - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); - testTopic = (Topic) jndiContext.lookup(TESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TESTTOPICNAME; - } else { - TestUtil.logTrace("Getting Topic " + TCKTESTTOPICNAME); - testTopic = (Topic) jmsObjects.getTopic(TCKTESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; - } - - // create default connection - TestUtil.logTrace("Creating TopicConnection"); - eMsg = "Failed to create topic connection using username, " + username - + " password, " + password; - tConnection = (TopicConnection) createNewConnection(ttype, username, - password); - - // create default TopicSession - TestUtil.logTrace("Creating TopicSession"); - eMsg = "Failed to create topic session"; - tSession = tConnection.createTopicSession(transacted, - Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating subscriber"); - eMsg = "Failed to create subscriber for topic " + testTopic; - tSubscriber = tSession.createSubscriber(testTopic); - - TestUtil.logTrace("Creating publisher"); - eMsg = "Failed to create publisher for topic " + testTopic; - tPublisher = tSession.createPublisher(testTopic); - - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - throw e; - } - } - - /************************************************************************ - * Topic setup using Topic specific classes/interfaces - ************************************************************************/ - private void createTopicSetup(String lookup) throws Exception { - String eMsg = ""; - - try { - - TestUtil.logTrace("Getting TopicConnectionFactory " + lookup); - if (mode.equals("jakartaEE")) { - tcf = (TopicConnectionFactory) jndiContext - .lookup("java:comp/env/jms/" + lookup); - eMsg = "Failed to lookup TopicConnectionFactory using name java:comp/env/jms/" - + lookup; - } else { - tcf = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(lookup); - eMsg = "Failed to lookup TopicConnectionFactory using name " + lookup; - } - - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); - testTopic = (Topic) jndiContext.lookup(TESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TESTTOPICNAME; - } else { - TestUtil.logTrace("Getting Topic " + TCKTESTTOPICNAME); - testTopic = (Topic) jmsObjects.getTopic(TCKTESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; - } - - // create default connection - TestUtil.logTrace("Creating TopicConnection"); - eMsg = "Failed to create topic connection using username, " + username - + " password, " + password; - tConnection = (TopicConnection) createNewConnection(ttype, username, - password); - - // create default TopicSession - TestUtil.logTrace("Creating TopicSession"); - eMsg = "Failed to create topic session"; - tSession = tConnection.createTopicSession(transacted, - Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating subscriber"); - eMsg = "Failed to create subscriber for topic " + testTopic; - tSubscriber = tSession.createSubscriber(testTopic); - - TestUtil.logTrace("Creating publisher"); - eMsg = "Failed to create publisher for topic " + testTopic; - tPublisher = tSession.createPublisher(testTopic); - - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - throw e; - } - } - - /************************************************************************ - * Queue setup using common classes/interfaces - ************************************************************************/ - private void createCommonQSetup() throws Exception { - String eMsg = ""; - - try { - - if (mode.equals("jakartaEE")) { - TestUtil - .logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); - eMsg = "Failed to lookup ConnectionFactory using name " - + QUEUECONNECTIONFACTORY; - } else { - TestUtil - .logTrace("Getting ConnectionFactory " + TCKQUEUECONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); - eMsg = "Failed to lookup ConnectionFactory using name " - + TCKQUEUECONNECTIONFACTORY; - } - qcf = (QueueConnectionFactory) cf; - - if (mode.equals("jakartaEE")) { - TestUtil.logTrace("Getting Queue " + TESTQUEUENAME); - testDestination = (Destination) jndiContext.lookup(TESTQUEUENAME); - eMsg = "Failed to lookup Queue " + TESTQUEUENAME; - } else { - TestUtil.logTrace("Getting Queue " + TCKTESTQUEUENAME); - testDestination = (Destination) jmsObjects.getQueue(TCKTESTQUEUENAME); - eMsg = "Failed to lookup Queue " + TCKTESTQUEUENAME; - } - - // create default connection - TestUtil.logTrace("Creating Connection"); - eMsg = "Failed to create connection using username, " + username - + " password, " + password; - conn = cf.createConnection(username, password); - - // create default Session - TestUtil.logTrace("Creating Session"); - eMsg = "Failed to create session"; - sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - eMsg = "Failed to create producer for destination " + testDestination; - sender = sess.createProducer(testDestination); - - TestUtil.logTrace("Creating MessageConsumer"); - eMsg = "Failed to create consumer for destination " + testDestination; - receiver = sess.createConsumer(testDestination); - - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - throw e; - } - } - - /************************************************************************ - * Topic setup using common classes/interfaces - ************************************************************************/ - private void createCommonTSetup() throws Exception { - String eMsg = ""; - - try { - - if (mode.equals("jakartaEE")) { - TestUtil - .logTrace("Getting ConnectionFactory " + TOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup ConnectionFactory using name " - + TOPICCONNECTIONFACTORY; - } else { - TestUtil - .logTrace("Getting ConnectionFactory " + TCKTOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) jmsObjects - .getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); - eMsg = "Failed to lookup ConnectionFactory using name " - + TCKTOPICCONNECTIONFACTORY; - } - - TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); - if (mode.equals("jakartaEE")) { - testDestination = (Destination) jndiContext.lookup(TESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TESTTOPICNAME; - } else { - testDestination = (Destination) jmsObjects.getTopic(TCKTESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; - } - - // create default connection - TestUtil.logTrace("Creating Connection"); - eMsg = "Failed to create connection using username, " + username - + " password, " + password; - conn = cf.createConnection(username, password); - - // create default Session - TestUtil.logTrace("Creating Session"); - eMsg = "Failed to create session"; - sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - eMsg = "Failed to create producer for destination " + testDestination; - sender = sess.createProducer(testDestination); - - TestUtil.logTrace("Creating MessageConsumer"); - eMsg = "Failed to create consumer for destination " + testDestination; - receiver = sess.createConsumer(testDestination); - - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - throw e; - } - } - - /************************************************************************ - * Topic setup using common classes/interfaces - ************************************************************************/ - private void createCommonTSetup(String lookup) throws Exception { - String eMsg = ""; - - try { - - TestUtil.logTrace("Getting ConnectionFactory " + lookup); - if (mode.equals("jakartaEE")) { - cf = (ConnectionFactory) jndiContext - .lookup("java:comp/env/jms/" + lookup); - eMsg = "Failed to lookup ConnectionFactory using name java:comp/env/jms/" - + lookup; - } else { - cf = (ConnectionFactory) jmsObjects.getTopicConnectionFactory(lookup); - eMsg = "Failed to lookup ConnectionFactory using name " + lookup; - } - - TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); - if (mode.equals("jakartaEE")) { - testDestination = (Destination) jndiContext.lookup(TESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TESTTOPICNAME; - } else { - testDestination = (Destination) jmsObjects.getTopic(TCKTESTTOPICNAME); - eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; - } - - // create default connection - TestUtil.logTrace("Creating Connection"); - eMsg = "Failed to create connection using username, " + username - + " password, " + password; - conn = cf.createConnection(username, password); - - // create default Session - TestUtil.logTrace("Creating Session"); - eMsg = "Failed to create session"; - sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - eMsg = "Failed to create producer for destination " + testDestination; - sender = sess.createProducer(testDestination); - - TestUtil.logTrace("Creating MessageConsumer"); - eMsg = "Failed to create consumer for destination " + testDestination; - receiver = sess.createConsumer(testDestination); - - } catch (Exception e) { - TestUtil.logErr(eMsg + "due to ", e); - throw e; - } - } - - /*********************************************************************** - * Default getter's for COMMON QUEUE or COMMON TOPIC created objects - ***********************************************************************/ - public ConnectionFactory getConnectionFactory() throws Exception { - return cf; - } - - public Connection getDefaultConnection() throws Exception { - return conn; - } - - public Session getDefaultSession() throws Exception { - return sess; - } - - public MessageProducer getDefaultProducer() throws Exception { - return sender; - } - - public MessageConsumer getDefaultConsumer() throws Exception { - return receiver; - } - - public Destination getDefaultDestination() throws Exception { - return testDestination; - } - - /********************************************************************************** - * Creates a new Topic for tests that require more than the Topic. The topic - * should be setup by the administrator - * - * @param String - * the topic name - **********************************************************************************/ - public Topic createNewTopic(String topicName) throws Exception { - Topic testT = null; - if (mode.equals("jakartaEE")) - testT = (Topic) jndiContext.lookup("java:comp/env/jms/" + topicName); - else - testT = (Topic) jmsObjects.getTopic(topicName); - - return testT; - } - - /********************************************************************************** - * Creates a new Queue for tests that require more than the Queue. The queue - * should already be setup by the administrator - * - * @param String - * the queue name - **********************************************************************************/ - public Queue createNewQueue(String queueName) throws Exception { - Queue testQ = null; - if (mode.equals("jakartaEE")) - testQ = (Queue) jndiContext.lookup("java:comp/env/jms/" + queueName); - else - testQ = (Queue) jmsObjects.getQueue(queueName); - return testQ; - } - - /********************************************************************************** - * Close all resources created by JmsTool except connection resource which - * gets closed in the closeAllConnections() or closeDefaultConnections() - * methods. - * - * @exception Exception - * - **********************************************************************************/ - public void closeAllResources() throws Exception { - // Close QUEUE resource objects - try { - if (qSession != null) - qSession.close(); - } catch (JMSException e) { - } - - try { - if (qSender != null) - qSender.close(); - } catch (JMSException e) { - } - - try { - if (qReceiver != null) - qReceiver.close(); - } catch (JMSException e) { - } - - qSession = null; - qReceiver = null; - qSender = null; - - // Close TOPIC resource objects - try { - if (tSession != null) - tSession.close(); - } catch (JMSException e) { - } - - try { - if (tPublisher != null) - tPublisher.close(); - } catch (JMSException e) { - } - - try { - if (tSubscriber != null) - tSubscriber.close(); - } catch (JMSException e) { - } - - tSession = null; - tSubscriber = null; - tPublisher = null; - - // Close COMMON resource objects - try { - if (sess != null) - sess.close(); - } catch (JMSException e) { - } - try { - if (sender != null) - sender.close(); - } catch (JMSException e) { - } - try { - if (receiver != null) - receiver.close(); - } catch (JMSException e) { - } - - sess = null; - receiver = null; - sender = null; - } - - /********************************************************************************** - * Close any connections opened by the tests - * - * @exception Exception - * - * @see It is allowable to do a second call to close connection per the JMS - * Specification - **********************************************************************************/ - public void closeAllConnections(ArrayList connections) throws Exception { - try { - closeDefaultConnections(); - if (connections != null) { - if (!connections.isEmpty()) { - for (int i = 0; i < connections.size(); i++) { - ((Connection) connections.get(i)).close(); - TestUtil.logTrace("Closing non default connection"); - } - } - } - } catch (JMSException e) { - TestUtil.logErr("Problem closing connections", e); - } - } - - /********************************************************************************** - * Close default connections - * - * @see It is allowable to do a second call to close connection per the JMS - * Specification - **********************************************************************************/ - public void closeDefaultConnections() throws Exception { - try { - if (conn != null) { - TestUtil.logTrace("JmstTool: Closing default Connection"); - conn.close(); - } - - if (qConnection != null) { - TestUtil.logTrace("JmstTool: Closing default QueueConnection"); - qConnection.close(); - } - - if (tConnection != null) { - TestUtil.logTrace("JmsTool: Closing default TopicConnection"); - tConnection.close(); - } - } catch (JMSException e) { - - /* - * Connection may already be closed by test method. If it is another type - * of excption, pass it up to the calling method. Should only catch - * JMSException if there is a regression in the RI. - */ - TestUtil.logErr("Problem closing connections", e); - } - } - - /*********************************************************************** - * Default getter's for QUEUE created objects - ***********************************************************************/ - public QueueConnectionFactory getQueueConnectionFactory() { - return qcf; - } - - public QueueConnection getDefaultQueueConnection() { - return qConnection; - } - - public QueueSession getDefaultQueueSession() { - return qSession; - } - - public QueueReceiver getDefaultQueueReceiver() { - return qReceiver; - } - - public QueueSender getDefaultQueueSender() { - return qSender; - } - - public Queue getDefaultQueue() { - return testQueue; - } - - public Destination getQueueDestination(String lookup) throws Exception { - Destination dest = null; - if (mode.equals("jakartaEE")) - dest = (Destination) jndiContext.lookup("java:comp/env/jms/" + lookup); - else - dest = (Destination) jmsObjects.getQueue(lookup); - return dest; - } - - /*********************************************************************** - * Default getter's for TOPIC created objects - ***********************************************************************/ - public TopicConnectionFactory getTopicConnectionFactory() { - return tcf; - } - - public TopicConnection getDefaultTopicConnection() { - return tConnection; - } - - public TopicSession getDefaultTopicSession() { - return tSession; - } - - public TopicSubscriber getDefaultTopicSubscriber() { - return tSubscriber; - } - - public TopicPublisher getDefaultTopicPublisher() { - return tPublisher; - } - - public Topic getDefaultTopic() { - return testTopic; - } - - public Destination getTopicDestination(String lookup) throws Exception { - Destination dest = null; - if (mode.equals("jakartaEE")) - dest = (Destination) jndiContext.lookup("java:comp/env/jms/" + lookup); - else - dest = (Destination) jmsObjects.getTopic(lookup); - return dest; - } - - /********************************************************************************** - * Use this method at cleanup time to remove any connections and messages that - * have remained on the queue. - * - * @param ArrayList - * connections list of open connections - * @param ArrayList - * queues list of queues to flush - **********************************************************************************/ - public void doClientQueueTestCleanup(ArrayList connections, - ArrayList queues) { - try { - closeAllConnections(connections); - flushQueue(queues); - if (queues != null) { - queues.clear(); - } - - if (connections != null) { - connections.clear(); - } - } catch (Exception e) { - TestUtil.logErr("Cleanup error: " + e.toString()); - TestUtil.printStackTrace(e); - } - } - - /********************************************************************************** - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - **********************************************************************************/ - public void flushDestination() throws Exception { - Connection cC = null; - MessageConsumer receiver = null; - MessageProducer sender = null; - Session sess = null; - ObjectMessage msg = null; - int priority = 0; // lowest priority - int numMsgsFlushed = 0; - - try { - if (conn != null) { - TestUtil.logTrace("Closing default connection in flushDestination()"); - try { - conn.close(); - } catch (Exception ex) { - TestUtil.logErr("Error closing default connection", ex); - } - } - - TestUtil.logTrace( - "Create new Connection,Session,MessageProducer,MessageConsumer to flush Destination"); - cC = createNewConnection(ttype, username, password); - sess = cC.createSession(false, Session.AUTO_ACKNOWLEDGE); - cC.start(); // start the connections so that messages may be received. - sender = sess.createProducer(testDestination); - receiver = sess.createConsumer(testDestination); - - // create and send a low priority message - // any other messages on the queue should be received first - // and low priority message should signal the end - msg = sess.createObjectMessage(); - msg.setObject("Flush Destination"); - msg.setStringProperty("COM_SUN_JMS_TESTNAME", "flushDestination"); - TestUtil.logTrace( - "Send low priority message to Destination to signal the last message"); - sender.send(msg, jakarta.jms.Message.DEFAULT_DELIVERY_MODE, priority, - jakarta.jms.Message.DEFAULT_TIME_TO_LIVE); - - // flush the Destination - TestUtil.logTrace("Now flush the Destination"); - Message rmsg = receiver.receive(5000); - while (rmsg != null) { - String tname = rmsg.getStringProperty("COM_SUN_JMS_TESTNAME"); - if (tname != null && tname.equals("flushDestination")) { - // Should be last message (try receiveNoWait() one more time to make - // sure it is) - rmsg = receiver.receiveNoWait(); - if (rmsg != null) - numMsgsFlushed++; - } else { - numMsgsFlushed++; - } - rmsg = receiver.receive(1000); - } - - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } else { - TestUtil.logTrace("No messages to flush"); - } - - } catch (Exception e) { - TestUtil.logErr( - "Cleanup error attempting to flush Destination: " + e.toString()); - } finally { - try { - cC.close(); - } catch (Exception e) { - TestUtil.logErr( - "Error closing Connection in flushDestination()" + e.toString()); - } - } - } - - /********************************************************************************** - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - * - * @param Queue - * qToFlush[] QUEUE - **********************************************************************************/ - public void flushQueue(ArrayList qToFlush) throws Exception { - QueueConnection qc = null; - QueueReceiver qr = null; - QueueSession qs = null; - QueueSender qsndr = null; - ObjectMessage msg = null; - Enumeration msgs = null; - int priority = 0; // lowest priority - int numMsgsFlushed = 0; - int numMsgs = 0; - - try { - - if (getDefaultQueue() != null) { - qToFlush.add(getDefaultQueue()); - } - TestUtil - .logTrace("Create new QueueConnection,QueueSession to flush Queue"); - qc = (QueueConnection) createNewConnection(QUEUE, username, password); - qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - qc.start(); // start the connections so that messages may be received. - - for (int i = 0; i < qToFlush.size(); i++) { - TestUtil.logTrace( - "Create QueueBrowser to count number of messages left on Queue"); - QueueBrowser qBrowser = qs.createBrowser((Queue) qToFlush.get(i)); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - - if (numMsgs == 0) { - TestUtil.logTrace("No Messages left on Queue " - + ((Queue) qToFlush.get(i)).getQueueName()); - } else { - TestUtil.logTrace(numMsgs + " Messages left on Queue " - + ((Queue) qToFlush.get(i)).getQueueName()); - - TestUtil - .logTrace("Create new QueueReceiver to flush messages in Queue"); - qr = qs.createReceiver((Queue) qToFlush.get(i)); - - // flush the queue - TestUtil.logTrace("Now flush the Queue"); - Message rmsg = qr.receive(5000); - while (rmsg != null) { - numMsgsFlushed++; - rmsg = qr.receiveNoWait(); - if (rmsg == null) { - // Should be last message (try receive(1000) one more time to make - // sure it is) - rmsg = qr.receive(1000); - } - } - - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } - } - } - } catch (Exception e) { - TestUtil - .logErr("Cleanup error attempting to flush Queue: " + e.toString()); - } finally { - try { - qc.close(); - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection in flushQueue(Array)" - + e.toString()); - } - } - } - - public void flushQueue() throws Exception { - int numMsgsFlushed = 0; - int numMsgs = 0; - Enumeration msgs = null; - - try { - TestUtil.logTrace( - "Create QueueBrowser to count number of messages left on Queue"); - QueueBrowser qBrowser = getDefaultQueueSession() - .createBrowser(getDefaultQueue()); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - - if (numMsgs == 0) { - TestUtil.logTrace( - "No Messages left on Queue " + getDefaultQueue().getQueueName()); - } else { - TestUtil.logTrace(numMsgs + " Messages left on Queue " - + getDefaultQueue().getQueueName()); - if (getDefaultQueueReceiver() != null) { - // flush the queue - Message msg = getDefaultQueueReceiver().receive(5000); - while (msg != null) { - numMsgsFlushed++; - msg = getDefaultQueueReceiver().receiveNoWait(); - if (msg == null) { - // Should be last message (try receive(1000) one more time to make - // sure it is) - msg = getDefaultQueueReceiver().receive(1000); - } - } - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } - - // if default QueueSession is transacted, - // be sure to commit consumed messages. - if (numMsgsFlushed > 0 && getDefaultQueueSession().getTransacted()) { - getDefaultQueueSession().commit(); - } - } - } - } catch (Exception e) { - } - } - - /********************************************************************************** - * Returns a the default Connection. The returned Connection object must be - * explicitly cast into a QueueConnection or TopicConnection. - * - * @param int - * type (QUEUE type or TOPIC type) - * @return Connection from the default Queue or Topic or Common - * ConnectionFactory - **********************************************************************************/ - private Connection createNewConnection(int type, String username, - String password) throws Exception { - QueueConnection qC = null; - TopicConnection tC = null; - - if ((type == QUEUE) || (type == TX_QUEUE)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - qC = qcf.createQueueConnection(); - return qC; - } else { - qC = qcf.createQueueConnection(username, password); - return qC; - } - } else if ((type == TOPIC) || (type == TX_TOPIC)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - tC = tcf.createTopicConnection(); - return tC; - } else { - tC = tcf.createTopicConnection(username, password); - return tC; - } - } else if ((type == DURABLE_TOPIC) || (type == DURABLE_TX_TOPIC)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - tC = tcf.createTopicConnection(); - return tC; - } else { - tC = tcf.createTopicConnection(username, password); - return tC; - } - } else if ((type == COMMON_Q) || (type == COMMON_T) || (type == COMMON_QTX) - || (type == COMMON_TTX)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - conn = cf.createConnection(); - return conn; - } else { - conn = cf.createConnection(username, password); - return conn; - } - - } else { - throw new Exception("Failed to create new Connection"); - } - } - - /********************************************************************************** - * Returns a new Queue Connection for tests that require more than the default - * connection. The returned Connection object must be explicitly cast into a - * QueueConnection. - * - * @param int - * type (QUEUE type) - * @return Connection from the default ConnectionFactory - **********************************************************************************/ - public Connection getNewConnection(int type, String username, String password) - throws Exception { - QueueConnection qC = null; - Connection cC = null; - - if ((type == QUEUE) || (type == TX_QUEUE)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - qC = qcf.createQueueConnection(); - return qC; - } else { - qC = qcf.createQueueConnection(username, password); - return qC; - } - } else if (type == COMMON_Q) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - cC = cf.createConnection(); - return cC; - } else { - cC = cf.createConnection(username, password); - return cC; - } - } else { - throw new Exception("Failed to get new Connection"); - } - } - - /********************************************************************************** - * Returns a new Topic Connection for tests that require more than the default - * connection. The returned Connection object must be explicitly cast into a - * TopicConnection. - * - * @param int - * type (TOPIC type) - * @return Connection from the default ConnectionFactory - **********************************************************************************/ - public Connection getNewConnection(int type, String username, String password, - String lookup) throws Exception { - TopicConnection tC = null; - Connection cC = null; - - if ((type == TOPIC) || (type == TX_TOPIC)) { - if (mode.equals("jakartaEE")) - tcf2 = (TopicConnectionFactory) jndiContext - .lookup("java:comp/env/jms/" + lookup); - else - tcf2 = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(lookup); - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - tC = tcf2.createTopicConnection(); - return tC; - } else { - tC = tcf2.createTopicConnection(username, password); - return tC; - } - } else if ((type == DURABLE_TOPIC) || (type == DURABLE_TX_TOPIC)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - tC = tcf.createTopicConnection(); - return tC; - } else { - tC = tcf.createTopicConnection(username, password); - return tC; - } - } else if ((type == COMMON_T) || (type == COMMON_TTX)) { - if (mode.equals("jakartaEE")) - cf2 = (TopicConnectionFactory) jndiContext - .lookup("java:comp/env/jms/" + lookup); - else - cf2 = (TopicConnectionFactory) jmsObjects - .getTopicConnectionFactory(lookup); - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - cC = cf2.createConnection(); - return cC; - } else { - cC = cf2.createConnection(username, password); - return cC; - } - } else { - throw new Exception("Failed to get new Connection"); - } - } - - /********************************************************************************** - * Returns a new Connection for tests that require more than the default - * connection. The returned Connection object must be explicitly cast into a - * QueueConnection or TopicConnection. - * - * @param int - * type (QUEUE type or TOPIC type) - * @return Connection from the default Queue or Topic ConnectionFactory - **********************************************************************************/ - public Connection getNewConnection(int type) throws Exception { - return getNewConnection(type, JMSDEFAULT, JMSDEFAULT); - } - - /*************************************************************** - * Return connection type (QUEUE or TOPIC) - **************************************************************/ - public int getType() { - return ttype; - } - - /********************************************************************************** - * flushDestinationJMSContext Flush destination Queue using JMSContext - * - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - **********************************************************************************/ - public void flushDestinationJMSContext() throws Exception { - JMSConsumer consumer = null; - JMSContext context = null; - int numMsgsFlushed = 0; - - try { - if (getDefaultConnection() != null) { - TestUtil.logTrace( - "Closing default connection in flushDestinationJMSContext()"); - try { - getDefaultConnection().close(); - } catch (Exception ex) { - TestUtil.logErr("Error closing default connection", ex); - } - } - - TestUtil.logTrace( - "Create new JMSContext and JMSConsumer to flush Destination"); - context = createNewJMSContext(ttype, username, password); - consumer = context.createConsumer(testDestination); - - TestUtil.logTrace("Now flush the Destination"); - Message rmsg = consumer.receive(5000); - while (rmsg != null) { - numMsgsFlushed++; - rmsg = consumer.receiveNoWait(); - if (rmsg == null) { - // Should be last message (try receive(1000) one more time to make - // sure it is) - rmsg = consumer.receive(1000); - } - } - - if (numMsgsFlushed > 0) { - TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); - } else { - TestUtil.logTrace("No messages to flush"); - } - } catch (Exception e) { - TestUtil.logErr( - "Cleanup error attempting to flush Destination: " + e.toString()); - } finally { - try { - consumer.close(); - context.close(); - } catch (Exception e) { - } - } - } - - /********************************************************************************** - * createNewJMSContext Return a new JMSContext. - * - * @param int - * type (QUEUE type or TOPIC type) - * @param String - * (username) - * @param String - * (password) - * @return JMSContext - **********************************************************************************/ - private JMSContext createNewJMSContext(int type, String username, - String password) throws Exception { - JMSContext context = null; - if ((type == QUEUE) || (type == TX_QUEUE)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - context = qcf.createContext(); - } else { - context = qcf.createContext(username, password); - } - } else if ((type == TOPIC) || (type == TX_TOPIC) || (type == DURABLE_TOPIC) - || (type == DURABLE_TX_TOPIC)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - context = tcf.createContext(); - } else { - context = tcf.createContext(username, password); - } - } else if ((type == COMMON_Q) || (type == COMMON_T) || (type == COMMON_QTX) - || (type == COMMON_TTX)) { - if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { - context = cf.createContext(); - } else { - context = cf.createContext(username, password); - } - } else { - throw new Exception("Failed to create new JMSContext"); - } - return context; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java b/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java deleted file mode 100644 index 052456c949..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java +++ /dev/null @@ -1,258 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jms.common; - -import java.util.Enumeration; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.TextMessage; - -/** - * JmsUtil is a final tool class that will provide support for common code for - * jms tests. - * - * @author Irene Caruso - * - */ -public final class JmsUtil { - public static boolean test1SecondTime = false; - - public static boolean test2SecondTime = false; - - public static boolean test2Results = false; - - public static boolean test7SecondTime = false; - - // used by initHarnessProps() to cache last value - private static String cHost = null; - - private static String cTrace = null; - - private static String cPort = null; - - // used by addPropsToMessage() to cache last value - private static String hHost = null; - - private static String hTrace = null; - - private static String hPort = null; - - /** - * used by jms tests to pass cts properties object to mdb to initialize cts - * logging mechanism - * - * @param p - * the Properties object - * @param msg - * the JMS Message object - * - */ - - public static void addPropsToMessage(Message msg, java.util.Properties p) { - String hostname = null; - String traceFlag = null; - String logPort = null; - Enumeration e = null; - String key = null; - String notValid = "."; - - try { - - // get the properties that have "." in them - // can't put "." in JMS message, rename them. - - // cache last value for these props - - // sometimes they are null when passed - // ??Harness issue?? - - hostname = TestUtil.getProperty(p, "harness.host"); - TestUtil.logTrace("Hostname " + hostname); - if (hostname == null) { - if (hHost != null) - msg.setStringProperty("harnesshost", hHost); - else { - TestUtil.logTrace("addPropsToMsg: Hostname is null"); - throw new Exception("Error getting hostname"); - } - } else { - msg.setStringProperty("harnesshost", hostname); - hHost = hostname; - } - - traceFlag = TestUtil.getProperty(p, "harness.log.traceflag"); - TestUtil.logTrace("testFlag " + traceFlag); - if (traceFlag == null) { - if (hTrace != null) - msg.setStringProperty("harnesslogtraceflag", hTrace); - else { - TestUtil.logTrace("addProps:traceflag is null"); - throw new Exception("Error getting traceflag"); - } - } else { - msg.setStringProperty("harnesslogtraceflag", traceFlag); - hTrace = traceFlag; - } - - logPort = TestUtil.getProperty(p, "harness.log.port"); - TestUtil.logTrace("logPort " + logPort); - if (logPort == null) { - if (hPort != null) - msg.setStringProperty("harnesslogport", hPort); - else { - TestUtil.logTrace("addProps: logport is null"); - throw new Exception("Error getting port"); - } - } else { - msg.setStringProperty("harnesslogport", logPort); - hPort = logPort; - } - - // get the rest of the props to put in JMS message. - // Sql queries are currently passed as props, may need - // them in the message for testing w/ DB's - - e = p.propertyNames(); - key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - TestUtil.logTrace("addProps: " + key); - if ((key.indexOf(notValid) == -1) && (key.indexOf("***") == -1) - && !(key.startsWith("JMS"))) { - TestUtil.logTrace("addProps: add property " + key); - msg.setStringProperty(key, TestUtil.getProperty(p, key)); - } - } - } catch (Exception ex) { - TestUtil.printStackTrace(ex); - TestUtil.logMsg("Error setting harness Properties in jms msg"); - } - } - - /** - * used by MDB onMessage() to extract cts properties from JMS Message to - * initialize cts logging mechanism - * - * @param p - * the Properties object - * @param msg - * the JMS Message object - * - */ - public static void initHarnessProps(Message msg, java.util.Properties p) { - - String hostname = null; - String traceflag = null; - String logport = null; - - try { - hostname = msg.getStringProperty("harnesshost"); - TestUtil.logTrace("initHarn: Hostname " + hostname); - if (hostname == null) { - TestUtil.logTrace("intiHarn:Hostname is null"); - if (cHost != null) - p.put("harness.host", cHost); - else - throw new Exception("Error getting hostname"); - } else { - p.put("harness.host", hostname); - cHost = hostname; - } - - traceflag = msg.getStringProperty("harnesslogtraceflag"); - TestUtil.logTrace("initHarn:traceflag " + traceflag); - if (traceflag == null) { - TestUtil.logTrace("initHarn: is null"); - if (cTrace != null) - p.put("harness.log.traceflag", cTrace); - else - throw new Exception("Error getting traceflag"); - } else { - p.put("harness.log.traceflag", traceflag); - cTrace = traceflag; - } - - logport = msg.getStringProperty("harnesslogport"); - TestUtil.logTrace("initHarn:logport " + logport); - if (logport == null) { - TestUtil.logTrace("initHarn:logport is null"); - if (cPort != null) - p.put("harness.log.port", cPort); - else - throw new Exception("Error getting port"); - } else { - p.put("harness.log.port", logport); - cPort = logport; - } - - // now pull out the rest of the properties from the message - Enumeration e = msg.getPropertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - if (!key.startsWith("JMS")) - p.put(key, msg.getStringProperty(key)); - } - - // now initialize the props - TestUtil.init(p); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } - - public static void sendTestResults(String testCase, boolean results, - QueueSession qSession, jakarta.jms.Queue queueR) { - TextMessage msg = null; - QueueSender mSender = null; - - TestUtil.logTrace("*@$#)@(@#$ --- - - sendTestResults "); - - try { - // create a msg sender for the response queue - mSender = qSession.createSender(queueR); - // and we'll send a text msg - msg = qSession.createTextMessage(); - msg.setStringProperty("TestCase", testCase); - msg.setText(testCase); - if (results) - msg.setStringProperty("Status", "Pass"); - else - msg.setStringProperty("Status", "Fail"); - TestUtil.logTrace("*@$#)@(@$#@($----Sending response message "); - TestUtil.logTrace( - "*@$#)@(@ ----- status: " + msg.getStringProperty("Status")); - TestUtil.logTrace( - "*@$#)@(@# -----test: " + msg.getStringProperty("TestCase")); - mSender.send(msg); - - } catch (JMSException je) { - TestUtil.printStackTrace(je); - } catch (Exception ee) { - TestUtil.printStackTrace(ee); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java b/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java deleted file mode 100644 index bb0557fb5c..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java +++ /dev/null @@ -1,711 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)MapMessageTestImpl.java 1.5 03/05/16 - */ - -package com.sun.ts.tests.jms.common; - -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Vector; - -import jakarta.jms.JMSException; -import jakarta.jms.MapMessage; -import jakarta.jms.MessageFormatException; -import jakarta.jms.MessageNotWriteableException; - -/** - * Class Declaration. - * - * - * @see - * - * @author - * @version 1.2, 09/26/00 - */ -public class MapMessageTestImpl extends MessageTestImpl implements MapMessage { - private HashMap htable; - - /** - * Class Constructor. - * - * - * @see - */ - public MapMessageTestImpl() { - super(); - init(); - } // MapMessageTestImpl() - - /** - * Initializes the object during construction. Put things that are common to - * all constructors here - */ - private void init() { - htable = new HashMap(); - } - - /** - * Return the boolean value with the given name. - * - * @param name - * the name of the boolean - * - * @return the boolean value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public boolean getBoolean(String name) throws JMSException { - boolean ret = false; - Object value = htable.get(name); - - if (value instanceof Boolean) { - ret = ((Boolean) value).booleanValue(); - } else if (value instanceof String) { - ret = Boolean.valueOf((String) value).booleanValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getBoolean() - - /** - * Return the byte value with the given name. - * - * @param name - * the name of the byte - * - * @return the byte value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public byte getByte(String name) throws JMSException { - byte ret = 0; - Object value = htable.get(name); - - if (value instanceof Byte) { - ret = ((Byte) value).byteValue(); - } else if (value instanceof String) { - ret = Byte.valueOf((String) value).byteValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getByte() - - /** - * Return the short value with the given name. - * - * @param name - * the name of the short - * - * @return the short value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public short getShort(String name) throws JMSException { - short ret = 0; - Object value = htable.get(name); - - if (value instanceof Byte) { - ret = ((Byte) value).byteValue(); - } else if (value instanceof Short) { - ret = ((Short) value).shortValue(); - } else if (value instanceof String) { - ret = Short.valueOf((String) value).shortValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getShort() - - /** - * Return the Unicode character value with the given name. - * - * @param name - * the name of the Unicode character - * - * @return the Unicode character value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public char getChar(String name) throws JMSException { - char ret = 0; - Object value = htable.get(name); - - if (value instanceof Character) { - ret = ((Character) value).charValue(); - } else if (value instanceof String) { - ret = ((String) value).charAt(0); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getChar() - - /** - * Return the integer value with the given name. - * - * @param name - * the name of the integer - * - * @return the integer value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public int getInt(String name) throws JMSException { - int ret = 0; - Object value = htable.get(name); - - if (value instanceof Byte) { - ret = ((Byte) value).byteValue(); - } else if (value instanceof Short) { - ret = ((Short) value).shortValue(); - } else if (value instanceof Integer) { - ret = ((Integer) value).intValue(); - } else if (value instanceof String) { - ret = Integer.valueOf((String) value).intValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getInt() - - /** - * Return the long value with the given name. - * - * @param name - * the name of the long - * - * @return the long value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public long getLong(String name) throws JMSException { - long ret = 0; - Object value = htable.get(name); - - if (value instanceof Byte) { - ret = ((Byte) value).byteValue(); - } else if (value instanceof Short) { - ret = ((Short) value).shortValue(); - } else if (value instanceof Integer) { - ret = ((Integer) value).intValue(); - } else if (value instanceof Long) { - ret = ((Long) value).longValue(); - } else if (value instanceof String) { - ret = Long.valueOf((String) value).longValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getLong() - - /** - * Return the float value with the given name. - * - * @param name - * the name of the float - * - * @return the float value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public float getFloat(String name) throws JMSException { - float ret = 0; - Object value = htable.get(name); - - if (value instanceof Float) { - ret = ((Float) value).floatValue(); - } else if (value instanceof String) { - ret = Float.valueOf((String) value).floatValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getFloat() - - /** - * Return the double value with the given name. - * - * @param name - * the name of the double - * - * @return the double value with the given name. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public double getDouble(String name) throws JMSException { - double ret = 0; - Object value = htable.get(name); - - if (value instanceof Float) { - ret = ((Float) value).floatValue(); - } else if (value instanceof Double) { - ret = ((Double) value).doubleValue(); - } else if (value instanceof String) { - ret = Double.valueOf((String) value).doubleValue(); - } else { - throw new MessageFormatException("type conversion is invalid"); - } // if .. else - return ret; - } // getDouble() - - /** - * Return the String value with the given name. - * - * @param name - * the name of the String - * - * @return the String value with the given name. If there is no item by this - * name, a null value is returned. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public String getString(String name) throws JMSException { - String ret = null; - Object value = htable.get(name); - - if ((value instanceof Boolean) || (value instanceof Byte) - || (value instanceof Short) || (value instanceof Character) - || (value instanceof Integer) || (value instanceof Long) - || (value instanceof Float) || (value instanceof Double) - || (value instanceof String)) { - ret = String.valueOf(value); - } else { - throw new MessageFormatException("invalid type"); - } // if .. else - return ret; - } // getString() - - /** - * Return the byte array value with the given name. - * - * @param name - * the name of the byte array - * - * @return the byte array value with the given name. If there is no item by - * this name, a null value is returned. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public byte[] getBytes(String name) throws JMSException { - byte[] ret = null; - Object value = htable.get(name); - - if (value instanceof byte[]) { - ret = (byte[]) value; - } else { - throw new MessageFormatException("invalid type"); - } // if .. else - return ret; - } // getBytes() - - /** - * Return the Java object value with the given name. - * - *

- * Note that this method can be used to return in objectified format, an - * object that had been stored in the Map with the equivalent - * setObject method call, or it's equivalent primitive set - * method. - * - * @param name - * the name of the Java object - * - * @return the Java object value with the given name, in objectified format - * (ie. if it set as an int, then a Integer is returned). If there is - * no item by this name, a null value is returned. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public Object getObject(String name) throws JMSException { - return htable.get(name); - } // getObject() - - /** - * Return an Enumeration of all the Map message's names. - * - * @return an enumeration of all the names in this Map message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - */ - public Enumeration getMapNames() throws JMSException { - Vector v = new Vector(htable.keySet()); - - return v.elements(); - } // getMapNames() - - /** - * Set a boolean value with the given name, into the Map. - * - * @param name - * the name of the boolean - * @param value - * the boolean value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setBoolean(String name, boolean value) throws JMSException { - try { - htable.put(name, Boolean.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setBoolean() - - /** - * Set a byte value with the given name, into the Map. - * - * @param name - * the name of the byte - * @param value - * the byte value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setByte(String name, byte value) throws JMSException { - try { - htable.put(name, Byte.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setByte() - - /** - * Set a short value with the given name, into the Map. - * - * @param name - * the name of the short - * @param value - * the short value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setShort(String name, short value) throws JMSException { - try { - htable.put(name, Short.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setShort() - - /** - * Set a Unicode character value with the given name, into the Map. - * - * @param name - * the name of the Unicode character - * @param value - * the Unicode character value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setChar(String name, char value) throws JMSException { - try { - htable.put(name, Character.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setChar() - - /** - * Set an integer value with the given name, into the Map. - * - * @param name - * the name of the integer - * @param value - * the integer value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setInt(String name, int value) throws JMSException { - try { - htable.put(name, Integer.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setInt() - - /** - * Set a long value with the given name, into the Map. - * - * @param name - * the name of the long - * @param value - * the long value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setLong(String name, long value) throws JMSException { - try { - htable.put(name, Long.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setLong() - - /** - * Set a float value with the given name, into the Map. - * - * @param name - * the name of the float - * @param value - * the float value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setFloat(String name, float value) throws JMSException { - try { - htable.put(name, Float.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setFloat() - - /** - * Set a double value with the given name, into the Map. - * - * @param name - * the name of the double - * @param value - * the double value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setDouble(String name, double value) throws JMSException { - try { - htable.put(name, Double.valueOf(value)); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setDouble() - - /** - * Set a String value with the given name, into the Map. - * - * @param name - * the name of the String - * @param value - * the String value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setString(String name, String value) throws JMSException { - try { - htable.put(name, value); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setString() - - /** - * Set a byte array value with the given name, into the Map. - * - * @param name - * the name of the byte array - * @param value - * the byte array value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setBytes(String name, byte[] value) throws JMSException { - try { - htable.put(name, value); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setBytes() - - /** - * Set a portion of the byte array value with the given name, into the Map. - * - * @param name - * the name of the byte array - * @param value - * the byte array value to set in the Map. - * @param offset - * the initial offset within the byte array. - * @param length - * the number of bytes to use. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setBytes(String name, byte[] value, int offset, int length) - throws JMSException { - try { - byte[] newValue = (byte[]) htable.get(name); - - System.arraycopy(value, 0, newValue, offset, length); - htable.put(name, newValue); - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setBytes() - - /** - * Set a Java object value with the given name, into the Map. - * - *

- * Note that this method only works for the objectified primitive object types - * (Integer, Double, Long ...), String's and byte arrays. - * - * @param name - * the name of the Java object - * @param value - * the Java object value to set in the Map. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageFormatException - * if object is invalid - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void setObject(String name, Object value) throws JMSException { - try { - if ((value instanceof Boolean) || (value instanceof Byte) - || (value instanceof Short) || (value instanceof Character) - || (value instanceof Integer) || (value instanceof Long) - || (value instanceof Float) || (value instanceof Double) - || (value instanceof String) || (value instanceof byte[])) { - htable.put(name, value); - } else { - throw new MessageFormatException("invalid type"); - } // if .. else - } catch (NullPointerException e) { - JMSException jmsEx = new JMSException("NullPointerException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // setObject() - - /** - * Check if an item exists in this MapMessage. - * - * @param name - * the name of the item to test - * - * @return true if the item does exist. - * - * @exception JMSException - * if a JMS error occurs. - */ - public boolean itemExists(String name) throws JMSException { - return htable.containsKey(name); - } // itemExists() - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java b/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java deleted file mode 100644 index cb903f961d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java +++ /dev/null @@ -1,839 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jms.common; - -import java.util.Enumeration; -import java.util.Hashtable; - -import jakarta.jms.Destination; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.MessageFormatException; -import jakarta.jms.MessageNotReadableException; - -/** - * Class Declaration. - * - * - * @see - * - * @author - * @version 1.2, 09/26/00 - */ -public class MessageTestImpl implements Message { - public boolean dummy = false; - - private String JMSMessageID; - - private long JMSTimestamp; - - private byte[] JMSCorrelationIDAsBytes; - - private String JMSCorrelationID; - - private Destination JMSReplyTo; - - private Destination JMSDestination; - - private int JMSDeliveryMode; - - private boolean JMSRedelivered; - - private String JMSType; - - private long JMSExpiration; - - private long JMSDeliveryTime; - - private long JMSDeliveryDelay; - - private int JMSPriority; - - private Hashtable properties; - - protected boolean bufferIsDirty = false; - - protected boolean readMode = false; - - /** - * Constructor - */ - public MessageTestImpl() { - properties = new Hashtable(); - this.JMSPriority = jakarta.jms.Message.DEFAULT_PRIORITY; - this.JMSDeliveryMode = jakarta.jms.Message.DEFAULT_DELIVERY_MODE; - this.JMSDeliveryDelay = 0L; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public String getJMSMessageID() throws JMSException { - return JMSMessageID; - } - - /** - * Method Declaration. - * - * - * @param id - * - * @exception JMSException - * - * @see - */ - public void setJMSMessageID(String id) throws JMSException { - JMSMessageID = id; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public long getJMSTimestamp() throws JMSException { - return JMSTimestamp; - } - - /** - * Method Declaration. - * - * - * @param timestamp - * - * @exception JMSException - * - * @see - */ - public void setJMSTimestamp(long timestamp) throws JMSException { - JMSTimestamp = timestamp; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public byte[] getJMSCorrelationIDAsBytes() throws JMSException { - return JMSCorrelationIDAsBytes; - } - - /** - * Method Declaration. - * - * - * @param correlationID - * - * @exception JMSException - * - * @see - */ - public void setJMSCorrelationIDAsBytes(byte[] correlationID) - throws JMSException { - JMSCorrelationIDAsBytes = correlationID; - } - - /** - * Method Declaration. - * - * - * @param correlationID - * - * @exception JMSException - * - * @see - */ - public void setJMSCorrelationID(String correlationID) throws JMSException { - JMSCorrelationID = correlationID; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public String getJMSCorrelationID() throws JMSException { - return JMSCorrelationID; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public Destination getJMSReplyTo() throws JMSException { - return JMSReplyTo; - } - - /** - * Method Declaration. - * - * - * @param replyTo - * - * @exception JMSException - * - * @see - */ - public void setJMSReplyTo(Destination replyTo) throws JMSException { - JMSReplyTo = replyTo; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public Destination getJMSDestination() throws JMSException { - return JMSDestination; - } - - /** - * Method Declaration. - * - * - * @param destination - * - * @exception JMSException - * - * @see - */ - public void setJMSDestination(Destination destination) throws JMSException { - JMSDestination = destination; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public int getJMSDeliveryMode() throws JMSException { - return JMSDeliveryMode; - } - - /** - * Method Declaration. - * - * - * @param deliveryTime - * - * @exception JMSException - * - * @see - */ - public void setJMSDeliveryTime(long deliveryTime) throws JMSException { - JMSDeliveryTime = deliveryTime; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public long getJMSDeliveryTime() throws JMSException { - return JMSDeliveryTime; - } - - /** - * Method Declaration. - * - * - * @param deliveryMode - * - * @exception JMSException - * - * @see - */ - public void setJMSDeliveryMode(int deliveryMode) throws JMSException { - JMSDeliveryMode = deliveryMode; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public boolean getJMSRedelivered() throws JMSException { - return JMSRedelivered; - } - - /** - * Method Declaration. - * - * - * @param redelivered - * - * @exception JMSException - * - * @see - */ - public void setJMSRedelivered(boolean redelivered) throws JMSException { - JMSRedelivered = redelivered; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public String getJMSType() throws JMSException { - return JMSType; - } - - /** - * Method Declaration. - * - * - * @param type - * - * @exception JMSException - * - * @see - */ - public void setJMSType(String type) throws JMSException { - JMSType = type; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public long getJMSExpiration() throws JMSException { - return JMSExpiration; - } - - /** - * Method Declaration. - * - * - * @param expiration - * - * @exception JMSException - * - * @see - */ - public void setJMSExpiration(long expiration) throws JMSException { - JMSExpiration = expiration; - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public int getJMSPriority() throws JMSException { - return JMSPriority; - } - - /** - * Method Declaration. - * - * - * @param priority - * - * @exception JMSException - * - * @see - */ - public void setJMSPriority(int priority) throws JMSException { - JMSPriority = priority; - } - - /** - * Method Declaration. - * - * - * @exception JMSException - * - * @see - */ - public void clearProperties() throws JMSException { - properties.clear(); - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public boolean propertyExists(String name) throws JMSException { - return properties.containsKey(name); - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public boolean getBooleanProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Boolean) properties.get(name)).booleanValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public byte getByteProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Byte) properties.get(name)).byteValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public short getShortProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Short) properties.get(name)).shortValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public int getIntProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Integer) properties.get(name)).intValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public long getLongProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Long) properties.get(name)).longValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public float getFloatProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Float) properties.get(name)).floatValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public double getDoubleProperty(String name) throws JMSException { - if (propertyExists(name)) { - return ((Double) properties.get(name)).doubleValue(); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public String getStringProperty(String name) throws JMSException { - if (propertyExists(name)) { - return (String) properties.get(name); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @param name - * - * @return - * - * @exception JMSException - * - * @see - */ - public Object getObjectProperty(String name) throws JMSException { - if (propertyExists(name)) { - return properties.get(name); - } else { - throw new JMSException("property does not exist: " + name); - } - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public Enumeration getPropertyNames() throws JMSException { - return properties.keys(); - - // Vector v = new Vector(); - // return v.elements(); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setBooleanProperty(String name, boolean value) - throws JMSException { - properties.put(name, Boolean.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setByteProperty(String name, byte value) throws JMSException { - properties.put(name, Byte.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setShortProperty(String name, short value) throws JMSException { - properties.put(name, Short.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setIntProperty(String name, int value) throws JMSException { - properties.put(name, Integer.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setLongProperty(String name, long value) throws JMSException { - properties.put(name, Long.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setFloatProperty(String name, float value) throws JMSException { - properties.put(name, Float.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setDoubleProperty(String name, double value) throws JMSException { - properties.put(name, Double.valueOf(value)); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setStringProperty(String name, String value) throws JMSException { - properties.put(name, value); - } - - /** - * Method Declaration. - * - * - * @param name - * @param value - * - * @exception JMSException - * - * @see - */ - public void setObjectProperty(String name, Object value) throws JMSException { - properties.put(name, value); - } - - /** - * Dummy method for acknowledge - */ - public void acknowledge() throws JMSException { - } - - /** - * Dummy method for clear - */ - public void clearBody() throws JMSException { - } - - protected void setBufferIsDirty(boolean state) { - bufferIsDirty = state; - } - - protected void checkReadAccess() throws JMSException { - if (!readMode) { - throw new MessageNotReadableException("Message is not Readable"); - } - } - - /** - * Returns the message body as an object of the specified type. - * - * @param c - * - The type to which the message body will be assigned. - * - * @return the message body - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageFormatException - * if this type conversion is invalid. - */ - public T getBody(Class c) throws JMSException { - return (T) c; - } - - /** - * Returns whether the message body is capable of being assigned to the - * specified type. - * - * @param c - * - The specified type. - * - * @return whether the message body is capable of being assigned to the - * specified type - * - * @exception JMSException - * if a JMS error occurs. - */ - public boolean isBodyAssignableTo(Class c) throws JMSException { - return true; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java b/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java deleted file mode 100644 index fea381da0d..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)SerialTestMessageListenerImpl.java 1.10 03/05/16 - */ -package com.sun.ts.tests.jms.common; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.Message; - -public class SerialTestMessageListenerImpl - implements jakarta.jms.MessageListener { - public boolean inUse = false; - - public boolean testFailed = false; - - public DoneLatch monitor = new DoneLatch(); - - public void onMessage(Message m) { - - // first check for concurrent usage - if (inUse == true) { - TestUtil.logMsg("Error -- concurrent use of MessageListener"); - testFailed = true; - } - - // set flag, then check for final message - inUse = true; - TestUtil.logMsg("*MessageListener: onMessage() called. " - + "Forcing other message listeners to wait."); - try { - if (m.getBooleanProperty("COM_SUN_JMS_TEST_LASTMESSAGE") == true) { - TestUtil.logMsg("*MessageListener: Received final message"); - monitor.allDone(); - } else { - - // wait to force next onMessage() to wait - for (int i = 0; i < 10000; i++) { - } - } - } catch (Exception e) { - TestUtil.printStackTrace(e); - TestUtil.logErr("Failure in message listener: " + e.getMessage()); - testFailed = true; - } - - // unset flag - inUse = false; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java b/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java deleted file mode 100644 index f796fa3834..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java +++ /dev/null @@ -1,364 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.tests.jms.common; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.Destination; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.MessageConsumer; -import jakarta.jms.MessageProducer; -import jakarta.jms.Queue; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.Topic; -import jakarta.jms.TopicConnection; -import jakarta.jms.TopicSession; - -/** - * Class Declaration. - * - * - * @see - * - * @author - * @version 1.16, 09/27/00 - */ -public class SessionThread extends Thread { - private QueueConnection qConnection = null; - - private QueueSession qSession = null; - - private TopicConnection tConnection = null; - - private TopicSession tSession = null; - - // currently, only 1 producer and 1 consumer - MessageConsumer consumer = null; - - MessageProducer producer = null; - - private boolean replyToMessages = false; // reply when receiving? - - private boolean stayAlive = false; // receive indefinitely - - private int messagesReceivedCount = 0; // total messages received - - boolean stdebug = false; // debug output - - /** - * Default constructor creates Session Thread with connections specified. - * - * @param QueueConnection - * for creating QueueSessions - * @param TopicConnection - * for creating TopicSessions - */ - public SessionThread(QueueConnection qC, TopicConnection tC) - throws JMSException { - - if (qC != null && tC != null) { - throw new JMSException( - "Both QueueConnection and TopicConnection are assigned, this is an error, it must be one or the other"); - } - if (qC == null && tC == null) { - throw new JMSException( - "Both QueueConnection and TopicConnection are null, this is an error, it must be one or the other"); - } - if (qC != null) { - this.qConnection = qC; - setQueueSession(false, Session.AUTO_ACKNOWLEDGE); - } else { - this.tConnection = tC; - setTopicSession(false, Session.AUTO_ACKNOWLEDGE); - } - } - - /** - * Method for specifying the QueueSession attributes. - * - * @param boolean - * transacted - * @param int - * acknowledgement mode - */ - public void setQueueSession(boolean transacted, int mode) - throws JMSException { - if (qConnection != null) { - qSession = qConnection.createQueueSession(transacted, mode); - } - } - - /** - * Method for specifying the TopicSession attributes.. - * - * @param boolean - * transacted - * @param int - * acknowledgement mode - */ - public void setTopicSession(boolean transacted, int mode) - throws JMSException { - if (tConnection != null) { - tSession = tConnection.createTopicSession(transacted, mode); - } - } - - /** - * Return the current QueueSession - * - * @return QueueSession the current QueueSession for this client - */ - public QueueSession getQueueSession() { - return qSession; - } - - /** - * Return the current TopicSession - * - * @return TopicSession the current TopicSession for this client - */ - public TopicSession getTopicSession() { - return tSession; - } - - /** - * Used to start the Queue and Topic Connections when they are not the default - * Connections. May also be used in place of someConnection.start() within the - * main testing method. - */ - public void startConnection() throws JMSException { - if (qConnection != null) { - if (stdebug) { - TestUtil.logMsg("*ST: starting QueueConnection"); - } - qConnection.start(); - } - if (tConnection != null) { - if (stdebug) { - TestUtil.logMsg("*ST: starting TopicConnection"); - } - tConnection.start(); - } - } - - /** - * Used to start only the specified Connection. Useful when it is not the - * default Connection. - */ - public void startQueueConnection() throws Exception { - if (stdebug) { - TestUtil.logMsg("*ST: starting specified connection -- Queue"); - } - qConnection.start(); - } - - /** - * Used to start only the specified Connection. Useful when it is not the - * default Connection. - */ - public void startTopicConnection() throws Exception { - if (stdebug) { - TestUtil.logMsg("*ST: starting specified connection -- Topic"); - } - tConnection.start(); - } - - /** - * Create message producers - * - * @param Destination - * Queue or Topic - */ - public void createProducer(Destination dest) throws Exception { - if (qSession != null) { - if (stdebug) { - TestUtil.logMsg("*ST: creating QueueSender"); - } - producer = qSession.createSender((Queue) dest); - } else if (tSession != null) { - if (stdebug) { - TestUtil.logMsg("*ST: creating TopicPublisher"); - } - producer = tSession.createPublisher((Topic) dest); - } else { - throw new Exception("Neither Queue or Topic were set"); - } - TestUtil.logMsg("producer=" + producer); - } - - /** - * Create message consumers - * - * @param Destination - * Queue or Topic - */ - public void createConsumer(Destination dest) throws Exception { - if (qSession != null) { - if (stdebug) { - TestUtil.logMsg("*ST: creating QueueReceiver"); - } - consumer = qSession.createReceiver((Queue) dest); - } else if (tSession != null) { - if (stdebug) { - TestUtil.logMsg("*ST: creating TopicSubscriber"); - } - consumer = tSession.createSubscriber((Topic) dest); - } else { - throw new Exception("Neither Queue or Topic were configured"); - } - TestUtil.logMsg("consumer=" + consumer); - } - - /** - * Set to true to have SessionThread reply automatically to messages. - * - * @param boolean - * true for automatic request/reply - */ - public void setReplyToMessages(boolean boo) { - replyToMessages = boo; - if (stdebug) { - TestUtil.logMsg("*ST: will reply to messages -- " + replyToMessages); - } - } - - /** - * Set to true to have SessionThread keep receiving messages indefinitely. - * - * @param boolean - * true for indefinite receive() - */ - public void setStayAlive(boolean boo) { - stayAlive = boo; - if (stdebug) { - TestUtil - .logMsg("*ST: will keep receiving after 1st message -- " + stayAlive); - } - } - - /** - * Get the number of messages that have been received by this thread. - * - * @return int number of messages received - */ - public int getMessagesReceivedCount() { - return messagesReceivedCount; - } - - /** - * Reset the number of messages that have been received by this thread. Useful - * once "steady-state" has been reached. - */ - public void resetMessagesReceivedCount() { - messagesReceivedCount = 0; - if (stdebug) { - TestUtil.logMsg("*ST: message count is now " + messagesReceivedCount); - } - } - - /** - * Receive messages - */ - private void receiveMessages() throws Exception { - if (consumer == null) { - throw new Exception("No message consumer ready"); - } else { - if (replyToMessages) { - do { - - // get Message - TestUtil.logMsg("*ST: waiting to receive (reply mode)"); - Message msg = consumer.receive(); - - if (msg == null) { // just being safe - throw new Exception("Cannot respond to null message!"); - } - messagesReceivedCount++; - TestUtil.logMsg("*ST: received message -- creating reply"); - - // get return Destination - Destination dest = msg.getJMSReplyTo(); - - if (stdebug) { - TestUtil.logMsg("*ST: replying to " + dest); - } - - // create Producer and reply with new Message - if (qSession != null) { - TestUtil.logMsg("Replying to TemporaryQueue"); - qSession.createSender((Queue) dest).send(qSession.createMessage()); - } else if (tSession != null) { - TestUtil.logMsg("Replying to TemporaryTopic"); - tSession.createPublisher((Topic) dest) - .publish(tSession.createMessage()); - } else { - - // this would be a strange case indeed - throw new Exception("Neither Queue or Topic were configured"); - } - if (stdebug) { - TestUtil.logMsg("*ST: keep receiving -- " + stayAlive); - } - } while (stayAlive); - } else { // non reply mode - do { - TestUtil - .logMsg("*ST: waiting to receive. Will continue after receiving: " - + stayAlive); - Message msg = consumer.receive(); - - if (msg == null) { // safety first - throw new Exception("Received null message"); - } - messagesReceivedCount++; - if (stdebug) { - TestUtil.logMsg("*ST: messages received: " + messagesReceivedCount); - } - TestUtil.logMsg("*ST: received " + msg.toString()); - } while (stayAlive); - } - } - } // receiveMessages() - - /** - * Stop it - */ - public void stopWaiting() throws JMSException { - TestUtil.logMsg("Attempting to stop MessageConsumer(s)"); - consumer.close(); - } - - /** - * Run method - */ - public void run() { - TestUtil.logMsg("*ST: thread running"); - try { - receiveMessages(); - } catch (Exception e) { - TestUtil.logMsg("Session thread: could not receive message"); - TestUtil.logMsg("Reason being: " + e.getMessage()); - } - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java b/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java deleted file mode 100644 index 3d60e9a299..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java +++ /dev/null @@ -1,1133 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.jms.common; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.EOFException; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.io.ObjectStreamField; - -import jakarta.jms.JMSException; -import jakarta.jms.MessageEOFException; -import jakarta.jms.MessageFormatException; -import jakarta.jms.MessageNotReadableException; -import jakarta.jms.MessageNotWriteableException; -import jakarta.jms.StreamMessage; - -/** - * Class Declaration. - * - * - * @see - * - * @author - * @version 1.2, 09/26/00 - */ -public class StreamMessageTestImpl extends MessageTestImpl - implements StreamMessage { - static final private ObjectStreamField[] serialPersistentFields = { - new ObjectStreamField("buf", byte[].class) }; - - // every write method will first write the type byte, - // and then the data with that type. - public static final byte BOOLEAN_TYPE = 1; - - public static final byte BYTE_TYPE = 2; - - public static final byte CHAR_TYPE = 3; - - public static final byte DOUBLE_TYPE = 4; - - public static final byte FLOAT_TYPE = 5; - - public static final byte INT_TYPE = 6; - - public static final byte LONG_TYPE = 7; - - public static final byte SHORT_TYPE = 8; - - public static final byte STRING_TYPE = 9; - - public static final byte BYTES_TYPE = 10; - - byte[] buf = new byte[0]; - - transient ByteArrayInputStream bais; - - transient ByteArrayOutputStream baos; - - transient DataInputStream dis; - - transient DataOutputStream dos; - - // for read/writeBytes - private boolean first_time_readBytes = true; - - private int available_bytes = 0; - - /** - * Class Constructor. - * - * - * @see - */ - public StreamMessageTestImpl() { - super(); - init(); - } // StreamMessageTestImpl() - - /** - * Method Declaration. - * - * - * @see - */ - private void init() { - baos = new ByteArrayOutputStream(); - dos = new DataOutputStream(baos); - } - - /** - * Method Declaration. - * - * - * @param oos - * - * @exception IOException - * - * @see - */ - private void writeObject(ObjectOutputStream oos) throws IOException { - dos.flush(); - buf = baos.toByteArray(); - oos.defaultWriteObject(); - } - - /** - * Method Declaration. - * - * - * @param ois - * - * @exception ClassNotFoundException - * @exception IOException - * - * @see - */ - private void readObject(ObjectInputStream ois) - throws ClassNotFoundException, IOException { - ois.defaultReadObject(); - baos = new ByteArrayOutputStream(); - dos = new DataOutputStream(baos); - if (buf != null) { - dos.write(buf); - buf = null; - } - } - - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - private byte getType() throws IOException { - return dis.readByte(); - } // getType() - - /** - * Method Declaration. - * - * - * @return - * - * @exception IOException - * - * @see - */ - private int getBytesLength() throws IOException { - return dis.readInt(); - } // getType() - - /** - * Read a boolean from the stream message. - * - * @return the boolean value read. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public boolean readBoolean() throws JMSException { - boolean ret = false; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BOOLEAN_TYPE: - ret = dis.readBoolean(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Boolean.valueOf(s).booleanValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readBoolean() - - /** - * Read a byte value from the stream message. - * - * @return the next byte from the stream message as a 8-bit byte. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public byte readByte() throws JMSException { - byte ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BYTE_TYPE: - ret = dis.readByte(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Byte.valueOf(s).byteValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readByte() - - /** - * Read a 16-bit number from the stream message. - * - * @return a 16-bit number from the stream message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public short readShort() throws JMSException { - short ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BYTE_TYPE: - ret = dis.readByte(); - break; - case SHORT_TYPE: - ret = dis.readShort(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Short.valueOf(s).shortValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readShort() - - /** - * Read a Unicode character value from the stream message. - * - * @return a Unicode character from the stream message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public char readChar() throws JMSException { - char ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case CHAR_TYPE: - ret = dis.readChar(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = s.charAt(0); // ??? - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readChar() - - /** - * Read a 32-bit integer from the stream message. - * - * @return a 32-bit integer value from the stream message, interpreted as a - * int. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public int readInt() throws JMSException { - int ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BYTE_TYPE: - ret = dis.readByte(); - break; - case SHORT_TYPE: - ret = dis.readShort(); - break; - case INT_TYPE: - ret = dis.readInt(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Integer.valueOf(s).intValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readInt() - - /** - * Read a 64-bit integer from the stream message. - * - * @return a 64-bit integer value from the stream message, interpreted as a - * long. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public long readLong() throws JMSException { - long ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BYTE_TYPE: - ret = dis.readByte(); - break; - case SHORT_TYPE: - ret = dis.readShort(); - break; - case INT_TYPE: - ret = dis.readInt(); - break; - case LONG_TYPE: - ret = dis.readLong(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Long.valueOf(s).longValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readLong() - - /** - * Read a float from the stream message. - * - * @return a float value from the stream message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public float readFloat() throws JMSException { - float ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case FLOAT_TYPE: - ret = dis.readFloat(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Float.valueOf(s).floatValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readFloat() - - /** - * Read a double from the stream message. - * - * @return a double value from the stream message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public double readDouble() throws JMSException { - double ret = 0; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case FLOAT_TYPE: - ret = dis.readFloat(); - break; - case DOUBLE_TYPE: - ret = dis.readDouble(); - break; - case STRING_TYPE: - String s = dis.readUTF(); - - ret = Double.valueOf(s).doubleValue(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readDouble() - - /** - * Read in a string from the stream message. - * - * @return a Unicode string from the stream message. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public String readString() throws JMSException { - String ret = null; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BOOLEAN_TYPE: - ret = String.valueOf(dis.readBoolean()); - break; - case BYTE_TYPE: - ret = String.valueOf(dis.readByte()); - break; - case SHORT_TYPE: - ret = String.valueOf(dis.readShort()); - break; - case CHAR_TYPE: - ret = String.valueOf(dis.readChar()); - break; - case INT_TYPE: - ret = String.valueOf(dis.readInt()); - break; - case LONG_TYPE: - ret = String.valueOf(dis.readLong()); - break; - case FLOAT_TYPE: - ret = String.valueOf(dis.readFloat()); - break; - case DOUBLE_TYPE: - ret = String.valueOf(dis.readDouble()); - break; - case STRING_TYPE: - ret = dis.readUTF(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readString() - - /** - * Read a byte array from the stream message. - * - * @param value - * the buffer into which the data is read. - * - * @return the total number of bytes read into the buffer, or -1 if there is - * no more data because the end of the stream has been reached. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageFormatException - * if this type conversion is invalid - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public int readBytes(byte[] value) throws JMSException { - int ret = -1; - checkReadAccess(); - - try { - byte type = BYTES_TYPE; - - // get the type and the length of this bytes array field - // if this is the first time read this bytes array field - if (first_time_readBytes) { - type = getType(); - available_bytes = getBytesLength(); - } - switch (type) { - case BYTES_TYPE: - - // bytes array field is empty - if (first_time_readBytes && available_bytes == 0) { - return 0; - } else if (!first_time_readBytes && available_bytes == 0) { - - /* - * this is the case that last time readBytes() read exactly same bytes - * left in the bytes array field, spec requires an extra readBytes(), - * and return -1 ;-( - */ - return -1; - } - if (value.length > available_bytes) { - - // read all! (available_bytes won't be zero.) - ret = dis.read(value, 0, available_bytes); - available_bytes = 0; - - // initiate first_time_readBytes to true for next field - first_time_readBytes = true; - } else if (value.length <= available_bytes) { - - // read all, but needs readBytes again - ret = dis.read(value, 0, value.length); - available_bytes = available_bytes - value.length; - first_time_readBytes = false; - } - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readBytes() - - /** - * Read a Java object from the stream message. - * - *

- * Note that this method can be used to return in objectified format, an - * object that had been written to the Stream with the equivalent - * writeObject method call, or it's equivalent primitive - * write method. - * - * @return a Java object from the stream message, in objectified format (ie. - * if it set as an int, then a Integer is returned). - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageEOFException - * if an end of message stream - * @exception MessageNotReadableException - * if message in write-only mode. - */ - public Object readObject() throws JMSException { - Object ret = null; - checkReadAccess(); - - try { - byte type = getType(); - - switch (type) { - case BOOLEAN_TYPE: - ret = Boolean.valueOf(dis.readBoolean()); - break; - case BYTE_TYPE: - ret = Byte.valueOf(dis.readByte()); - break; - case SHORT_TYPE: - ret = Short.valueOf(dis.readShort()); - break; - case CHAR_TYPE: - ret = Character.valueOf(dis.readChar()); - break; - case INT_TYPE: - ret = Integer.valueOf(dis.readInt()); - break; - case LONG_TYPE: - ret = Long.valueOf(dis.readLong()); - break; - case FLOAT_TYPE: - ret = Float.valueOf(dis.readFloat()); - break; - case DOUBLE_TYPE: - ret = Double.valueOf(dis.readDouble()); - break; - case STRING_TYPE: - ret = dis.readUTF(); - break; - default: - throw new MessageFormatException("type conversion is invalid"); - } // switch - } catch (EOFException e1) { - throw new MessageEOFException("at end of message"); // I18N - } catch (IOException e2) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e2); - throw jmsEx; - } // try .. catch - return ret; - } // readObject() - - /** - * Write a boolean to the stream message. The value - * true is written out as the value (byte)1; the - * value false is written out as the value (byte)0. - * - * @param value - * the boolean value to be written. - * - * @exception JMSException - * if JMS fails to read message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeBoolean(boolean value) throws JMSException { - try { - dos.writeByte((int) BOOLEAN_TYPE); - dos.writeBoolean(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeBoolean() - - /** - * Write out a byte to the stream message. - * - * @param value - * the byte value to be written. - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeByte(byte value) throws JMSException { - try { - dos.writeByte((int) BYTE_TYPE); - dos.writeByte((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeByte() - - /** - * Write a short to the stream message. - * - * @param value - * the short to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeShort(short value) throws JMSException { - try { - dos.writeByte((int) SHORT_TYPE); - dos.writeShort((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeShort() - - /** - * Write a char to the stream message. - * - * @param value - * the char value to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeChar(char value) throws JMSException { - try { - dos.writeByte((int) CHAR_TYPE); - dos.writeChar((int) value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeChar() - - /** - * Write an int to the stream message. - * - * @param value - * the int to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeInt(int value) throws JMSException { - try { - dos.writeByte((int) INT_TYPE); - dos.writeInt(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeInt() - - /** - * Write a long to the stream message. - * - * @param value - * the long to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeLong(long value) throws JMSException { - try { - dos.writeByte((int) LONG_TYPE); - dos.writeLong(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeLong() - - /** - * Write a float to the stream message. - * - * @param value - * the float value to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeFloat(float value) throws JMSException { - try { - dos.writeByte((int) FLOAT_TYPE); - dos.writeFloat(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeFloat() - - /** - * Write a double to the stream message. - * - * @param value - * the double value to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeDouble(double value) throws JMSException { - try { - dos.writeByte((int) DOUBLE_TYPE); - dos.writeDouble(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeDouble() - - /** - * Write a string to the stream message. - * - * @param value - * the String value to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeString(String value) throws JMSException { - try { - dos.writeByte((int) STRING_TYPE); - dos.writeUTF(value); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeString() - - /** - * Write a byte array to the stream message. - * - * @param value - * the byte array to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeBytes(byte[] value) throws JMSException { - writeBytes(value, 0, value.length); - } // writeBytes() - - /** - * Write a portion of a byte array to the stream message. - * - * @param value - * the byte array value to be written. - * @param offset - * the initial offset within the byte array. - * @param length - * the number of bytes to use. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - */ - public void writeBytes(byte[] value, int offset, int length) - throws JMSException { - - /* - * bytes array field format as following: TYPE LENGTH DATA - */ - try { - dos.writeByte((int) BYTES_TYPE); - dos.writeInt(length); - dos.write(value, offset, length); - setBufferIsDirty(true); - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - } // writeBytes() - - /** - * Write a Java object to the stream message. - * - *

- * Note that this method only works for the objectified primitive object types - * (Integer, Double, Long ...), String's and byte arrays. - * - * @param value - * the Java object to be written. - * - * @exception JMSException - * if JMS fails to write message due to some internal JMS error. - * @exception MessageNotWriteableException - * if message in read-only mode. - * @exception MessageFormatException - * if the object is invalid - */ - public void writeObject(Object value) throws JMSException { - if (value instanceof Boolean) { - writeBoolean(((Boolean) value).booleanValue()); - } else if (value instanceof Byte) { - writeByte(((Byte) value).byteValue()); - } else if (value instanceof Character) { - writeChar(((Character) value).charValue()); - } else if (value instanceof Double) { - writeDouble(((Double) value).doubleValue()); - } else if (value instanceof Float) { - writeFloat(((Float) value).floatValue()); - } else if (value instanceof Integer) { - writeInt(((Integer) value).intValue()); - } else if (value instanceof Long) { - writeLong(((Long) value).longValue()); - } else if (value instanceof Short) { - writeShort(((Short) value).shortValue()); - } else if (value instanceof String) { - writeString((String) value); - } else if (value instanceof byte[]) { - writeBytes((byte[]) value); - } else { - throw new MessageFormatException("Invalid type"); // I18N - } // if .. else - } // writeObject() - - /** - * Put the message in read-only mode, and reposition the stream to the - * beginning. - * - * @exception JMSException - * if JMS fails to reset the message due to some internal JMS - * error. - * @exception MessageFormatException - * if message has an invalid format - */ - public void reset() throws JMSException { - - // forces any buffered output bytes to be written out to the stream - // not really needed in this case, because the underlying output stream - // is a ByteArrayOutputStream - try { - if (bufferIsDirty) { - dos.flush(); - dos.close(); - baos.close(); - } - } catch (IOException e) { - JMSException jmsEx = new JMSException("IOException"); // I18N - - jmsEx.setLinkedException(e); - throw jmsEx; - } // try .. catch - if (baos != null) { - - // copy the content of DataOutputStream dos to buf - buf = baos.toByteArray(); - - } else { - if (buf == null) { - buf = new byte[0]; - } - } - bais = new ByteArrayInputStream(buf); - dis = new DataInputStream(bais); - - // initiate first_time_readBytes to true for readBytes() - first_time_readBytes = true; - setBufferIsDirty(false); - readMode = true; - } // reset() - - // overwrite methods in MessageImpl - - /** - * Method Declaration. - * - * - * @exception JMSException - * - * @see - */ - public void clearBody() throws JMSException { - buf = null; - bais = null; - dis = null; - readMode = false; - } // clearBody() - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java b/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java deleted file mode 100644 index 141ca2f0ea..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)TestMessageListener.java 1.11 03/05/16 - */ -package com.sun.ts.tests.jms.common; - -import java.util.ArrayList; - -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.Message; -import jakarta.jms.MessageConsumer; -import jakarta.jms.TextMessage; - -/** - * Message Listener implementation for JMS testing - */ -public class TestMessageListener implements jakarta.jms.MessageListener { - public MessageConsumer mConsumer; - - public DoneLatch monitor; - - public ArrayList messageArray = new ArrayList(); - - /** - * Constructor takes a MessageConsumer argument - * - * @param MessageConsumer - */ - public TestMessageListener(MessageConsumer mc, DoneLatch dl) { - mConsumer = mc; - monitor = dl; - } - - /** - * Returns the list of messages received. - * - * @return ArrayList the list of Messages that have been received - */ - public ArrayList getMessageArray() { - return messageArray; - } - - /** - * Clears the list of messages received. - * - */ - public DoneLatch getLatch() { - return monitor; - } - - /** - * Clears the list of messages received. - * - */ - public void clearMessageArray() { - messageArray.clear(); - } - - /** - * Responds to incoming Messages. A TextMessage is the end of stream signal. - * - * @param Message - * the message passed to the listener - */ - public void onMessage(Message message) { - try { - TestUtil.logTrace("MessageListener for " + mConsumer.toString() - + " received message: " + message.toString()); - messageArray.add(message); - } catch (Exception e) { - TestUtil.logErr("Error in MessageListener: " + e.toString(), e); - } - if (message instanceof TextMessage) { - monitor.allDone(); - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java deleted file mode 100644 index 3b51d1eec7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java +++ /dev/null @@ -1,355 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Client.java 59995 2009-10-14 12:05:29Z af70133 $ - */ - -package com.sun.ts.tests.jms.commonee; - -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TSNamingContextInterface; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.jms.BytesMessage; -import jakarta.jms.JMSException; -import jakarta.jms.MapMessage; -import jakarta.jms.Message; -import jakarta.jms.ObjectMessage; -import jakarta.jms.Queue; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueReceiver; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.StreamMessage; -import jakarta.jms.TextMessage; -import jakarta.jms.TopicConnection; -import jakarta.jms.TopicConnectionFactory; -import jakarta.jms.TopicPublisher; -import jakarta.jms.TopicSession; - -public class Client extends EETest { - - // Naming specific member variables - protected TSNamingContextInterface context = null; - - protected Properties props = null; - - protected Queue rcvrQueue; - - protected QueueConnection qConnect; - - protected QueueSession session; - - protected QueueConnectionFactory qFactory; - - protected QueueSender qSender; - - protected TopicConnection tConnect; - - protected TopicSession tSession; - - protected TopicConnectionFactory tFactory; - - protected TopicPublisher tPub; - - protected String jmsUser = null; - - protected String jmsPassword = null; - - protected String hostname = null; - - protected String traceFlag = null; - - protected String logPort = null; - - protected TextMessage msg = null; - - // get this from ts.jte - protected long timeout = 0; - - /* - * @class.setup_props: - * - * jms_timeout; user; password; harness.log.traceflag; harness.log.port; - * generateSQL; - * - * @class.testArgs: -ap tssql.stmt - * - * - */ - public void setup(String[] args, Properties p) throws Exception { - props = p; - - try { - jmsUser = TestUtil.getProperty(p, "user"); - if (jmsUser == null) { - TestUtil.logTrace("user is null"); - throw new Exception("Error getting user"); - } - - jmsPassword = TestUtil.getProperty(p, "password"); - if (jmsPassword == null) { - TestUtil.logTrace("password is null"); - throw new Exception("Error getting password"); - } - - String time = TestUtil.getProperty(p, "jms_timeout"); - if (time == null) { - TestUtil.logTrace("jms_timeout is null"); - throw new Exception("Error getting jms_timeout"); - } - - hostname = TestUtil.getProperty(p, "harness.host"); - if (hostname == null) { - TestUtil.logTrace("harness.host is null"); - throw new Exception("Error getting harness.host"); - } - traceFlag = TestUtil.getProperty(p, "harness.log.traceflag"); - if (traceFlag == null) { - TestUtil.logTrace("harness.log.traceflag is null"); - throw new Exception("Error getting harness.log.traceflag"); - } - logPort = TestUtil.getProperty(p, "harness.log.port"); - if (logPort == null) { - TestUtil.logTrace("harness.log.port is null"); - throw new Exception("Error getting harness.log.port"); - } - - timeout = Long.parseLong(time); - - TestUtil.logTrace("in client setup"); - - context = new TSNamingContext(); - TestUtil.logTrace("Client: Do lookups!"); - - rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); - - qFactory = (QueueConnectionFactory) context - .lookup("java:comp/env/jms/MyQueueConnectionFactory"); - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - session = qConnect.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - qConnect.start(); - - tFactory = (TopicConnectionFactory) context - .lookup("java:comp/env/jms/MyTopicConnectionFactory"); - tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); - tSession = tConnect.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); - tConnect.start(); - - TestUtil.logTrace("get the connection and starter up"); - TestUtil - .logTrace("Client: connection started, now send initialization msg!"); - - } catch (Exception e) { - throw new Exception("Setup Failed!", e); - } - } - - protected void createTestMessage(String TestCase, int num) { - String myMessage = "MDB deploy tests"; - Enumeration e; - String key = null; - String notValid = "."; - try { - msg = session.createTextMessage(); - e = props.propertyNames(); - // we need to extract the properties passed from the harness - // and set them in the message properties - // This is so we can send them to the mdb - msg.setStringProperty("user", jmsUser); - msg.setStringProperty("password", jmsPassword); - msg.setStringProperty("harnesshost", hostname); - msg.setStringProperty("harnesslogtraceflag", traceFlag); - msg.setStringProperty("harnesslogport", logPort); - e = props.propertyNames(); - key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - if ((key.indexOf(notValid) == -1) && (key.indexOf("***") == -1)) { - String value = TestUtil.getProperty(props, key); - msg.setStringProperty(key, value); - } - } - - msg.setText(myMessage); - msg.setIntProperty("TestCaseNum", num); - msg.setStringProperty("COM_SUN_JMS_TESTNAME", TestCase); - - } catch (Exception ee) { - TestUtil.printStackTrace(ee); - TestUtil.logMsg("key was: " + key); - TestUtil.logMsg("props was: " + props.getProperty(key)); - TestUtil.logMsg("Error setting properties"); - } - } - - public boolean checkOnResponse(String TestCase) { - boolean status = false; - try { - TestUtil.logMsg("@checkOnResponse"); - status = recvMessageInternal(session, TestCase); - TestUtil.logMsg("Close the session"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - return status; - } - - protected boolean recvMessageInternal(QueueSession session, String TestCase) - throws JMSException { - boolean retcode = false; - TestUtil.logMsg("@recvMessageInternal"); - // Create a message consumer. - QueueReceiver rcvr = session.createReceiver(rcvrQueue); - // dequeue the response from the mdb - Message msgRec = null; - - for (int i = 0; i < 10; ++i) { - TestUtil - .logMsg("@recvMessageInternal trying to receive the message: " + i); - msgRec = rcvr.receive(timeout); - if (msgRec != null) { - break; - } - } // end for loop - if (msgRec != null) { - if (msgRec instanceof TextMessage) { - TestUtil.logMsg("**** Received msg text = " - + ((TextMessage) msgRec).getText() + " ****"); - } - TestUtil.logMsg("**** Received msg getStringProperty('TestCase') = " - + msgRec.getStringProperty("TestCase")); - TestUtil.logMsg("**** Received msg getStringProperty('Status') = " - + msgRec.getStringProperty("Status")); - if (msgRec.getStringProperty("TestCase") == null - || msgRec.getStringProperty("Status") == null) { - TestUtil.logMsg( - "Fail: unexpected message received from MDB_QUEUE_REPLY msgRec=" - + msgRec); - } else if (msgRec.getStringProperty("TestCase").equals(TestCase) - && msgRec.getStringProperty("Status").equals("Pass")) { - TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil - .logMsg("Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logMsg("Pass: we got the expected msg back! "); - retcode = true; - } else if (msgRec.getStringProperty("Status").equals("Fail")) { - TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil - .logMsg("Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logMsg("Fail: Error(s) occurred! "); - } else { - TestUtil.logMsg("Fail: we didnt get the expected msg back! "); - TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); - } - } else if (msgRec == null) { - TestUtil.logMsg("Fail: we didnt get any msg back! "); - } - return retcode; - } - - public void cleanup() throws Exception { - try { - closeDefaultConnections(); - flushQueue(); - } catch (Exception e) { - TestUtil.logErr("Cleanup error: " + e.toString()); - TestUtil.printStackTrace(e); - } - } - - /** - * Use this method at cleanup time to remove any messages that have remained - * on the queue. - * - */ - - public void flushQueue() throws Exception { - QueueConnection qc = null; - QueueReceiver qr = null; - QueueSession qs = null; - int numMsgsFlushed = 0; - try { - qc = qFactory.createQueueConnection(jmsUser, jmsPassword); - qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); - qc.start(); // start the connections so that messages may be received. - - qr = qs.createReceiver(rcvrQueue); - // flush the queue - Message msg = qr.receive(timeout); - while (msg != null) { - if (msg instanceof TextMessage) { - TestUtil.logMsg("**** Flushed TextMessage =" - + ((TextMessage) msg).getText() + " ****"); - } else { - String msgType = "Message"; - if (msg instanceof BytesMessage) - msgType = "BytesMessage"; - else if (msg instanceof MapMessage) - msgType = "MapMessage"; - else if (msg instanceof ObjectMessage) - msgType = "ObjectMessage"; - else if (msg instanceof StreamMessage) - msgType = "StreamMessage"; - TestUtil.logMsg("**** Flushed Message of type " + msgType + " ****"); - } - numMsgsFlushed++; - msg = qr.receiveNoWait(); - } - if (numMsgsFlushed > 0) { - TestUtil.logMsg("flushed " + numMsgsFlushed + " messages"); - } - - } catch (Exception e) { - TestUtil - .logErr("Cleanup error attempting to flush Queue: " + e.toString()); - TestUtil.printStackTrace(e); - } finally { - qc.close(); - } - } - - /** - * Close default connections if open - * - * @exception Exception - * - * @see - */ - public void closeDefaultConnections() throws Exception { - try { - if (qConnect != null) { - TestUtil.logMsg("Client: Closing QueueConnection"); - qConnect.close(); - } - if (tConnect != null) { - TestUtil.logMsg("Client: Closing TopicConnection"); - tConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Cleanup error: " + e.toString()); - TestUtil.printStackTrace(e); - - } - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java deleted file mode 100644 index 8baedc1720..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MDB_Q_TestEJB.java 59995 2009-10-14 12:05:29Z af70133 $ - */ -package com.sun.ts.tests.jms.commonee; - -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import com.sun.ts.tests.jms.common.JmsUtil; -import jakarta.annotation.Resource; -import jakarta.ejb.EJBException; -import jakarta.ejb.PostActivate; -import jakarta.ejb.PrePassivate; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.Queue; -import jakarta.jms.QueueBrowser; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueReceiver; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.TextMessage; - -@Stateful -@Remote(MDB_Q_Test.class) -public class MDB_Q_TestEJB implements MDB_Q_Test { - - @Resource - private SessionContext sessionContext; - - private Properties p = null; - - @Resource(name = "jms/MDB_QUEUE_REPLY") - private transient Queue rcvrQueue; - - @Resource(name = "jms/MDB_QUEUE") - private transient Queue q; - - @Resource(name = "jms/MyQueueConnectionFactory") - private transient QueueConnectionFactory qFactory; - - private transient QueueConnection qConnect; - - private String jmsUser; - - private String jmsPassword; - - private long timeout; - - public MDB_Q_TestEJB() { - } - - public void setup(Properties props) { - TestUtil.logTrace("MDB_Q_TestEJB.setup()"); - p = props; - try { - TestUtil.init(props); - // get props - timeout = Long.parseLong(TestUtil.getProperty(props, "jms_timeout")); - jmsUser = TestUtil.getProperty(props, "user"); - jmsPassword = TestUtil.getProperty(props, "password"); - // check props for errors - if (timeout < 1) { - throw new Exception( - "'jms_timeout' (milliseconds) in ts.jte must be > 0"); - } - if (jmsUser == null) { - throw new Exception("'user' in ts.jte must be null"); - } - if (jmsPassword == null) { - throw new Exception("'password' in ts.jte must be null"); - } - if (qFactory == null || q == null | rcvrQueue == null - || sessionContext == null) { - throw new Exception("@Resource injection failed"); - } - } catch (Exception e) { - throw new EJBException("@setup failed: ", e); - } - } - - public boolean askMDBToRunATest(String typeOfTest) { - TestUtil.logTrace("MDB_Q_TestEJB.askMDBToRunATest()"); - boolean ok = true; - String myMessage = "Sending a message to mdb"; - - try { - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - QueueSender qSender = session.createSender(q); - - // create a text message - TextMessage msg = session.createTextMessage(); - JmsUtil.addPropsToMessage(msg, p); - msg.setText(myMessage); - msg.setStringProperty("TestCase", typeOfTest); - - qSender.send(msg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("askMDBToRunATest: Error!", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - return ok; - } - - public boolean askMDBToSendAMessage(String typeOfMessage) { - TestUtil.logTrace("MDB_Q_TestEJB.askMDBToSendAMessage()"); - boolean ok = true; - String myMessage = "I want you to send a message"; - - try { - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - - QueueSender qSender = session.createSender(q); - TestUtil - .logTrace("got a q sender for: " + qSender.getQueue().getQueueName()); - - // create a text message - TextMessage msg = session.createTextMessage(); - JmsUtil.addPropsToMessage(msg, p); - msg.setText(myMessage); - msg.setStringProperty("MessageType", typeOfMessage); - - qSender.send(msg); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("@askMDBToSendAMessage: Error!", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing connection in askMDBToSendAMessage", e); - } - } - return ok; - } - - // Validate that a given message was sent by mdb - // prop = validate string - // - public boolean checkOnResponse(String prop) { - - boolean status = false; - try { - TestUtil.logTrace("MDB_Q_TestEJB.checkOnResponse()"); - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - status = recvMessageInternal(session, prop); - TestUtil.logTrace("Close the session"); - session.close(); - } catch (Exception e) { - TestUtil.logErr("Error in checkOnResponse", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - return status; - } - - private boolean recvMessageInternal(QueueSession session, String prop) - throws JMSException { - boolean retcode = false; - TestUtil.logTrace("MDB_Q_TestEJB.recvMessageInternal()"); - // Create a message producer. - QueueReceiver rcvr = session.createReceiver(rcvrQueue); - // dequeue the response from the mdb - Message msgRec = null; - - for (int i = 0; i < 10; ++i) { - TestUtil - .logTrace("@recvMessageInternal trying to receive the message: " + i); - msgRec = rcvr.receive(timeout); - if (msgRec != null) { - break; - } - } // end for loop - - if (msgRec != null) { - if ((msgRec.getStringProperty("TestCase") != null) - || (msgRec.getStringProperty("Status") != null)) { - if (msgRec.getStringProperty("TestCase").equals(prop) - && msgRec.getStringProperty("Status").equals("Pass")) { - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil.logTrace( - "Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logTrace("Pass: we got the expected msg back! "); - retcode = true; - - } else if (msgRec.getStringProperty("Status").equals("Fail")) { - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil.logTrace( - "Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logTrace("Fail: Error(s) occurred! "); - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - } - } else if (msgRec.getStringProperty("MessageType") != null) { - if (msgRec.getStringProperty("MessageType").equals(prop)) { - TestUtil.logTrace("Success: received Msg from Q! " - + msgRec.getStringProperty("MessageType")); - TestUtil.logTrace("Pass: we got the expected msg back! "); - retcode = true; - - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - TestUtil.logTrace( - "MessageType: " + msgRec.getStringProperty("MessageType")); - } - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - } - } else { - TestUtil.logTrace("Fail: we didnt get any msg back! "); - } - return retcode; - } - - public boolean isThereSomethingInTheQueue() { - TestUtil.logTrace("MDB_Q_TestEJB.isThereSomethingInTheQueue()"); - QueueBrowser qBrowser = null; - Enumeration msgs = null; - boolean ret = false; - - try { - // Hopefully nothing is left in the queue - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - qBrowser = session.createBrowser(rcvrQueue); - msgs = qBrowser.getEnumeration(); - if (msgs.hasMoreElements()) { - ret = true; - } - qBrowser.close(); - session.close(); - - } catch (Exception e) { - TestUtil.logErr("Error in isThereSomethingInTheQueue", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - return ret; - } - - public void cleanTheQueue() { - TestUtil.logTrace("MDB_Q_TestEJB.cleanTheQueue()"); - QueueBrowser qBrowser = null; - Enumeration msgs = null; - int numMsgs = 0; - - try { - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - TextMessage msgRec = null; - - // delete anything left in the queue - qBrowser = session.createBrowser(rcvrQueue); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - qBrowser.close(); - - // Read messages until Q is cleaned - QueueReceiver rcvr = session.createReceiver(rcvrQueue); - TestUtil.logTrace("Cleaning " + numMsgs + " messages from the Q: " - + rcvrQueue.getQueueName()); - for (int n = 0; n < numMsgs; n++) { - // - TestUtil.logTrace( - "dequeuing msg: " + n + " from the Q: " + rcvrQueue.getQueueName()); - for (int i = 0; i < 10; ++i) { - msgRec = (TextMessage) rcvr.receive(timeout); - if (msgRec != null) { - TestUtil.logTrace("dequeued message: " + n); - break; - } - TestUtil.logTrace( - "Attempt no: " + i + " Trying to dequeue message: " + n); - } // end of internal for loop - } - session.close(); - } catch (Exception e) { - TestUtil.logErr("Error in cleanTheQueue", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - } - - @Remove - public void remove() { - TestUtil.logTrace("MDB_Q_TestEJB.remove()"); - } - - @PostActivate - public void activate() { - TestUtil.logTrace("MDB_Q_TestEJB.activate()"); - - try { - TSNamingContext context = new TSNamingContext(); - TestUtil.logTrace("got the context"); - - rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); - q = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE"); - qFactory = (QueueConnectionFactory) context - .lookup("java:comp/env/jms/MyQueueConnectionFactory"); - } catch (Exception e) { - TestUtil.logErr("Error looking up Queue, QueueConnectionFactory objects", - e); - throw new EJBException("@activate: Error!", e); - } - } - - @PrePassivate - public void passivate() { - TestUtil.logTrace("MDB_Q_TestEJB.passivate()"); - - if (qConnect != null) { - try { - qConnect.close(); - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - qConnect = null; - } - rcvrQueue = null; - q = null; - qFactory = null; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java deleted file mode 100644 index 853467a7e6..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java +++ /dev/null @@ -1,411 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: MDB_T_TestEJB.java 59995 2009-10-14 12:05:29Z af70133 $ - */ -package com.sun.ts.tests.jms.commonee; - -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.tests.jms.common.JmsUtil; -import jakarta.annotation.Resource; -import jakarta.ejb.EJBException; -import jakarta.ejb.PostActivate; -import jakarta.ejb.PrePassivate; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.jms.JMSException; -import jakarta.jms.Message; -import jakarta.jms.Queue; -import jakarta.jms.QueueBrowser; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueReceiver; -import jakarta.jms.QueueSession; -import jakarta.jms.TextMessage; -import jakarta.jms.Topic; -import jakarta.jms.TopicConnection; -import jakarta.jms.TopicConnectionFactory; -import jakarta.jms.TopicPublisher; -import jakarta.jms.TopicSession; - -@Stateful -@Remote(MDB_T_Test.class) -public class MDB_T_TestEJB implements MDB_T_Test { - - @Resource - private SessionContext sessionContext; - - private Properties p = null; - - @Resource(name = "jms/MDB_QUEUE_REPLY") - private transient Queue rcvrQueue; - - @Resource(name = "jms/MyQueueConnectionFactory") - private transient QueueConnectionFactory qFactory; - - private transient QueueConnection qConnect; - - @Resource(name = "jms/MDB_TOPIC") - private transient Topic topic; - - @Resource(name = "jms/MyTopicConnectionFactory") - private transient TopicConnectionFactory tFactory; - - private transient TopicConnection tConnect; - - private String jmsUser; - - private String jmsPassword; - - private long timeout; - - public MDB_T_TestEJB() { - } - - public void setup(Properties props) { - TestUtil.logTrace("MDB_T_TestEJB.setup()"); - p = props; - try { - TestUtil.init(props); - // get props - timeout = Long.parseLong(TestUtil.getProperty(props, "jms_timeout")); - jmsUser = TestUtil.getProperty(props, "user"); - jmsPassword = TestUtil.getProperty(props, "password"); - // check props for errors - if (timeout < 1) { - throw new Exception( - "'jms_timeout' (milliseconds) in ts.jte must be > 0"); - } - if (jmsUser == null) { - throw new Exception("'user' in ts.jte must not be null"); - } - if (jmsPassword == null) { - throw new Exception("'password' in ts.jte must not be null"); - } - if (qFactory == null || tFactory == null | rcvrQueue == null - || topic == null || sessionContext == null) { - throw new Exception("@Resource injection failed"); - } - } catch (Exception e) { - throw new EJBException("@setup failed: ", e); - } - } - - public boolean askMDBToRunATest(String typeOfTest) { - TestUtil.logTrace("MDB_T_TestEJB.askMDBToRunATest()"); - boolean ok = true; - String myMessage = "Sending a message to mdb"; - - try { - tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); - TopicSession tSession = tConnect.createTopicSession(true, 0); - tConnect.start(); - TopicPublisher tPublisher = tSession.createPublisher(topic); - // create a text message - TextMessage msg = tSession.createTextMessage(); - JmsUtil.addPropsToMessage(msg, p); - - msg.setText(myMessage); - msg.setStringProperty("TestCase", typeOfTest); - - // send the message - tPublisher.publish(msg); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("@askMDBToRunATest: Error!", e); - } finally { - try { - if (tConnect != null) { - tConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing TopicConnection", e); - } - } - return ok; - } - - public boolean askMDBToSendAMessage(String typeOfMessage) { - TestUtil.logTrace("MDB_T_TestEJB.askMDBToSendAMessage()"); - boolean ok = true; - String myMessage = "I want you to send a message"; - - try { - tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); - TopicSession session = tConnect.createTopicSession(true, 0); - TopicPublisher tPublisher = session.createPublisher(topic); - - tConnect.start(); - - // create a text message - TextMessage msg = session.createTextMessage(); - JmsUtil.addPropsToMessage(msg, p); - - msg.setText(myMessage); - msg.setStringProperty("MessageType", typeOfMessage); - TestUtil.logTrace("@TestEJB - about to publish a message"); - // send the message - tPublisher.publish(msg); - } catch (Exception e) { - TestUtil.logErr("Unexpected Exception in askMDBToSendAMessage:", e); - throw new EJBException("@askMDBToSendAMessage: Error!"); - } finally { - try { - if (tConnect != null) { - tConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error Closing TopicConnection!", e); - } - } - return ok; - } - - // Validate that a given message was sent by mdb - // prop = validate string - // - public boolean checkOnResponse(String prop) { - - boolean status = false; - try { - TestUtil.logTrace("MDB_T_TestEJB.checkOnResponse()"); - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - status = recvMessageInternal(session, prop); - TestUtil.logTrace("Close the session"); - session.close(); - } catch (Exception e) { - TestUtil.logErr("Error in checkOnResponse", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - return status; - } - - private boolean recvMessageInternal(QueueSession session, String prop) - throws JMSException { - boolean retcode = false; - TestUtil.logTrace("MDB_T_TestEJB.recvMessageInternal()"); - // Create a message producer. - QueueReceiver rcvr = session.createReceiver(rcvrQueue); - // dequeue the response from the mdb - Message msgRec = null; - - for (int i = 0; i < 10; ++i) { - TestUtil - .logTrace("@recvMessageInternal trying to receive the message: " + i); - msgRec = rcvr.receive(timeout); - if (msgRec != null) { - break; - } - } // end for loop - - if (msgRec != null) { - if ((msgRec.getStringProperty("TestCase") != null) - || (msgRec.getStringProperty("Status") != null)) { - if (msgRec.getStringProperty("TestCase").equals(prop) - && msgRec.getStringProperty("Status").equals("Pass")) { - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil.logTrace( - "Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logTrace("Pass: we got the expected msg back! "); - retcode = true; - } else if (msgRec.getStringProperty("Status").equals("Fail")) { - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - TestUtil.logTrace( - "Status from msg: " + msgRec.getStringProperty("Status")); - TestUtil.logTrace("Fail: Error(s) occurred! "); - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - TestUtil - .logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); - } - } else if (msgRec.getStringProperty("MessageType") != null) { - if (msgRec.getStringProperty("MessageType").equals(prop)) { - TestUtil.logTrace("Success: received Msg"); - TestUtil.logTrace("Pass: we got the expected msg back! "); - retcode = true; - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - TestUtil.logTrace( - "MessageType: " + msgRec.getStringProperty("MessageType")); - } - } else { - TestUtil.logTrace("Fail: we didnt get the expected msg back! "); - } - } else { - TestUtil.logTrace("Fail: we didnt get any msg back! "); - } - return retcode; - } - - public boolean isThereSomethingInTheQueue() { - TestUtil.logTrace("MDB_T_TestEJB.isThereSomethingInTheQueue()"); - QueueBrowser qBrowser = null; - Enumeration msgs = null; - boolean ret = false; - - try { - // Hopefully nothing is left in the queue - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - qBrowser = session.createBrowser(rcvrQueue); - msgs = qBrowser.getEnumeration(); - if (msgs.hasMoreElements()) { - ret = true; - } - qBrowser.close(); - session.close(); - - } catch (Exception e) { - TestUtil.logErr("Error in isThereSomethingInTheQueue", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - return ret; - } - - public void cleanTheQueue() { - TestUtil.logTrace("MDB_T_TestEJB.cleanTheQueue()"); - QueueBrowser qBrowser = null; - Enumeration msgs = null; - int numMsgs = 0; - - try { - qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); - QueueSession session = qConnect.createQueueSession(true, 0); - qConnect.start(); - TextMessage msgRec = null; - - // delete anything left in the queue - qBrowser = session.createBrowser(rcvrQueue); - // count the number of messages - msgs = qBrowser.getEnumeration(); - while (msgs.hasMoreElements()) { - msgs.nextElement(); - numMsgs++; - } - qBrowser.close(); - - // Read messages until Q is cleaned - QueueReceiver rcvr = session.createReceiver(rcvrQueue); - TestUtil.logTrace("Cleaning " + numMsgs + " messages from the Q: " - + rcvrQueue.getQueueName()); - for (int n = 0; n < numMsgs; n++) { - - TestUtil.logTrace( - "dequeuing msg: " + n + " from the Q: " + rcvrQueue.getQueueName()); - for (int i = 0; i < 10; ++i) { - msgRec = (TextMessage) rcvr.receive(timeout); - if (msgRec != null) { - TestUtil.logTrace("dequeued message: " + n); - break; - } - TestUtil.logTrace( - "Attempt no: " + i + " Trying to dequeue message: " + n); - } // end of internal for loop - } - session.close(); - } catch (Exception e) { - TestUtil.logErr("Error in cleanTheQueue", e); - } finally { - try { - if (qConnect != null) { - qConnect.close(); - } - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - } - } - - @Remove - public void remove() { - TestUtil.logTrace("MDB_T_TestEJB.remove()"); - } - - @PostActivate - public void activate() { - TestUtil.logTrace("MDB_T_TestEJB.activate()"); - try { - TSNamingContext context = new TSNamingContext(); - rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); - qFactory = (QueueConnectionFactory) context - .lookup("java:comp/env/jms/MyQueueConnectionFactory"); - tFactory = (TopicConnectionFactory) context - .lookup("java:comp/env/jms/MyTopicConnectionFactory"); - topic = (Topic) context.lookup("java:comp/env/jms/MDB_TOPIC"); - } catch (Exception e) { - TestUtil.logErr( - "Error looking up Queue, Topic, ConnectionFactory objects", e); - throw new EJBException("@activate: Error!", e); - } - } - - @PrePassivate - public void passivate() { - TestUtil.logTrace("MDB_T_TestEJB.passivate()"); - - rcvrQueue = null; - - if (qConnect != null) { - try { - qConnect.close(); - } catch (Exception e) { - TestUtil.logErr("Error closing QueueConnection", e); - } - qConnect = null; - } - - qFactory = null; - - topic = null; - if (tConnect != null) { - try { - tConnect.close(); - } catch (Exception e) { - TestUtil.logErr("Error closing TopicConnection", e); - } - tConnect = null; - } - - tFactory = null; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java deleted file mode 100644 index db00214271..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ParentMsgBean.java 59995 2009-10-14 12:05:29Z af70133 $ - */ - -package com.sun.ts.tests.jms.commonee; - -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.EJBException; -import jakarta.ejb.MessageDrivenBean; -import jakarta.ejb.MessageDrivenContext; -import jakarta.jms.Message; -import jakarta.jms.MessageListener; -import jakarta.jms.Queue; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.TextMessage; - -public class ParentMsgBean implements MessageDrivenBean, MessageListener { - - // properties object needed for logging, - // get this from the message object passed into - // the onMessage method. - protected java.util.Properties p = null; - - protected TSNamingContext context = null; - - protected MessageDrivenContext mdc = null; - - // JMS PTP - protected QueueConnectionFactory qFactory; - - protected QueueConnection qConnection = null; - - protected Queue queueR = null; - - protected Queue queue = null; - - protected QueueSender mSender = null; - - protected boolean result = false; - - public ParentMsgBean() { - TestUtil.logTrace("@MsgBean()!"); - }; - - public void ejbCreate() { - TestUtil.logTrace("@EJBCreate()!"); - - try { - - context = new TSNamingContext(); - qFactory = (QueueConnectionFactory) context - .lookup("java:comp/env/jms/MyQueueConnectionFactory"); - queueR = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("MDB ejbCreate Error", e); - } - } - - public void setMessageDrivenContext(MessageDrivenContext mdc) { - TestUtil.logTrace("@MsgBean:setMessageDrivenContext()!"); - this.mdc = mdc; - } - - public void ejbRemove() { - TestUtil.logTrace("@ejbRemove()"); - } - - public void onMessage(Message msg) { - QueueSession qSession = null; - TextMessage messageSent = null; - String testName = null; - String hostname = null; - String traceflag = null; - String logport = null; - - p = new Properties(); - try { - // because a jms property name cannot contain '.' the - // following properties are a special case - hostname = msg.getStringProperty("harnesshost"); - traceflag = msg.getStringProperty("harnesslogtraceflag"); - logport = msg.getStringProperty("harnesslogport"); - p.put("harness.host", hostname); - p.put("harness.log.traceflag", traceflag); - p.put("harness.log.port", logport); - - // now pull out the rest of the properties from the message - Enumeration e = msg.getPropertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - p.put(key, msg.getStringProperty(key)); - } - - testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); - qConnection = qFactory.createQueueConnection(); - if (qConnection == null) - throw new EJBException("MDB connection Error!"); - - qSession = qConnection.createQueueSession(true, - Session.SESSION_TRANSACTED); - - // Diagnostic - pull out after testing - // for (Enumeration enum = p.propertyNames(); enum.hasMoreElements();){ - // System.out.println(enum.nextElement()); - // } - TestUtil.init(p); - TestUtil.logTrace("will run TestCase: " + testName); - runTests(msg, qSession, testName, p); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - } finally { - if (qConnection != null) { - try { - qConnection.close(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } - } - - } - - protected void runTests(Message msg, QueueSession qSession, String testName, - java.util.Properties p) { - TestUtil.logTrace("ParentMsgBean - runTests"); - - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java deleted file mode 100644 index 71e3647267..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: ParentMsgBeanNoTx.java 59995 2009-10-14 12:05:29Z af70133 $ - */ - -package com.sun.ts.tests.jms.commonee; - -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.ejb.EJBException; -import jakarta.ejb.MessageDrivenBean; -import jakarta.ejb.MessageDrivenContext; -import jakarta.jms.Message; -import jakarta.jms.MessageListener; -import jakarta.jms.Queue; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.TextMessage; - -public class ParentMsgBeanNoTx implements MessageDrivenBean, MessageListener { - - // properties object needed for logging, - // get this from the message object passed into - // the onMessage method. - protected java.util.Properties p = null; - - protected TSNamingContext context = null; - - protected MessageDrivenContext mdc = null; - - // JMS PTP - protected QueueConnectionFactory qFactory; - - protected QueueConnection qConnection = null; - - protected Queue queueR = null; - - protected Queue queue = null; - - protected QueueSender mSender = null; - - protected boolean result = false; - - public ParentMsgBeanNoTx() { - TestUtil.logTrace("@MsgBean()!"); - }; - - public void ejbCreate() { - TestUtil.logTrace("@EJBCreate()!"); - - try { - - context = new TSNamingContext(); - qFactory = (QueueConnectionFactory) context - .lookup("java:comp/env/jms/MyQueueConnectionFactory"); - queueR = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("MDB ejbCreate Error", e); - } - } - - public void setMessageDrivenContext(MessageDrivenContext mdc) { - TestUtil.logTrace("@MsgBean:setMessageDrivenContext()!"); - this.mdc = mdc; - } - - public void ejbRemove() { - TestUtil.logTrace("@ejbRemove()"); - } - - public void onMessage(Message msg) { - QueueSession qSession = null; - TextMessage messageSent = null; - String testName = null; - String hostname = null; - String traceflag = null; - String logport = null; - - p = new Properties(); - try { - // because a jms property name cannot contain '.' the - // following properties are a special case - hostname = msg.getStringProperty("harnesshost"); - traceflag = msg.getStringProperty("harnesslogtraceflag"); - logport = msg.getStringProperty("harnesslogport"); - p.put("harness.host", hostname); - p.put("harness.log.traceflag", traceflag); - p.put("harness.log.port", logport); - - // now pull out the rest of the properties from the message - Enumeration e = msg.getPropertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - p.put(key, msg.getStringProperty(key)); - } - - testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); - qConnection = qFactory.createQueueConnection(); - if (qConnection == null) - throw new EJBException("MDB connection Error!"); - - qSession = qConnection.createQueueSession(false, - Session.AUTO_ACKNOWLEDGE); - - // Diagnostic - pull out after testing - // for (Enumeration enum = p.propertyNames(); enum.hasMoreElements();){ - // System.out.println(enum.nextElement()); - // } - TestUtil.init(p); - TestUtil.logTrace("will run TestCase: " + testName); - runTests(msg, qSession, testName, p); - - } catch (Exception e) { - TestUtil.printStackTrace(e); - } finally { - if (qConnection != null) { - try { - qConnection.close(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - } - } - } - - } - - protected void runTests(Message msg, QueueSession qSession, String testName, - java.util.Properties p) { - TestUtil.logTrace("ParentMsgBeanNoTx - runTests"); - - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java deleted file mode 100644 index 8c5c2124fa..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: Tests.java 59995 2009-10-14 12:05:29Z af70133 $ - */ -package com.sun.ts.tests.jms.commonee; - -import java.util.ArrayList; -import java.util.Properties; - -import jakarta.ejb.Remote; -import jakarta.jms.Queue; - -@Remote -public interface Tests { - public void initLogging(Properties p); - - public void remove(); - - public ArrayList sendTextMessage_CQ(String tesname, String text); - - public ArrayList sendMessageP_CQ(String tesname, String text, boolean val); - - public ArrayList sendMessagePP_CQ(String tesname, String text, boolean val, - String props, String value); - - public String receiveTextMessage_CQ(); - - public String receiveMessageS_CQ(String selector); - - public int browseTextMessage_CQ(int num, String msg); - - public int browseMessageS_CQ(int num, String msg, String selector); - - public ArrayList sendTextMessage_CT(String tesname, String text); - - public String receiveTextMessage_CT(); - - public int getAck_CQ(); - - public int getAck_CT(); - - public boolean getQueue(); - - public boolean getSelector(String selector); - - public ArrayList sendTextMessage_Q(String tesname); - - public ArrayList sendTextMessage_Q(String tesname, boolean setDest); - - public ArrayList sendTextMessage_Q(String tesname, String text); - - public ArrayList sendTextMessage_Q(String tesname, String text, - Queue testQueue); - - public ArrayList sendTextMessage_Q(String tesname, boolean setDest, int mode); - - public ArrayList sendFullBytesMessage_Q(String tesname); - - public ArrayList sendBytesMessage_Q(String tesname, boolean setDest); - - public ArrayList sendBytesMessage_Q(String tesname, boolean setDest, - int mode); - - public boolean verifyFullBytesMessage(); - - public ArrayList sendFullMapMessage_Q(String tesname); - - public ArrayList sendMapMessage_Q(String tesname, boolean setDest); - - public ArrayList sendMapMessage_Q(String tesname, boolean setDest, int mode); - - public boolean verifyFullMapMessage(); - - public ArrayList sendFullStreamMessage_Q(String tesname); - - public ArrayList sendStreamMessage_Q(String tesname, boolean setDest); - - public ArrayList sendStreamMessage_Q(String tesname, boolean setDest, - int mode); - - public boolean verifyFullStreamMessage(); - - public ArrayList sendObjectMessage_Q(String tesname); - - public ArrayList sendObjectMessage_Q(String tesname, boolean setDest); - - public ArrayList sendObjectMessage_Q(String tesname, boolean setDest, - int mode); - - public String getMessageID(); - - public long getTimeStamp(); - - public String getCorrelationID(); - - public String getReplyTo(); - - public String getDestination_1(); - - public String getDestination(); - - public String getType(); - - public int getPriority(); - - public long getExpiration(); - - public int getDeliveryMode(); - - public String getText(); -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java deleted file mode 100644 index 655fe643b7..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java +++ /dev/null @@ -1,2098 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestsEJB.java 59995 2009-10-14 12:05:29Z af70133 $ - */ -package com.sun.ts.tests.jms.commonee; - -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Properties; - -import com.sun.ts.lib.util.RemoteLoggingInitException; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJBException; -import jakarta.ejb.PostActivate; -import jakarta.ejb.PrePassivate; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.jms.BytesMessage; -import jakarta.jms.Connection; -import jakarta.jms.ConnectionFactory; -import jakarta.jms.DeliveryMode; -import jakarta.jms.Destination; -import jakarta.jms.MapMessage; -import jakarta.jms.Message; -import jakarta.jms.MessageConsumer; -import jakarta.jms.MessageProducer; -import jakarta.jms.ObjectMessage; -import jakarta.jms.Queue; -import jakarta.jms.QueueBrowser; -import jakarta.jms.QueueConnection; -import jakarta.jms.QueueConnectionFactory; -import jakarta.jms.QueueReceiver; -import jakarta.jms.QueueSender; -import jakarta.jms.QueueSession; -import jakarta.jms.Session; -import jakarta.jms.StreamMessage; -import jakarta.jms.TextMessage; - -@Stateful -@Remote(Tests.class) -public class TestsEJB implements Tests { - - @Resource - private SessionContext sessionContext; - - private Properties harnessProps = null; - - private TSNamingContext nctx = null; - - private transient Destination testDestination = null; - - private transient ConnectionFactory cf = null; - - private transient Connection conn = null; - - private transient Queue queue = null; - - private transient QueueConnectionFactory qcf = null; - - private transient QueueConnection qconn = null; - - private static final String TESTQUEUENAME = "java:comp/env/jms/MY_QUEUE"; - - private static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; - - private static final String QUEUECONNECTIONFACTORY = "java:comp/env/jms/MyQueueConnectionFactory"; - - private static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/MyTopicConnectionFactory"; - - private TextMessage messageSent = null; - - private BytesMessage messageSentB = null; - - private String username = null; - - private String password = null; - - private long timeout; - - private boolean booleanValue = false; - - private byte byteValue = 127; - - private byte byteValue1 = -12; - - private int byteValue2 = 244; - - private byte[] bytesValue = { 127, -127, 1, 0 }; - - private byte[] bytesValueRecvd = { 0, 0, 0, 0 }; - - private byte[] byteValues = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; - - private byte[] byteValues2 = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; - - private byte[] byteValuesReturned = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - private byte[] byteValuesReturned2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - private char charValue = 'Z'; - - private double doubleValue = 6.02e23; - - private float floatValue = 6.02e23f; - - private int intValue = 2147483647; - - private long longValue = 9223372036854775807L; - - private Integer nInteger = Integer.valueOf(-2147483648); - - private short shortValue = -32768; - - private short shortValue1 = -28679; - - private int shortValue2 = 36857; - - private String utfValue = "what"; - - private String stringValue = "Map Message Test"; - - private String sTesting = "Testing StreamMessages"; - - private String type = "JMSTCKTESTMSG"; - - private String jmsCorrelationID = "JMSTCKCorrelationID"; - - private int priority = 2; - - private long forever = 0L; - - public TestsEJB() { - TestUtil.logTrace("TestsEJB => default constructor called"); - } - - @PostConstruct - public void postConstruct() { - TestUtil.logTrace("postConstruct"); - try { - TestUtil.logMsg("obtain naming context"); - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.logErr("Error obtaining naming context: ", e); - throw new EJBException("postConstruct: Failed!", e); - } - } - - @PostActivate - public void activate() { - TestUtil.logTrace("activate"); - try { - common_Q(); - setup_Q(); - } catch (Exception e) { - TestUtil.logErr("Error during common Queue setup: ", e); - throw new EJBException("activate: Failed!", e); - } - } - - @PrePassivate - public void passivate() { - TestUtil.logTrace("passivate"); - - testDestination = null; - cf = null; - conn = null; - queue = null; - qcf = null; - qconn = null; - } - - @Remove - public void remove() { - TestUtil.logTrace("remove"); - } - - public void initLogging(Properties p) { - TestUtil.logTrace("initLogging"); - harnessProps = p; - try { - TestUtil.logMsg("initialize remote logging"); - TestUtil.init(p); - timeout = Long.parseLong(TestUtil.getProperty(harnessProps, "jms_timeout")); - username = TestUtil.getProperty(harnessProps, "user"); - password = TestUtil.getProperty(harnessProps, "password"); - // check props for errors - if (timeout < 1) { - throw new EJBException( - "'jms_timeout' (milliseconds) in ts.jte must be > 0"); - } - if (username == null) { - throw new EJBException("'user' in ts.jte must be null"); - } - if (password == null) { - throw new EJBException("'password' in ts.jte must be null"); - } - if (sessionContext == null) { - throw new EJBException("@Resource injection failed"); - } - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("initLogging: Failed!", e); - } - } - - private void common_Q() throws Exception { - - TestUtil.logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); - cf = (ConnectionFactory) nctx.lookup(QUEUECONNECTIONFACTORY); - - TestUtil.logTrace("Getting Destination " + TESTQUEUENAME); - testDestination = (Destination) nctx.lookup(TESTQUEUENAME); - - // create default connection - TestUtil.logTrace("Creating Connection with username, " + username - + " password, " + password); - conn = cf.createConnection(username, password); - } - - private void setup_Q() throws Exception { - - TestUtil.logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); - qcf = (QueueConnectionFactory) nctx.lookup(QUEUECONNECTIONFACTORY); - - TestUtil.logTrace("Getting Queue" + TESTQUEUENAME); - queue = (Queue) nctx.lookup(TESTQUEUENAME); - - // create default QueueConnection - TestUtil.logTrace("Creating QueueConnection with username, " + username - + " password, " + password); - qconn = qcf.createQueueConnection(username, password); - } - - private void common_T() throws Exception { - - TestUtil - .logTrace("Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); - - TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); - testDestination = (Destination) nctx.lookup(TESTTOPICNAME); - - // create default connection - TestUtil.logTrace("Creating Connection with username, " + username - + " password, " + password); - conn = cf.createConnection(username, password); - - } - - public ArrayList sendTextMessage_CQ(String TestName, String message) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - // get ConnectionFactory and Connection - common_Q(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - MessageProducer sender = sess.createProducer(testDestination); - - TestUtil.logMsg("Creating 1 TextMessage"); - messageSent = sess.createTextMessage(); - messageSent.setText(message); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - - TestUtil.logMsg("Sending a TextMessage"); - timeBeforeSend = System.currentTimeMillis(); - sender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendTextMessage_CQ"); - TestUtil.printStackTrace(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in sendTextMessage_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in sendTextMessage_CQ" + ce.getMessage(), ce); - } - } - } - return valueAtSend; - } - - private ArrayList logPropertyAtSend(Message messageSent, long timeBeforeSend, - long timeAfterSend) throws Exception { - ArrayList valueAtSend = new ArrayList(9); - - valueAtSend.add(0, Long.valueOf(timeBeforeSend)); - TestUtil.logTrace("Time before send..." + valueAtSend.get(0)); - - valueAtSend.add(1, Long.valueOf(timeAfterSend)); - TestUtil.logTrace("Time after send...." + valueAtSend.get(1)); - - valueAtSend.add(2, Long.valueOf(messageSent.getJMSTimestamp())); - TestUtil.logTrace("JMSTimeStamp......." + valueAtSend.get(2)); - - valueAtSend.add(3, Long.valueOf(messageSent.getJMSExpiration())); - TestUtil.logTrace("JMSExpiration......" + valueAtSend.get(3)); - - valueAtSend.add(4, messageSent.getJMSDestination()); - TestUtil.logTrace("JMSDestination....." + valueAtSend.get(4)); - - valueAtSend.add(5, Long.valueOf(messageSent.getJMSPriority())); - TestUtil.logTrace("JMSPriority........" + valueAtSend.get(5)); - - valueAtSend.add(6, Long.valueOf(messageSent.getJMSDeliveryMode())); - TestUtil.logTrace("JMSDeliveryMode...." + valueAtSend.get(6)); - - valueAtSend.add(7, messageSent.getJMSMessageID()); - TestUtil.logTrace("JMSMessageID......." + valueAtSend.get(7)); - - valueAtSend.add(8, messageSent.getJMSCorrelationID()); - TestUtil.logTrace("JMSCorrelationID..." + valueAtSend.get(8)); - - return valueAtSend; - } - - public String receiveTextMessage_CQ() { - TextMessage receivedM = null; - String tmp = null; - try { - // get ConnectionFactory and Connection - common_Q(); - conn.start(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // create default consumer - TestUtil.logTrace("Creating MessageConsumer"); - MessageConsumer receiver = sess.createConsumer(testDestination); - - receivedM = (TextMessage) receiver.receive(timeout); - tmp = receivedM.getText(); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveTextMessage_CQ: ", - e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in receiveTextMessage_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveTextMessage_CQ" + ce.getMessage(), - ce); - } - } - } - return tmp; - } - - public String receiveMessageS_CQ(String selector) { - TextMessage receivedM = null; - String tmp = null; - - try { - // get ConnectionFactory and Connection - common_Q(); - conn.start(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create default consumer - TestUtil.logTrace("Creating MessageConsumer"); - MessageConsumer receiver = sess.createConsumer(testDestination, selector); - - receivedM = (TextMessage) receiver.receive(timeout); - tmp = receivedM.getText(); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveMessageS_CQ: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in receiveMessageS_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveMessageS_CQ" + ce.getMessage(), ce); - } - } - } - return tmp; - } - - public int browseTextMessage_CQ(int num, String message) { - QueueBrowser browseAll = null; - int msgCount = 0; - int totalMsg = 0; - TextMessage tempMsg = null; - try { - // get ConnectionFactory and Connection - common_Q(); - conn.start(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create browser - TestUtil.logTrace("Creating QueueBrowser"); - browseAll = sess.createBrowser((Queue) testDestination); - - // getting Emumeration that contains at least two test messages - // without getting into dead loop. - // Workaround for possible timing problem - Enumeration msgs = null; - int i = 0; - do { - i++; - msgCount = 0; - totalMsg = 0; - msgs = browseAll.getEnumeration(); - TestUtil.logTrace("getting Enumeration " + i); - while (msgs.hasMoreElements()) { - tempMsg = (TextMessage) msgs.nextElement(); - totalMsg++; - if (!(tempMsg.getText().indexOf(message) < 0)) - msgCount++; - } - TestUtil.logTrace("found " + msgCount + " messages total in browser"); - } while ((msgCount < num) && (i < 10)); - - } catch (Exception e) { - TestUtil.logErr("Failed to browse message in browseTextMessage_CQ: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in browseTextMessage_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in browseTextMessage_CQ" + ce.getMessage(), - ce); - } - } - } - return totalMsg; - } - - public int browseMessageS_CQ(int num, String message, String selector) { - QueueBrowser selectiveBrowser = null; - int msgCount = 0; - int totalMsg = 0; - TextMessage tempMsg = null; - - try { - // get ConnectionFactory and Connection - common_Q(); - conn.start(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create browser - TestUtil.logTrace("Creating QueueBrowser"); - selectiveBrowser = sess.createBrowser((Queue) testDestination, selector); - - // getting Emumeration that contains at least two test messages - // without getting into dead loop. - // Workaround for possible timing problem - Enumeration msgs = null; - int i = 0; - do { - i++; - msgCount = 0; - totalMsg = 0; - msgs = selectiveBrowser.getEnumeration(); - TestUtil.logTrace("getting Enumeration " + i); - while (msgs.hasMoreElements()) { - tempMsg = (TextMessage) msgs.nextElement(); - totalMsg++; - if (!(tempMsg.getText().indexOf(message) < 0)) - msgCount++; - } - TestUtil.logTrace("found " + msgCount + " messages total in browser"); - } while ((msgCount < num) && (i < 10)); - - } catch (Exception e) { - TestUtil.logErr("Failed to browse message in browseMessageS_CQ: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in browseMessageS_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in browseMessageS_CQ" + ce.getMessage(), ce); - } - } - } - return totalMsg; - } - - public ArrayList sendMessageP_CQ(String TestName, String message, - boolean val) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - // get ConnectionFactory and Connection - common_Q(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - MessageProducer sender = sess.createProducer(testDestination); - - TestUtil.logMsg("Creating 1 TextMessage"); - messageSent = sess.createTextMessage(); - messageSent.setText(message); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - messageSent.setBooleanProperty("lastMessage", val); - - TestUtil.logMsg("Sending a TextMessage"); - timeBeforeSend = System.currentTimeMillis(); - sender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendMessageP_CQ"); - TestUtil.printStackTrace(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in sendMessageP_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in sendMessageP_CQ" + ce.getMessage(), ce); - } - } - } - return valueAtSend; - } - - public ArrayList sendMessagePP_CQ(String TestName, String message, - boolean val, String p, String value) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - // get ConnectionFactory and Connection - common_Q(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - MessageProducer sender = sess.createProducer(testDestination); - - TestUtil.logMsg("Creating 1 TextMessage"); - messageSent = sess.createTextMessage(); - messageSent.setText(message); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - messageSent.setStringProperty(p, value); - messageSent.setBooleanProperty("lastMessage", val); - - TestUtil.logMsg("Sending a TextMessage"); - timeBeforeSend = System.currentTimeMillis(); - sender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendMessagePP_CQ"); - TestUtil.printStackTrace(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in sendMessagePP_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in sendMessagePP_CQ" + ce.getMessage(), ce); - } - } - } - return valueAtSend; - } - - public ArrayList sendTextMessage_CT(String TestName, String message) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - // get ConnectionFactory and Connection - common_T(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - MessageProducer sender = sess.createProducer(testDestination); - - TestUtil.logMsg("Creating 1 TextMessage"); - messageSent = sess.createTextMessage(); - messageSent.setText(message); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - - TestUtil.logMsg("Sending a TextMessage"); - timeBeforeSend = System.currentTimeMillis(); - sender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendTextMessage_CT"); - TestUtil.printStackTrace(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in sendTextMessage_CT"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in sendTextMessage_CT" + ce.getMessage(), ce); - } - } - } - return valueAtSend; - } - - public String receiveTextMessage_CT() { - TextMessage receivedM = null; - String tmp = null; - - try { - // get ConnectionFactory and Connection - common_T(); - conn.start(); - - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create default consumer - TestUtil.logTrace("Creating MessageConsumer"); - MessageConsumer receiver = sess.createConsumer(testDestination); - - receivedM = (TextMessage) receiver.receive(timeout); - tmp = receivedM.getText(); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveTextMessage_CT: ", - e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in receiveTextMessage_CT"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveTextMessage_CT" + ce.getMessage(), - ce); - } - } - } - return tmp; - } - - public int getAck_CT() { - int mode = 0; - - try { - common_T(); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - mode = sess.getAcknowledgeMode(); - TestUtil - .logTrace("AcknowledgeMode is set at " + Session.AUTO_ACKNOWLEDGE); - TestUtil.logTrace("AcknowledgeMode returned as " + mode); - } catch (Exception e) { - TestUtil.logErr("Failed to getAcknowledgeMode: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in getAck_CT"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in getAck_CT():" + ce.getMessage(), ce); - } - } - } - return mode; - } - - public int getAck_CQ() { - int mode = 0; - - try { - common_Q(); - Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); - mode = sess.getAcknowledgeMode(); - } catch (Exception e) { - TestUtil.logErr("Failed to getAcknowledgeMode: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in getAck_CQ"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in getAck_CQ():" + ce.getMessage(), ce); - } - } - } - return mode; - } - - public boolean getQueue() { - QueueBrowser browseAll = null; - boolean pass = true; - - try { - common_Q(); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create browser - TestUtil.logTrace("Creating QueueBrowser"); - browseAll = sess.createBrowser((Queue) testDestination); - - if (!browseAll.getQueue().toString().equals(testDestination.toString())) { - pass = false; - TestUtil.logErr("Error: QueueBrowser.getQueue test failed"); - TestUtil.logErr( - "QueueBrowser.getQueue=" + browseAll.getQueue().toString() + "."); - TestUtil.logErr("testDestination=" + testDestination.toString() + "."); - } - browseAll.close(); - - } catch (Exception e) { - TestUtil.logErr("Failed to getQueue: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in getQueue"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr("Error closing conn in getQueue():" + ce.getMessage(), - ce); - } - } - } - return pass; - } - - public boolean getSelector(String selector) { - QueueBrowser selectiveBrowser = null; - boolean pass = true; - - try { - common_Q(); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create browser - TestUtil.logTrace("Creating QueueBrowser"); - selectiveBrowser = sess.createBrowser((Queue) testDestination, selector); - - String tmp = selectiveBrowser.getMessageSelector(); - if (tmp.indexOf("TEST") < 0 || tmp.indexOf("test") < 0) { - pass = false; - TestUtil.logErr("Error: QueueBrowser.getMessageSelector test failed"); - TestUtil.logErr("selectiveBrowser.getMessageSelector()=" - + selectiveBrowser.getMessageSelector()); - } - - selectiveBrowser.close(); - } catch (Exception e) { - TestUtil.logErr("Failed to getMessageSelector: ", e); - throw new EJBException(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in getSelector"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in getSelector():" + ce.getMessage(), ce); - } - } - } - return pass; - } - - public ArrayList sendTextMessage_Q(String TestName) { - return sendTextMessage_Q(TestName, null, false, DeliveryMode.PERSISTENT, - true); - } - - public ArrayList sendTextMessage_Q(String TestName, String text) { - return sendTextMessage_Q(TestName, text, false, DeliveryMode.PERSISTENT, - true); - } - - public ArrayList sendTextMessage_Q(String TestName, boolean setDest) { - return sendTextMessage_Q(TestName, null, setDest, DeliveryMode.PERSISTENT, - true); - } - - public ArrayList sendTextMessage_Q(String TestName, boolean setDest, - int mode) { - return sendTextMessage_Q(TestName, null, setDest, mode, true); - } - - public ArrayList sendTextMessage_Q(String TestName, String text, - boolean setDest, int mode) { - return sendTextMessage_Q(TestName, text, setDest, mode, true); - } - - public ArrayList sendTextMessage_Q(String TestName, String text, - Queue testQueue) { - return sendTextMessage_Q(TestName, text, false, DeliveryMode.PERSISTENT, - false); - } - - private ArrayList sendTextMessage_Q(String TestName, String text, - boolean setDest, int mode, boolean setQueue) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - QueueSender qsender = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - - // create default QueueSession - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueSender - TestUtil.logTrace("Creating QueueSender"); - if (setQueue) - qsender = qsess.createSender(queue); - else - qsender = qsess.createSender((Queue) null); - qsender.setPriority(priority); - qsender.setTimeToLive(forever); - if (mode != DeliveryMode.PERSISTENT) - qsender.setDeliveryMode(mode); - - TestUtil.logMsg("Creating 1 TextMessage"); - messageSent = qsess.createTextMessage(); - - if (text != null) - messageSent.setText(text); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - messageSent.setJMSCorrelationID(jmsCorrelationID); - messageSent.setJMSType(type); - - if (setDest) - messageSent.setJMSReplyTo(queue); - - // ----------------------------------------------------------------------------- - TestUtil.logMsg("Sending a TextMessage"); - timeBeforeSend = System.currentTimeMillis(); - if (setQueue) - qsender.send(messageSent); - else - qsender.send(queue, messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendTextMessage_Q", e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing QueueConnection in sendTextMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr("Error closing QueueConnection in sendTextMessage_Q", - ce); - } - } - } - return valueAtSend; - } - - /* - * public String receiveTextMessage_Q() { TextMessage receivedM = null; String - * tmp = null; - * - * try { //get QueueConnectionFactory and QueueConnection setup_Q(); - * qconn.start(); - * - * // create default Session TestUtil.logTrace("Creating QueueSession"); - * QueueSession qsess = qconn.createQueueSession(true, - * Session.AUTO_ACKNOWLEDGE); - * - * // create default QueueReceiver - * TestUtil.logTrace("Creating QueueReceiver"); QueueReceiver qreceiver = - * qsess.createReceiver(queue); - * - * receivedM = (TextMessage) qreceiver.receive(timeout); tmp = - * receivedM.getText(); } catch (Exception e ) { - * TestUtil.logErr("Failed to receive a message in receiveTextMessage_Q: ", - * e); throw new EJBException(e); } finally { if ( qconn != null) { try { - * TestUtil.logTrace("Closing Connection in receiveTextMessage_Q"); - * qconn.close(); } catch (Exception ce) { - * TestUtil.logErr("Error closing conn in receiveTextMessage_Q" + - * ce.getMessage(), ce); } } } return tmp; } - */ - - public ArrayList sendFullBytesMessage_Q(String TestName) { - return sendBytesMessage_Q(TestName, false, DeliveryMode.PERSISTENT); - } - - public ArrayList sendBytesMessage_Q(String TestName, boolean setDest) { - return sendBytesMessage_Q(TestName, setDest, DeliveryMode.PERSISTENT); - } - - public ArrayList sendBytesMessage_Q(String TestName, boolean setDest, - int mode) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - - // create default QueueSession - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueSender - TestUtil.logTrace("Creating QueueSender"); - QueueSender qsender = qsess.createSender(queue); - qsender.setPriority(priority); - qsender.setTimeToLive(forever); - if (mode != DeliveryMode.PERSISTENT) - qsender.setDeliveryMode(mode); - - TestUtil.logMsg("Creating 1 BytesMessage"); - messageSentB = qsess.createBytesMessage(); - - messageSentB.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - messageSentB.setJMSCorrelationID(jmsCorrelationID); - messageSentB.setJMSType(type); - - if (setDest) - messageSentB.setJMSReplyTo(queue); - - // ----------------------------------------------------------------------------- - TestUtil.logMsg("Writing one of each primitive type to the message"); - - // ----------------------------------------------------------------------------- - messageSentB.writeBoolean(booleanValue); - messageSentB.writeByte(byteValue); - messageSentB.writeByte(byteValue1); - messageSentB.writeChar(charValue); - messageSentB.writeDouble(doubleValue); - messageSentB.writeFloat(floatValue); - messageSentB.writeInt(intValue); - messageSentB.writeLong(longValue); - messageSentB.writeObject(nInteger); - messageSentB.writeShort(shortValue); - messageSentB.writeShort(shortValue1); - messageSentB.writeUTF(utfValue); - messageSentB.writeBytes(bytesValue); - messageSentB.writeBytes(bytesValue, 0, 1); - - TestUtil.logMsg("Sending a BytesMessage"); - timeBeforeSend = System.currentTimeMillis(); - qsender.send(messageSentB); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSentB, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendFullBytesMessage_Q", e); - } finally { - if (qconn != null) { - try { - TestUtil - .logTrace("Closing QueueConnection in sendFullBytesMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing QueueConnection in sendFullBytesMessage_Q", ce); - } - } - } - return valueAtSend; - } - - public boolean verifyFullBytesMessage() { - TestUtil.logTrace("In verifyFullBytesMessage ..."); - - BytesMessage messageReceived = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - qconn.start(); - - // create default Session - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueReceiver - TestUtil.logTrace("Creating QueueReceiver"); - QueueReceiver qreceiver = qsess.createReceiver(queue); - - messageReceived = (BytesMessage) qreceiver.receive(timeout); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in verifyFullBytesMessage: ", - e); - throw new EJBException(e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing Connection in verifyFullBytesMessage"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr("Error closing conn in verifyFullBytesMessage", ce); - } - } - } - - boolean pass = true; - - try { - if (!messageReceived.readBoolean() == booleanValue) { - TestUtil.logErr("Error: boolean not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readByte() != byteValue) { - TestUtil.logErr("Error: Byte not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - int tmp = messageReceived.readUnsignedByte(); - - if (tmp != byteValue2) { - TestUtil.logErr( - "Fail: readUnsignedByte not returned expected value: " + tmp); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readChar() != charValue) { - TestUtil.logErr("Fail: char not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readDouble() != doubleValue) { - TestUtil.logErr("Fail: double not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readFloat() != floatValue) { - TestUtil.logErr("Fail: float not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readInt() != intValue) { - TestUtil.logErr("Fail: int not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readLong() != longValue) { - TestUtil.logErr("Fail: long not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readInt() != nInteger.intValue()) { - TestUtil.logErr("Fail: Integer not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (messageReceived.readShort() != shortValue) { - TestUtil.logErr("Fail: short not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - int tmps = messageReceived.readUnsignedShort(); - if (tmps != shortValue2) { - TestUtil.logErr( - "Fail: readUnsignedShort did not return expected value: " + tmps); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - if (!messageReceived.readUTF().equals(utfValue)) { - TestUtil.logErr("Fail: UTF not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - int nCount = messageReceived.readBytes(bytesValueRecvd); - - for (int i = 0; i < nCount; i++) { - if (bytesValueRecvd[i] != bytesValue[i]) { - TestUtil.logErr("Fail: bytes value incorrect"); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - int nCount = messageReceived.readBytes(bytesValueRecvd); - - TestUtil.logTrace("count returned " + nCount); - if (bytesValueRecvd[0] != bytesValue[0]) { - TestUtil.logErr("Fail: bytes value incorrect"); - pass = false; - } - - if (nCount != 1) { - TestUtil.logErr("Error: count not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - - try { - long length = 37l; - long tmpl = messageReceived.getBodyLength(); - if (tmpl < length) { - TestUtil - .logErr("getBodyLength test failed with incorrect length=" + tmpl); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Error: unexpected exception was thrown", e); - pass = false; - } - return pass; - } - - public ArrayList sendFullMapMessage_Q(String testName) { - return sendMapMessage_Q(testName, false, DeliveryMode.PERSISTENT); - } - - public ArrayList sendMapMessage_Q(String testName, boolean setDest) { - return sendMapMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); - } - - public ArrayList sendMapMessage_Q(String testName, boolean setDest, - int mode) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - setup_Q(); - - MapMessage messageSent = null; - MapMessage msgReceivedM = null; - - // create default QueueSession - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueSender - TestUtil.logTrace("Creating QueueSender"); - QueueSender qsender = qsess.createSender(queue); - qsender.setPriority(priority); - qsender.setTimeToLive(forever); - if (mode != DeliveryMode.PERSISTENT) - qsender.setDeliveryMode(mode); - - TestUtil.logMsg("Creating 1 MapMessage"); - messageSent = qsess.createMapMessage(); - - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); - messageSent.setJMSCorrelationID(jmsCorrelationID); - messageSent.setJMSType(type); - - if (setDest) - messageSent.setJMSReplyTo(queue); - - messageSent.setBoolean("booleanValue", booleanValue); - messageSent.setByte("byteValue", byteValue); - messageSent.setBytes("bytesValue", bytesValue); - messageSent.setBytes("bytesValue2", bytesValue, 0, 1); - messageSent.setChar("charValue", charValue); - messageSent.setDouble("doubleValue", doubleValue); - messageSent.setFloat("floatValue", floatValue); - messageSent.setInt("intValue", intValue); - messageSent.setLong("longValue", longValue); - messageSent.setObject("nInteger", nInteger); - messageSent.setShort("shortValue", shortValue); - messageSent.setString("stringValue", stringValue); - messageSent.setString("nullTest", null); - - TestUtil.logTrace("Sending a MapMessage..."); - timeBeforeSend = System.currentTimeMillis(); - qsender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendFullMapMessage_Q", e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing QueueConnection in sendFullMapMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing QueueConnection in sendFullMapMessage_Q", ce); - } - } - } - return valueAtSend; - } - - public boolean verifyFullMapMessage() { - boolean pass = true; - MapMessage msgReceivedM = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - qconn.start(); - - // create default Session - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueReceiver - TestUtil.logTrace("Creating QueueReceiver"); - QueueReceiver qreceiver = qsess.createReceiver(queue); - - msgReceivedM = (MapMessage) qreceiver.receive(timeout); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in verifyFullMapMessage: ", - e); - throw new EJBException(e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing Connection in verifyFullMapMessage"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr("Error closing conn in verifyFullMapMessage", ce); - } - } - } - - try { - if (msgReceivedM.getBoolean("booleanValue") != booleanValue) { - TestUtil.logErr("Fail: invalid boolean returned: " - + msgReceivedM.getBoolean("booleanValue")); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getByte("byteValue") != byteValue) { - TestUtil.logErr("Fail: invalid byte returned: " - + msgReceivedM.getByte("byteValue")); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - byte[] b = msgReceivedM.getBytes("bytesValue"); - - for (int i = 0; i < b.length; i++) { - if (b[i] != bytesValue[i]) { - TestUtil.logErr("Fail: byte array " + i + " not valid: " + b[i]); - pass = false; - } - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - byte[] b = msgReceivedM.getBytes("bytesValue2"); - - if (b[0] != bytesValue[0]) { - TestUtil.logErr("Fail: byte array not valid " + b[0]); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getChar("charValue") != charValue) { - TestUtil.logErr("Fail: invalid char returned: " - + msgReceivedM.getChar("charValue")); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getDouble("doubleValue") != doubleValue) { - TestUtil.logErr("Fail: invalid double returned: " - + msgReceivedM.getDouble("doubleValue")); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getFloat("floatValue") != floatValue) { - TestUtil.logErr("Fail: invalid float returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getInt("intValue") != intValue) { - TestUtil.logErr("Fail: invalid int returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getLong("longValue") != longValue) { - TestUtil.logErr("Fail: invalid long returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (!msgReceivedM.getObject("nInteger").toString() - .equals(nInteger.toString())) { - TestUtil.logErr("Fail: invalid object returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getShort("shortValue") != shortValue) { - TestUtil.logErr("Fail: invalid short returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (!msgReceivedM.getString("stringValue").equals(stringValue)) { - TestUtil.logErr("Fail: invalid string returned"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - - try { - if (msgReceivedM.getString("nullTest") != null) { - TestUtil.logErr("Fail: null not returned from getString: " - + msgReceivedM.getString("nullTest")); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() - + " was returned", e); - pass = false; - } - return pass; - } - - public ArrayList sendFullStreamMessage_Q(String testName) { - return sendStreamMessage_Q(testName, false, DeliveryMode.PERSISTENT); - } - - public ArrayList sendStreamMessage_Q(String testName, boolean setDest) { - return sendStreamMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); - } - - public ArrayList sendStreamMessage_Q(String testName, boolean setDest, - int mode) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - setup_Q(); - - StreamMessage messageSent = null; - - // create default QueueSession - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueSender - TestUtil.logTrace("Creating QueueSender"); - QueueSender qsender = qsess.createSender(queue); - qsender.setPriority(priority); - qsender.setTimeToLive(forever); - if (mode != DeliveryMode.PERSISTENT) - qsender.setDeliveryMode(mode); - - TestUtil.logMsg("Creating 1 StreamMessage"); - messageSent = qsess.createStreamMessage(); - - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); - messageSent.setJMSCorrelationID(jmsCorrelationID); - messageSent.setJMSType(type); - - if (setDest) - messageSent.setJMSReplyTo(queue); - - messageSent.writeBytes(byteValues2, 0, byteValues.length); - messageSent.writeBoolean(booleanValue); - messageSent.writeByte(byteValue); - messageSent.writeBytes(byteValues); - messageSent.writeChar(charValue); - messageSent.writeDouble(doubleValue); - messageSent.writeFloat(floatValue); - messageSent.writeInt(intValue); - messageSent.writeLong(longValue); - messageSent.writeObject(sTesting); - messageSent.writeShort(shortValue); - messageSent.writeString(stringValue); - messageSent.writeObject(null); - - TestUtil.logTrace("Sending a StreamMessage ..."); - timeBeforeSend = System.currentTimeMillis(); - qsender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - - valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendFullStreamMessage_Q", e); - } finally { - if (qconn != null) { - try { - TestUtil - .logTrace("Closing QueueConnection in sendFullStreamMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing QueueConnection in sendFullStreamMessage_Q", ce); - } - } - } - return valueAtSend; - } - - public boolean verifyFullStreamMessage() { - TestUtil.logTrace("In verifyFullStreamMessage"); - - boolean pass = true; - StreamMessage messageReceived = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - qconn.start(); - - // create default Session - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueReceiver - TestUtil.logTrace("Creating QueueReceiver"); - QueueReceiver qreceiver = qsess.createReceiver(queue); - - messageReceived = (StreamMessage) qreceiver.receive(timeout); - } catch (Exception e) { - TestUtil.logErr( - "Failed to receive a message in verifyFullStreamMessage: ", e); - throw new EJBException(e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing Connection in verifyFullStreamMessage"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr("Error closing conn in verifyFullStreamMessage", ce); - } - } - } - - try { - int nCount; - do { - nCount = messageReceived.readBytes(byteValuesReturned2); - TestUtil.logTrace("nCount is " + nCount); - if (nCount != -1) { - for (int i = 0; i < byteValuesReturned2.length; i++) { - if (byteValuesReturned2[i] != byteValues2[i]) { - TestUtil.logErr("Fail: byte[] " + i + " is not valid =" - + byteValuesReturned2[i]); - pass = false; - } - } - } - } while (nCount >= byteValuesReturned2.length); - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readBoolean() != booleanValue) { - TestUtil.logErr("Fail: boolean not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readByte() != byteValue) { - TestUtil.logErr("Fail: Byte not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - int nCount; - do { - nCount = messageReceived.readBytes(byteValuesReturned); - TestUtil.logTrace("nCount is " + nCount); - if (nCount != -1) { - for (int i = 0; i < byteValuesReturned.length; i++) { - if (byteValuesReturned[i] != byteValues[i]) { - TestUtil.logErr("Fail: byte[] " + i + " is not valid"); - pass = false; - } - } - } - } while (nCount >= byteValuesReturned.length); - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readChar() != charValue) { - TestUtil.logErr("Fail: char not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readDouble() != doubleValue) { - TestUtil.logErr("Fail: double not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readFloat() != floatValue) { - TestUtil.logErr("Fail: float not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readInt() != intValue) { - TestUtil.logErr("Fail: int not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readLong() != longValue) { - TestUtil.logErr("Fail: long not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (!messageReceived.readObject().equals(sTesting)) { - TestUtil.logErr("Fail: object not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readShort() != shortValue) { - TestUtil.logErr("Fail: short not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (!messageReceived.readString().equals(stringValue)) { - TestUtil.logErr("Fail: string not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - try { - if (messageReceived.readObject() != null) { - TestUtil.logErr("Fail: object not returned as expected"); - pass = false; - } - } catch (Exception e) { - TestUtil.logErr( - "Error: exception was thrown in verifyFullStreamMessage: ", e); - pass = false; - } - - return pass; - } - - public ArrayList sendObjectMessage_Q(String testName) { - return sendObjectMessage_Q(testName, false, DeliveryMode.PERSISTENT); - } - - public ArrayList sendObjectMessage_Q(String testName, boolean setDest) { - return sendObjectMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); - } - - public ArrayList sendObjectMessage_Q(String testName, boolean setDest, - int mode) { - ArrayList valueAtSend = null; - long timeBeforeSend = 0L; - long timeAfterSend = 0L; - - try { - setup_Q(); - - ObjectMessage messageSent = null; - - // create default QueueSession - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueSender - TestUtil.logTrace("Creating QueueSender"); - QueueSender qsender = qsess.createSender(queue); - qsender.setPriority(priority); - qsender.setTimeToLive(forever); - if (mode != DeliveryMode.PERSISTENT) - qsender.setDeliveryMode(mode); - - TestUtil.logMsg("Creating 1 ObjectMessage"); - messageSent = qsess.createObjectMessage(); - - messageSent.setObject(String.valueOf("HeaderIDTest for ObjectMessage")); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); - messageSent.setJMSCorrelationID(jmsCorrelationID); - messageSent.setJMSType(type); - - if (setDest) - messageSent.setJMSReplyTo(queue); - - TestUtil.logTrace("Sending an ObjectMessage..."); - timeBeforeSend = System.currentTimeMillis(); - qsender.send(messageSent); - timeAfterSend = System.currentTimeMillis(); - valueAtSend = logPropertyAtSend(messageSentB, timeBeforeSend, - timeAfterSend); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendObjectMessage_Q", e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing QueueConnection in sendObjectMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing QueueConnection in sendObjectMessage_Q", ce); - } - } - } - return valueAtSend; - } - - public ObjectMessage receiveObjectMessage_Q() { - ObjectMessage receivedM = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - qconn.start(); - - // create default Session - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueReceiver - TestUtil.logTrace("Creating QueueReceiver"); - QueueReceiver qreceiver = qsess.createReceiver(queue); - - receivedM = (ObjectMessage) qreceiver.receive(timeout); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveObjectMessage_Q: ", - e); - throw new EJBException(e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing Connection in receiveObjectMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveObjectMessage_Q" + ce.getMessage(), - ce); - } - } - } - return receivedM; - } - - public Message receiveMessage_Q() { - Message receivedM = null; - - try { - // get QueueConnectionFactory and QueueConnection - setup_Q(); - qconn.start(); - - // create default Session - TestUtil.logTrace("Creating QueueSession"); - QueueSession qsess = qconn.createQueueSession(true, - Session.AUTO_ACKNOWLEDGE); - - // create default QueueReceiver - TestUtil.logTrace("Creating QueueReceiver"); - QueueReceiver qreceiver = qsess.createReceiver(queue); - - receivedM = (Message) qreceiver.receive(timeout); - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveMessage_Q: ", e); - throw new EJBException(e); - } finally { - if (qconn != null) { - try { - TestUtil.logTrace("Closing Connection in receiveMessage_Q"); - qconn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveMessage_Q" + ce.getMessage(), ce); - } - } - } - return receivedM; - } - - public String getMessageID() { - Message msg = receiveMessage_Q(); - - String id = null; - try { - id = msg.getJMSMessageID(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSMessageID in getMessageID: ", e); - } - return id; - } - - public long getTimeStamp() { - Message msg = receiveMessage_Q(); - long JMSTimestamp = 0L; - try { - JMSTimestamp = msg.getJMSTimestamp(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSTimestamp in getTimeStamp: ", e); - } - return JMSTimestamp; - } - - public String getCorrelationID() { - String jmsCorrelationID = null; - Message msg = receiveMessage_Q(); - - try { - jmsCorrelationID = msg.getJMSCorrelationID(); - } catch (Exception e) { - TestUtil.logErr( - "Exception calling getJMSCorrelationID in getCorrelationID: ", e); - } - return jmsCorrelationID; - } - - public String getReplyTo() { - Message msg = receiveMessage_Q(); - Destination replyto = null; - - try { - replyto = msg.getJMSReplyTo(); - if (replyto != null) - return ((Queue) replyto).getQueueName(); - else - return null; - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSReplyTo in getReplyTo: ", e); - return null; - } - } - - public String getType() { - Message msg = receiveMessage_Q(); - String jmsType = null; - - try { - jmsType = msg.getJMSType(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSType in getType: ", e); - } - return jmsType; - } - - public int getPriority() { - Message msg = receiveMessage_Q(); - int jmsPriority = 0; - - try { - jmsPriority = msg.getJMSPriority(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSPriority in getPriority: ", e); - } - return jmsPriority; - } - - public long getExpiration() { - Message msg = receiveMessage_Q(); - long jmsExpiration = 0L; - - try { - jmsExpiration = msg.getJMSExpiration(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSExpiration in getExpiration: ", - e); - } - return jmsExpiration; - } - - public String getDestination_1() { - String tmp = null; - try { - TestUtil.logTrace("Getting Destination " + TESTQUEUENAME); - Destination dest = (Destination) nctx.lookup(TESTQUEUENAME); - tmp = ((Queue) dest).getQueueName(); - - } catch (Exception e) { - TestUtil.logErr("Exception in getDestination_1: ", e); - } - return tmp; - } - - public String getDestination() { - Message msg = receiveMessage_Q(); - String tmp = null; - - try { - tmp = ((Queue) msg.getJMSDestination()).getQueueName(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getJMSDestination in getDestination: ", - e); - } - return tmp; - } - - public int getDeliveryMode() { - Message msg = receiveMessage_Q(); - int jmsMode = 0; - - try { - jmsMode = msg.getJMSDeliveryMode(); - } catch (Exception e) { - TestUtil.logErr( - "Exception calling getJMSDeliveryMode in getDeliveryMode: ", e); - } - return jmsMode; - } - - public String getText() { - Message msg = receiveMessage_Q(); - String text = null; - - try { - text = ((TextMessage) msg).getText(); - } catch (Exception e) { - TestUtil.logErr("Exception calling getText in getText: ", e); - } - return text; - } - -} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java b/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java deleted file mode 100644 index 9e2500423b..0000000000 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id: TestsTEJB.java 59995 2009-10-14 12:05:29Z af70133 $ - */ -package com.sun.ts.tests.jms.commonee; - -import java.util.Properties; - -import com.sun.ts.lib.util.RemoteLoggingInitException; -import com.sun.ts.lib.util.TSNamingContext; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.annotation.PostConstruct; -import jakarta.annotation.Resource; -import jakarta.ejb.EJBException; -import jakarta.ejb.PostActivate; -import jakarta.ejb.PrePassivate; -import jakarta.ejb.Remote; -import jakarta.ejb.Remove; -import jakarta.ejb.SessionContext; -import jakarta.ejb.Stateful; -import jakarta.jms.Connection; -import jakarta.jms.ConnectionFactory; -import jakarta.jms.Destination; -import jakarta.jms.MessageProducer; -import jakarta.jms.Session; -import jakarta.jms.TextMessage; -import jakarta.jms.Topic; -import jakarta.jms.TopicSubscriber; - -@Stateful -@Remote(TestsT.class) -public class TestsTEJB implements TestsT { - - @Resource - private SessionContext sessionContext; - - private Properties harnessProps = null; - - private TSNamingContext nctx = null; - - private transient Destination testDestination = null; - - private transient ConnectionFactory cf = null; - - private transient Connection conn = null; - - private transient Connection connr = null; - - private static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; - - private static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/DURABLE_SUB_CONNECTION_FACTORY"; - - private String name = "ctssub"; - - private String username = null; - - private String password = null; - - private long timeout; - - public TestsTEJB() { - TestUtil.logTrace("TestsTEJB => default constructor called"); - } - - public void initLogging(Properties p) { - TestUtil.logTrace("initLogging"); - harnessProps = p; - try { - TestUtil.logMsg("initialize remote logging"); - TestUtil.init(p); - timeout = Long.parseLong(TestUtil.getProperty(harnessProps, "jms_timeout")); - username = TestUtil.getProperty(harnessProps, "user"); - password = TestUtil.getProperty(harnessProps, "password"); - // check props for errors - if (timeout < 1) { - throw new EJBException( - "'jms_timeout' (milliseconds) in ts.jte must be > 0"); - } - if (username == null) { - throw new EJBException("'user' in ts.jte must be null"); - } - if (password == null) { - throw new EJBException("'password' in ts.jte must be null"); - } - if (sessionContext == null) { - throw new EJBException("@Resource injection failed"); - } - } catch (RemoteLoggingInitException e) { - TestUtil.printStackTrace(e); - throw new EJBException("initLogging: Failed!", e); - } - } - - @PostConstruct - public void postConstruct() { - TestUtil.logTrace("postConstruct"); - try { - TestUtil.logMsg("obtain naming context"); - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.printStackTrace(e); - throw new EJBException("unable to obtain naming context"); - } - } - - @PostActivate - public void activate() { - TestUtil.logTrace("activate"); - try { - TestUtil.logTrace( - "Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); - - TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); - testDestination = (Destination) nctx.lookup(TESTTOPICNAME); - - } catch (Exception ex) { - TestUtil.logErr("Unexpected Exception in Activate: ", ex); - } - } - - @PrePassivate - public void passivate() { - TestUtil.logTrace("passivate"); - testDestination = null; - cf = null; - conn = null; - connr = null; - } - - @Remove - public void remove() { - TestUtil.logTrace("remove"); - } - - private void common_T() throws Exception { - - TestUtil - .logTrace("Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); - cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); - - TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); - testDestination = (Destination) nctx.lookup(TESTTOPICNAME); - - } - - public void common_T_setup() { - try { - common_T(); - - connr = cf.createConnection(username, password); - - Session sessr = connr.createSession(true, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber recr = sessr - .createDurableSubscriber((Topic) testDestination, name); - recr.close(); - } catch (Exception el) { - TestUtil.printStackTrace(el); - TestUtil.logErr("Failed to set up Consumer for Topic", el); - } finally { - try { - connr.close(); - } catch (Exception e) { - TestUtil.logErr("Exception closing receiving Connection:", e); - } - } - } - - public void sendTextMessage_CT(String TestName, String message) { - try { - // get ConnectionFactory and Connection - common_T(); - - // create default connection - TestUtil.logTrace("Creating Connection with username, " + username - + " password, " + password); - conn = cf.createConnection(username, password); - // create default Session - TestUtil.logTrace("Creating Session"); - Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); - - // create default consumer/producer - TestUtil.logTrace("Creating messageProducer"); - MessageProducer sender = sess.createProducer(testDestination); - - TestUtil.logMsg("Creating 1 message"); - TextMessage messageSent = sess.createTextMessage(); - messageSent.setText(message); - messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); - TestUtil.logMsg("Sending message"); - sender.send(messageSent); - sender.close(); - - } catch (Exception e) { - TestUtil.logErr("Failed to send a Message in sendTextMessage_CQ"); - TestUtil.printStackTrace(e); - } finally { - if (conn != null) { - try { - TestUtil.logTrace("Closing Connection in sendTextMessage_CT"); - conn.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in sendTextMessage_CQ" + ce.getMessage(), ce); - } - } - } - } - - public String receiveTextMessage_CT() { - TextMessage receivedM = null; - String tmp = null; - - try { - // create default connection - TestUtil.logTrace("Creating Connection with username, " + username - + " password, " + password); - connr = cf.createConnection(username, password); - - connr.start(); - Session sessr = connr.createSession(true, Session.AUTO_ACKNOWLEDGE); - TopicSubscriber recr = sessr - .createDurableSubscriber((Topic) testDestination, name); - receivedM = (TextMessage) recr.receive(timeout); - recr.close(); - - if (receivedM != null) - tmp = receivedM.getText(); - else - return null; - } catch (Exception e) { - TestUtil.logErr("Failed to receive a message in receiveTextMessage_CT: ", - e); - throw new EJBException(e); - } finally { - if (connr != null) { - try { - TestUtil.logTrace("Closing Connection in receiveTextMessage_CT"); - connr.close(); - } catch (Exception ce) { - TestUtil.logErr( - "Error closing conn in receiveTextMessage_CT" + ce.getMessage(), - ce); - } - } - } - return tmp; - } -} diff --git a/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java b/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java deleted file mode 100644 index 50281866ab..0000000000 --- a/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java +++ /dev/null @@ -1,257 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.servlet.common.client; - -import com.sun.ts.tests.common.webclient.BaseUrlClient; -import com.sun.ts.tests.common.webclient.http.HttpRequest; -import com.sun.ts.tests.common.webclient.WebTestCase; -import com.sun.ts.tests.servlet.common.util.Data; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.net.UnknownHostException; - -/** - * Base client for Servlet tests. - */ - -public abstract class AbstractUrlClient extends BaseUrlClient { - - protected final Logger logger = LoggerFactory.getLogger(getClass()); - - protected static final String APITEST = "apitest"; - - protected static final String DONOTUSEServletName = "NoServletName"; - - private InetAddress[] _addrs = null; - - private String _servlet = null; - - protected AbstractUrlClient() { - // Construct a default context root based on the class name of - // the concrete subclass of this class. - String cname = this.getClass().getName(); - String prefix = "com.sun.ts.tests."; - if (cname.startsWith(prefix)) - cname = cname.substring(prefix.length()); - String suffix = ".URLClient"; - if (cname.endsWith(suffix)) - cname = cname.substring(0, cname.length() - suffix.length()); - cname = cname.replace('.', '_'); - cname = "/" + cname + "_web"; - setContextRoot(cname); - } - - protected void setTestProperties(WebTestCase testCase) { - setStandardProperties(TEST_PROPS.getProperty(STANDARD), testCase); - setApiTestProperties(TEST_PROPS.getProperty(APITEST), testCase); - super.setTestProperties(testCase); - } - - /** - * Sets the request, testname, and a search string for test passed. A search - * is also added for test failure. If found, the test will fail. - * - * @param testValue - * - a logical test identifier - * @param testCase - * - the current test case - */ - private void setApiTestProperties(String testValue, WebTestCase testCase) { - if (testValue == null) { - return; - } - - // An API test consists of a request with a request parameter of - // testname, a search string of Test PASSED, and a logical test name. - - // set the testname - _testName = testValue; - - // set the request - StringBuilder sb = new StringBuilder(50); - if ((_servlet != null) - && (TEST_PROPS.getProperty(DONOTUSEServletName) == null)) { - sb.append(GET).append(_contextRoot).append(SL); - sb.append(_servlet).append("?testname=").append(testValue); - sb.append(HTTP11); - } else { - sb.append(GET).append(_contextRoot).append(SL); - sb.append(testValue).append(HTTP10); - } - logger.debug("REQUEST LINE: {}", sb); - - HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); - testCase.setRequest(req); - - if ((TEST_PROPS.getProperty(SEARCH_STRING) == null) - || ((TEST_PROPS.getProperty(SEARCH_STRING)).equals(""))) { - testCase.setResponseSearchString(Data.PASSED); - testCase.setUnexpectedResponseSearchString(Data.FAILED); - } - - } - - /** - * Consists of a test name, a request, and a goldenfile. - * - * @param testValue - * - a logical test identifier - * @param testCase - * - the current test case - */ - private void setStandardProperties(String testValue, WebTestCase testCase) { - - if (testValue == null) { - return; - } - // A standard test sets consists of a testname - // a request, and a goldenfile. The URI is not used - // in this case since the JSP's are assumed to be located - // at the top of the contextRoot - StringBuffer sb = new StringBuffer(50); - - // set the testname - _testName = testValue; - - // set the request - // sb.append(GET).append(_contextRoot).append(SL); - // sb.append(testValue).append(JSP_SUFFIX).append(HTTP10); - // setRequest(sb.toString()); - // HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); - // testCase.setRequest(req); - - if (_servlet != null) { - sb.append(GET).append(_contextRoot).append(SL); - sb.append(_servlet).append("?testname=").append(testValue); - sb.append(HTTP11); - } else { - sb.append(GET).append(_contextRoot).append(SL); - sb.append(testValue).append(HTTP10); - } - logger.debug("REQUEST LINE: {}", sb); - HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); - testCase.setRequest(req); - } - - /** - * Sets the name of the servlet to use when building a request for a single - * servlet API test. - * - * @param servlet - * - the name of the servlet - */ - protected void setServletName(String servlet) { - _servlet = servlet; - } - - protected String getServletName() { - return _servlet; - } - - protected String getLocalInterfaceInfo(boolean returnAddresses) { - String result = null; - initInetAddress(); - if (_addrs.length != 0) { - StringBuilder sb = new StringBuilder(32); - if (!returnAddresses) { - // localhost might not show up if aliased - sb.append("localhost,"); - } else { - // add 127.0.0.1 - sb.append("127.0.0.1,"); - } - - for (int i = 0; i < _addrs.length; i++) { - if (returnAddresses) { - String ip = _addrs[i].getHostAddress(); - if (!ip.equals("127.0.0.1")) { - if (ip.contains("%")) { - int scope_id = ip.indexOf("%"); - ip = ip.substring(0, scope_id); - } - sb.append(ip); - } - } else { - String host = _addrs[i].getCanonicalHostName(); - if (!host.equals("localhost")) { - sb.append(host); - } - } - if (i + 1 != _addrs.length) { - sb.append(","); - } - } - result = sb.toString(); - logger.trace("[AbstractUrlClient] Interface info: {}", result); - } - return result; - } - - private void initInetAddress() { - if (_addrs == null) { - try { - _addrs = InetAddress - .getAllByName(InetAddress.getLocalHost().getCanonicalHostName()); - } catch (UnknownHostException uhe) { - logger.info( - "[AbstractUrlClient][WARNING] Unable to obtain local host information."); - } - } - } - - protected String getRequest(String rq) { - return rq; - } - - protected String getURLString(String protocol, String hostname, int portnum, String sContext) { - return protocol + "://" + hostname + ":" + portnum + "/" + sContext; - } - - protected URL getURL(String protocol, String hostname, int portnum, String sContext) throws MalformedURLException { - return new URL(protocol + "://" + hostname + ":" + portnum + "/" + sContext); - } - - - public URLConnection getHttpsURLConnection(URL newURL) - throws IOException { - // open HttpsURLConnection using TSHttpsURLConnection - URLConnection httpsURLConn = null; - - httpsURLConn = newURL.openConnection(); - if (httpsURLConn != null) { - httpsURLConn.setDoInput(true); - httpsURLConn.setDoOutput(true); - httpsURLConn.setUseCaches(false); - - } else - throw new IOException("Error opening httsURLConnection"); - - return httpsURLConn; - } - -} - diff --git a/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java b/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java deleted file mode 100644 index 33638dbabd..0000000000 --- a/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java +++ /dev/null @@ -1,375 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.tests.servlet.common.util; - -import jakarta.servlet.ServletOutputStream; -import jakarta.servlet.http.Cookie; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.IOException; -import java.io.PrintWriter; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Enumeration; -import java.util.List; -import java.util.NoSuchElementException; -import java.util.StringTokenizer; -import java.util.stream.Collectors; -import java.util.stream.Stream; - -/** - * A set of useful utility methods to help perform test functions. - */ -public class ServletTestUtil { - - private static Logger LOGGER = LoggerFactory.getLogger(ServletTestUtil.class); - - /** - * Private as this class contains only public static methods. - */ - private ServletTestUtil() { - } - - /** - * Compares the String values in an Enumeration against the provides String - * array of values. The number of elements in the enumeration must be the same - * as the size of the array, or false will be returned. False will also be - * returned if the provided Enumeration or String array is null. - * - * If all values are found, true will be returned. - * - * Note: This method isn't concerned with the presence of duplicate - * values contained in the enumeration. - * - * The comparison is performed in a case sensitive manner. - * - * @param e - * - Enumeration to validate - * @param values - * - the values expected to be found in the Enumeration - * - * @return true if all the expected values are found, otherwise false. - */ - public static boolean checkEnumeration(Enumeration e, String[] values) { - return checkEnumeration(e, values, true, true); - } - - /** - * Compares the String values in an Enumeration against the provides String - * array of values. The number of elements in the enumeration must be the same - * as the size of the array, or false will be returned. False will also be - * returned if the provided Enumeration or String array is null. - * - * If all values are found, true will be returned. - * - * Note: This method isn't concerned with the presence of duplicate - * values contained in the enumeration. - * - * The comparison is performed in a case sensitive manner. - * - * @param e - * - Enumeration to validate - * @param values - * - the values expected to be found in the Enumeration - * @param enforceSizes - * - ensures that the number of elements in the Enumeration matches - * the number of elements in the array of values - * @param allowDuplicates - * - If true, the method will true if duplicate elements are found in - * the Enumeration, if false, then false will be return if duplicate - * elements have been found. - * - * @return true if all the expected values are found, otherwise false. - */ - public static boolean checkEnumeration(Enumeration e, String[] values, - boolean enforceSizes, boolean allowDuplicates) { - List foundValues = null; - - if (e == null || !e.hasMoreElements() || values == null) { - return false; - } - - if (!allowDuplicates) { - foundValues = new ArrayList(); - } - - boolean valuesFound = true; - Arrays.sort(values); - int count = 0; - while (e.hasMoreElements()) { - Object val; - try { - val = e.nextElement(); - count++; - if (!allowDuplicates) { - if (foundValues.contains(val)) { - LOGGER.debug("[ServletTestUtil] Duplicate values found in " - + "Enumeration when duplicates are not allowed." - + "Values found in the Enumeration: {}", getAsString(e)); - valuesFound = false; - break; - } - foundValues.add(val); - } - - } catch (NoSuchElementException nsee) { - LOGGER.info("[ServletTestUtil] There were less elements in the " - + "Enumeration than expected"); - valuesFound = false; - break; - } - LOGGER.debug("[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); - if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { - LOGGER.info("[ServletTestUtil] Value '{}' not found.", val); - valuesFound = false; - continue; - } - } - - if (enforceSizes) { - if (e.hasMoreElements()) { - // more elements than should have been. - LOGGER.info("[ServletTestUtil] There were more elements in the Enumeration than expected."); - valuesFound = false; - } - if (count != values.length) { - LOGGER.info("[ServletTestUtil] There number of elements in the Enumeration did not match number of expected values." - + "Expected number of Values= {}, Actual number of Enumeration elements= {}", values.length, count); - - valuesFound = false; - } - } - return valuesFound; - } - - public static boolean checkArrayList(ArrayList al, String[] values, - boolean enforceSizes, boolean allowDuplicates) { - List foundValues = null; - - if (al == null || al.isEmpty() || values == null) { - return false; - } - - if (!allowDuplicates) { - foundValues = new ArrayList(); - } - - al.trimToSize(); - boolean valuesFound = true; - Arrays.sort(values); - int len = al.size(); - for (int i = 0; i < len; i++) { - Object val = null; - val = (String) al.get(i); - LOGGER.debug("[ServletTestUtil] val= {}", val); - if (!allowDuplicates) { - if (foundValues.contains(val)) { - LOGGER.info("[ServletTestUtil] Duplicate values found in ArrayList when duplicates are not allowed." - + "Values found in the ArrayList: {}", getAsString(al)); - valuesFound = false; - break; - } - foundValues.add(val); - } - LOGGER.debug("[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); - if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { - LOGGER.info("[ServletTestUtil] Value '{}' not found.", val); - valuesFound = false; - continue; - } - } - - if (enforceSizes) { - if (len != values.length) { - LOGGER.info("[ServletTestUtil] There number of elements in the ArrayList " - + "did not match number of expected values." - + "Expected number of Values= {}, Actual number of ArrayList elements= {}", values.length, len); - - valuesFound = false; - } - } - return valuesFound; - } - - public static boolean compareString(String expected, String actual) { - String[] list_expected = expected.split("[|]"); - boolean found = true; - for (int i = 0, n = list_expected.length, startIdx = 0, bodyLength = actual - .length(); i < n; i++) { - - String search = list_expected[i]; - if (startIdx >= bodyLength) { - startIdx = bodyLength; - } - - int searchIdx = actual.toLowerCase().indexOf(search.toLowerCase(), - startIdx); - - LOGGER.debug("[ServletTestUtil] Scanning response for search string: '{}' starting at index " + "location: {}", - search , startIdx); - if (searchIdx < 0) { - found = false; - StringBuffer sb = new StringBuffer(255); - sb.append("[ServletTestUtil] Unable to find the following search string in the server's response: '") - .append(search).append("' at index: ") - .append(startIdx) - .append("\n[ServletTestUtil] Server's response:\n") - .append("-------------------------------------------\n") - .append(actual) - .append("\n-------------------------------------------\n"); - LOGGER.debug(sb.toString()); - break; - } - - LOGGER.debug("[ServletTestUtil] Found search string: '{}' at index '{}' in the server's response", - search, searchIdx); - // the new searchIdx is the old index plus the lenght of the - // search string. - startIdx = searchIdx + search.length(); - } - return found; - } - - /** - * Returns the provided String array in the following format: - * [n1,n2,n...] - * - * @param sArray - * - an array of Objects - * @return - a String based off the values in the array - */ - public static String getAsString(Object[] sArray) { - return sArray == null ? null : Stream.of(sArray).map(Object::toString).collect(Collectors.joining(",","[","]")); - - } - - public static String getAsString(List al) { - return al == null ? null : al.stream().collect(Collectors.joining(",","[","]")); - - } - - /** - * Returns the provided Enumeration as a String in the following format: - * [n1,n2,n...] - * - * @param e - * - an Enumeration - * @return - a printable version of the contents of the Enumeration - */ - public static String getAsString(Enumeration e) { - return getAsString(getAsArray(e)); - } - - /** - * Returnes the provides Enumeration as an Array of String Arguments. - * - * @param e - * - an Enumeration - * @return - the elements of the Enumeration as an array of Objects - */ - public static Object[] getAsArray(Enumeration e) { - List list = new ArrayList<>(); - while (e.hasMoreElements()) { - list.add(e.nextElement()); - } - return list.toArray(new Object[0]); - } - - /** - * Returnes the provided string as an Array of Strings. - * - * @param value String - * @return - the elements of the String as an array of Strings - */ - public static String[] getAsArray(String value) { - StringTokenizer st = new StringTokenizer(value, ","); - String[] retValues = new String[st.countTokens()]; - for (int i = 0; st.hasMoreTokens(); i++) { - retValues[i] = st.nextToken(); - } - return retValues; - } - - public static void printResult(PrintWriter pw, String s) { - - // if string is null or empty, then it passed - if (s == null || s.equals("")) { - pw.println(Data.PASSED); - } else { - pw.println(Data.FAILED + ": " + s); - } - } - - public static void printResult(PrintWriter pw, boolean b) { - if (b) { - pw.println(Data.PASSED); - } else { - pw.println(Data.FAILED); - } - } - - public static void printResult(ServletOutputStream pw, boolean b) - throws IOException { - if (b) { - pw.println(Data.PASSED); - } else { - pw.println(Data.FAILED); - } - } - - public static void printFailureData(PrintWriter pw, ArrayList result, - Object[] expected) { - pw.println("Unable to find the expected values:\n " + " " - + ServletTestUtil.getAsString(expected) - + "\nin the results returned by the test which were:\n" + " " - + ServletTestUtil.getAsString(result)); - } - - public static void printFailureData(PrintWriter pw, Enumeration result, - Object[] expected) { - pw.println("Unable to find the expected values:\n " + " " - + ServletTestUtil.getAsString(expected) - + "\nin the results returned by the test which were:\n" + " " - + ServletTestUtil.getAsString(result)); - } - - public static int findCookie(Cookie[] cookie, String name) { - boolean found = false; - int i = 0; - if (cookie != null) { - while ((!found) && (i < cookie.length)) { - if (cookie[i].getName().equals(name)) { - found = true; - } else { - i++; - } - } - } else { - found = false; - } - if (found) { - return i; - } else { - return -1; - } - } -} diff --git a/el/src/main/resources/vehicle/servlet/ServletVehicle.java b/el/src/main/resources/vehicle/servlet/ServletVehicle.java deleted file mode 100644 index ff0a6285f7..0000000000 --- a/el/src/main/resources/vehicle/servlet/ServletVehicle.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * the pmservlet and puservlet vehicles are extended from this - * vehicle. - * - */ -package com.sun.ts.tests.common.vehicle.servlet; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.ObjectInputStream; -import java.io.ObjectOutputStream; -import java.rmi.RemoteException; -import java.util.Properties; - -import com.sun.ts.lib.harness.Status; -import com.sun.ts.lib.harness.EETest; -import com.sun.ts.lib.harness.RemoteStatus; -import com.sun.ts.lib.util.TestUtil; - -import jakarta.servlet.ServletConfig; -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -public class ServletVehicle extends HttpServlet { - protected Properties properties = null; - - protected String[] arguments = null; - - protected EETest testObj = null; - - public void init(ServletConfig config) throws ServletException { - TestUtil.logTrace("init " + this.getClass().getName() + " ..."); - super.init(config); - } - - public void doGet(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - try { - // get the inputstream and read any objects passed from the - // client, e.g. properties, args, etc. - // wrap the Inputstream in an ObjectInputstream and read - // the properties and args. - TestUtil.logTrace("ServletVehicle - In doGet"); - - ObjectInputStream objInStream = new ObjectInputStream( - new BufferedInputStream(req.getInputStream())); - System.out.println("ServletVehicle - got InputStream"); - TestUtil.logTrace("ServletVehicle - got InputStream"); - properties = (Properties) objInStream.readObject(); - System.out.println("read properties!!!"); - - // create an instance of the test client and run here - String testClassName = TestUtil.getProperty(properties, "test_classname"); - Class c = Class.forName(testClassName); - testObj = (EETest) c.newInstance(); - - // Thread.currentThread().dumpStack(); - arguments = (String[]) objInStream.readObject(); - // arguments = new String[1]; - // arguments[0] = ""; - TestUtil.logTrace("ServletVehicle - read Objects"); - try { - TestUtil.init(properties); - TestUtil.logTrace("Remote logging set for Servlet Vehicle"); - TestUtil.logTrace("ServletVehicle - Here are the props"); - TestUtil.list(properties); - } catch (Exception e) { - throw new ServletException("unable to initialize remote logging"); - } - ObjectOutputStream objOutStream = new ObjectOutputStream( - res.getOutputStream()); - System.out.println("got outputstream"); - // now run the test and return the result - RemoteStatus finalStatus = runTest(); - System.out.println("ran test"); - objOutStream.writeObject(finalStatus); - objOutStream.flush(); - objOutStream.close(); - - } catch (Throwable t) { - System.out.println(t.getMessage()); - TestUtil.logTrace(t.getMessage()); - t.printStackTrace(); - throw new ServletException( - "test failed to run within the Servlet Vehicle"); - } - - } - - public void doPost(HttpServletRequest req, HttpServletResponse res) - throws ServletException, IOException { - System.out.println("In doPost!"); - TestUtil.logTrace("In doPost"); - doGet(req, res); - } - - protected RemoteStatus runTest() throws RemoteException { - RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); - - try { - // call EETest impl's run method - sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); - - if (sTestStatus.getType() == Status.PASSED) - TestUtil.logMsg("Test running in servlet vehicle passed"); - else - TestUtil.logMsg("Test running in servlet vehicle failed"); - } catch (Throwable e) { - TestUtil.logErr("Test running in servlet vehicle failed", e); - sTestStatus = new RemoteStatus( - Status.failed("Test running in servlet vehicle failed")); - } - return sTestStatus; - } -} diff --git a/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-install/pom.xml b/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-install/pom.xml index 566af951f6..243a9d5504 100644 --- a/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-install/pom.xml +++ b/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-install/pom.xml @@ -53,17 +53,7 @@ **/extensions.xml https://github.com/jakartaee/platform-tck/archive/refs/heads/main.zip - - - - - download-tck-tools - - wget - - generate-resources - - https://github.com/eclipse-ee4j/jakartaee-tck-tools/archive/refs/heads/master.zip + true @@ -107,23 +97,6 @@ clean source:jar install -pl ":ejb30" -pl ":ejb32" - - - - tools_build - - run - - process-resources - - true - ${project.build.directory}/jakartaee-tck-tools-master/arquillian - - pom.xml - - clean source:jar install - - diff --git a/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-run/pom.xml b/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-run/pom.xml index dd83defd06..7de0c8fd4f 100644 --- a/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-run/pom.xml +++ b/glassfish-runner/enterprise-beans-tck/enterprise-beans-tck-run/pom.xml @@ -2,6 +2,24 @@ 4.0.0 @@ -68,6 +86,11 @@ pom import + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.2 + @@ -280,16 +303,6 @@ **/*TestCase.java **/*TestSuite.java - - com.sun.ts.tests.ejb30.assembly.initorder.warejb.ClientTest - com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjblitejspTest - com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjbliteservlet2Test - com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjbliteservletTest - com.sun.ts.tests.ejb30.misc.datasource.twowars.ClientTest - com.sun.ts.tests.ejb30.misc.moduleName.twowars.ClientTest - com.sun.ts.tests.ejb30.misc.moduleName.conflict.ClientTest - com.sun.ts.tests.ejb30.tx.session.stateless.cm.covariant.ClientTest - ${glassfish.home} @@ -354,6 +367,47 @@ jakarta.tck:ejb30 tck-javatest + + + com.sun.ts.tests.ejb30.assembly.initorder.warejb.ClientTest + com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjbliteservlet2Test + com.sun.ts.tests.ejb30.lite.singleton.concurrency.container.annotated.ClientEjbliteservletTest + com.sun.ts.tests.ejb30.misc.datasource.twowars.ClientTest + com.sun.ts.tests.ejb30.misc.moduleName.twowars.ClientTest + com.sun.ts.tests.ejb30.misc.moduleName.conflict.ClientTest + com.sun.ts.tests.ejb30.tx.session.stateless.cm.covariant.ClientTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.timeout.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.bb.session.stateful.timeout.descriptor.ClientEjblitejspTest + com.sun.ts.tests.ejb30.lite.stateful.timeout.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.lite.stateful.timeout.descriptor.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservlet2Test + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservletTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.JsfClientEjblitejsfTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservlet2Test + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservletTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.JsfClientEjblitejsfTest + @@ -405,14 +459,419 @@ maven-surefire-plugin 3.3.1 - + com.sun.ts.tests.ejb30.bb.session.stateful.timeout.annotated.ClientEjblitejspTest com.sun.ts.tests.ejb30.bb.session.stateful.timeout.descriptor.ClientEjblitejspTest com.sun.ts.tests.ejb30.lite.stateful.timeout.annotated.ClientEjblitejspTest com.sun.ts.tests.ejb30.lite.stateful.timeout.descriptor.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservlet2Test + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservletTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.JsfClientEjblitejsfTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjblitejspTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservlet2Test + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservletTest + + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.JsfClientEjblitejsfTest + + + + + + + + + + + ejb30_assembly_misc_tx + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.assembly.**.*Test + com.sun.ts.tests.ejb30.misc.**.*Test + com.sun.ts.tests.ejb30.tx.**.*Test + + + + + + + + + + ejb30_bb + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.bb.session.stateful.timeout.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.bb.session.stateful.timeout.descriptor.ClientEjblitejspTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservlet2Test + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservletTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.JsfClientEjblitejsfTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjblitejspTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservlet2Test + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservletTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.JsfClientEjblitejsfTest + + com.sun.ts.tests.ejb30.bb.**.*Test + + + + + + + + + + ejb30_timer + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.timer.**.*Test + + + + + + + + + + ejb30_lite_singleton + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.lite.singleton.**.*Test + + + + + + + + + + ejb30_lite_appexception + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.lite.appexception.**.*Test + + + + + + + + + + ejb30_lite_rest + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.lite.ejbcontext.**.*Test + com.sun.ts.tests.ejb30.lite.basic.**.*Test + com.sun.ts.tests.ejb30.lite.naming.**.*Test + com.sun.ts.tests.ejb30.lite.lookup.**.*Test + com.sun.ts.tests.ejb30.lite.async.**.*Test + com.sun.ts.tests.ejb30.lite.interceptor.**.*Test + com.sun.ts.tests.ejb30.lite.packaging.**.*Test + com.sun.ts.tests.ejb30.lite.nointerface.**.*Test + com.sun.ts.tests.ejb30.lite.view.**.*Test + com.sun.ts.tests.ejb30.lite.xmloverride.**.*Test + + + + + + + + + + ejb30_lite_env + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.lite.enventry.**.*Test + + + + + + + + + + ejb30_lite_stateful_concurrency + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb30.lite.stateful.concurrency.**.*Test + + + + + + + + + + + + ejb32_nonlite + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.mdb.**.*Test + com.sun.ts.tests.ejb32.relaxedclientview.**.*Test + com.sun.ts.tests.ejb32.timer.**.*Test + + + + + + + + + + ejb32_lite_timer_basic + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.basic.**.*Test + + + + + + + + + + ejb32_lite_timer_interceptor + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.interceptor.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_auto + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.auto.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_descriptor_expression_lifecycle + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.descriptor.**.*Test + com.sun.ts.tests.ejb32.lite.timer.schedule.expression.**.*Test + com.sun.ts.tests.ejb32.lite.timer.schedule.lifecycle.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_expire + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.expire.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_tx + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.tx.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_txnonpersistent + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.txnonpersistent.**.*Test + + + + + + + + + + ejb32_lite_timer_schedule_tz_service_timerconfig + + + + maven-surefire-plugin + + + com.sun.ts.tests.ejb32.lite.timer.schedule.tz.**.*Test + com.sun.ts.tests.ejb32.lite.timer.service.**.*Test + com.sun.ts.tests.ejb32.lite.timer.timerconfig.**.*Test + @@ -430,9 +889,7 @@ - org.apache.maven.plugins maven-surefire-plugin - 3.3.1 com.sun.ts.tests.ejb30.bb.session.stateful.timeout.annotated.ClientEjblitejspTest @@ -517,6 +974,28 @@ + + timeout5 + + + + + maven-surefire-plugin + + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservlet2Test, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjbliteservletTest + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.JsfClientEjblitejsfTest, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.accesstimeout.annotated.ClientEjblitejspTest, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjblitejspTest, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservlet2Test, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.ClientEjbliteservletTest, + com.sun.ts.tests.ejb30.bb.session.stateful.concurrency.metadata.annotated.JsfClientEjblitejsfTest + + + + + + failures @@ -533,7 +1012,7 @@ com.sun.ts.tests.ejb30.misc.datasource.twowars.ClientTest, com.sun.ts.tests.ejb30.misc.moduleName.twowars.ClientTest, com.sun.ts.tests.ejb30.misc.moduleName.conflict.ClientTest, - com.sun.ts.tests.ejb30.tx.session.stateless.cm.covariant.ClientTest, + com.sun.ts.tests.ejb30.tx.session.stateless.cm.covariant.ClientTest diff --git a/glassfish-runner/expression-language-tck/expression-language-tck-run/pom.xml b/glassfish-runner/expression-language-tck/expression-language-tck-run/pom.xml index e24a36373f..50db102a7c 100644 --- a/glassfish-runner/expression-language-tck/expression-language-tck-run/pom.xml +++ b/glassfish-runner/expression-language-tck/expression-language-tck-run/pom.xml @@ -34,7 +34,6 @@ 8.0.0-JDK17-M7 glassfish8 @@ -162,5 +161,24 @@ web + + staging + + false + + + + sonatype-nexus-staging + Sonatype Nexus Staging + https://jakarta.oss.sonatype.org/content/repositories/staging/ + + true + + + false + + + + diff --git a/glassfish-runner/messaging-platform-tck/pom.xml b/glassfish-runner/messaging-platform-tck/pom.xml index 941fccece7..604dace051 100644 --- a/glassfish-runner/messaging-platform-tck/pom.xml +++ b/glassfish-runner/messaging-platform-tck/pom.xml @@ -104,7 +104,7 @@ ./sql jms 11.0.0-SNAPSHOT - ./jakartaeetck/ + ./jakartaeetck cts1 cts1 11.0.0-SNAPSHOT @@ -812,6 +812,7 @@ /tmp ${project.basedir} appclient-arquillian.xml + ${ts.home} @@ -860,6 +861,7 @@ true /tmp arquillian.xml + ${ts.home} diff --git a/glassfish-runner/persistence-platform-tck/src/test/resources/arquillian.xml b/glassfish-runner/persistence-platform-tck/src/test/resources/arquillian.xml index 2c6c234782..0aba1cf6de 100644 --- a/glassfish-runner/persistence-platform-tck/src/test/resources/arquillian.xml +++ b/glassfish-runner/persistence-platform-tck/src/test/resources/arquillian.xml @@ -14,6 +14,8 @@ target/glassfish8 + true + false true diff --git a/glassfish-runner/tags-tck/pom.xml b/glassfish-runner/tags-tck/pom.xml index d4b759a054..76352ed501 100644 --- a/glassfish-runner/tags-tck/pom.xml +++ b/glassfish-runner/tags-tck/pom.xml @@ -1,463 +1,37 @@ - + + 4.0.0 - org.glassfish - standalone-tck - 11.0.0-SNAPSHOT + org.eclipse.ee4j + project + 1.0.9 + - jakarta - glassfish.jstl-tck - 11.0.0-SNAPSHOT - jar - - - ; - derby - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - 8.0.0-JDK17-M5 - - glassfish8 - 11.0.0-M2 - ${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyclient.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyshared.jar:${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbytools.jar - derby - org.apache.derby.jdbc.ClientDriver - derbyDB - cts1 - 1527 - localhost - jdbc:derby://${jstl.db.server}:${jstl.db.port}/${jstl.db.name};create=true - cts1 - 5.9.1 - jakarta-tags-tck - 4.0.0 - - - - - org.junit.vintage - junit-vintage-engine - test - - - jakarta.tck - ${tck.artifactId} - ${tck.version} - - - org.glassfish.main.common - simple-glassfish-api - ${glassfish.version} - - - org.jboss.arquillian.junit5 - arquillian-junit5-container - - - jakarta.platform - jakarta.jakartaee-api - ${jakarta.platform.version} - provided - - - commons-httpclient - commons-httpclient - 3.1 - - - org.glassfish.hk2 - hk2-locator - 3.0.0 - - - org.jboss.arquillian.container - arquillian-container-test-spi - - - org.omnifaces.arquillian - arquillian-glassfish-server-managed - 1.2 - test - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.2.0 - - - 1-download-gf - - unpack - - generate-resources - - - - org.glassfish.main.distributions - ${glassfish-artifact-id} - ${glassfish.version} - zip - true - ${project.build.directory} - - - - - - - - maven-antrun-plugin - 3.0.0 - - - 2-asadmin-permission - - run - - generate-resources - - - - - - - - - - - - - org.codehaus.mojo - exec-maven-plugin - - - 001-StopDomain - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - stop-domain - - - - - 002-StartDomain - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - start-domain - - - - - 003-create-jvm-options - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - create-jvm-options - -Djavax.xml.accessExternalStylesheet=all - - - - - 004-create-jvm-options - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - create-jvm-options - -Djavax.xml.accessExternalDTD=file,http - - - - - 005-create-jvm-options - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - create-jvm-options - -Djavax.xml.accessExternalSchema=all - - - 0 - 1 - - - - - 006-EnableTraceRequests - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - set - server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true - - - - - 007-DeleteUser-j2ee - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - --passwordfile - ${project.basedir}/j2ee.pass - delete-file-user - j2ee - - - 0 - 1 - - - - - 008-AddUser-j2ee - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - --passwordfile - ${project.basedir}/j2ee.pass - create-file-user - --groups - staff:mgr - j2ee - - - - - 009-DeleteUser-javajoe - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - --passwordfile - ${project.basedir}/javajoe.pass - delete-file-user - javajoe - - - 0 - 1 - - - - - 010-AddUser-javajoe - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - --passwordfile - ${project.basedir}/javajoe.pass - create-file-user - --groups - guest - javajoe - - - - - 011-list-users - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - list-file-users - - - - - 012-StopDomain - - exec - - pre-integration-test - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin - - stop-domain - - - - - 013-stop-database - - exec - - pre-integration-test - - ${exec.asadmin} - - stop-database - - - 0 - 1 - - - - - 014-start-database - - exec - - pre-integration-test - - ${exec.asadmin} - - start-database - - - - - - - org.apache.maven.plugins - maven-antrun-plugin - 3.0.0 - - - 015-initdb - - run - - integration-test - - - - - - - - - - - - maven-failsafe-plugin - 3.0.0-M5 - - - gf-tests - - integration-test - verify - - - - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet-api.jar - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.el-api.jar - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp-api.jar - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl-api.jar - - ${testGroups} - jakarta.tck:${tck.artifactId} - - ${project.build.directory}/${glassfish.toplevel.dir} - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish - glassfish - ${webServerHome}/domains/domain1/autodeploy - 30 - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet-api.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp-api.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.el-api.jar - ${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl.jar:${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.servlet.jsp.jstl-api.jar - true - derbyDB - localhost - 1527 - jdbc:derby://${jstl.db.server}:${jstl.db.port}/${jstl.db.name};create=true - org.apache.derby.jdbc.ClientDriver - cts1 - cts1 - j2ee - j2ee - javajoe - javajoe - true - true - com.sun.ts.tests.jstl.lib.implementation.sun.common.SunRIURL - - - - - - - + tags-tck + 4.0.0-SNAPSHOT + pom - - - full - - true - - - glassfish - platform - - - - web - - web - web - - - + + tags-tck-install + tags-tck-run + diff --git a/glassfish-runner/tags-tck/tags-tck-install/pom.xml b/glassfish-runner/tags-tck/tags-tck-install/pom.xml new file mode 100644 index 0000000000..0fb69800ed --- /dev/null +++ b/glassfish-runner/tags-tck/tags-tck-install/pom.xml @@ -0,0 +1,86 @@ + + + + 4.0.0 + + + org.eclipse.ee4j + project + 1.0.9 + + + + tags-tck-install + pom + TCK: Install Jakarta tags TCK + + + jakarta-tags-tck-${tck.test.tags.version}.zip + https://download.eclipse.org/ee4j/jakartaee-tck/jakartaee11/staged/eftl/${tck.test.tags.file} + 11.0.0-M2 + + + + + + com.googlecode.maven-download-plugin + download-maven-plugin + 1.9.0 + + ${tck.test.tags.url} + true + ${project.build.directory} + + + + download-tags-tck + + wget + + generate-resources + + + + + + maven-install-plugin + 3.1.3 + + + install-tags-tck-pom + + install-file + + process-resources + + ${project.build.directory}/jakarta-tags-tck-${tck.test.tags.version}.jar + ${project.build.directory}/jakarta-tags-tck-${tck.test.tags.version}-sources.jar + jakarta.tck + jakarta-tags-tck + ${tck.test.tags.version} + jar + + + + + + + + + diff --git a/glassfish-runner/tags-tck/j2ee.pass b/glassfish-runner/tags-tck/tags-tck-run/j2ee.pass similarity index 100% rename from glassfish-runner/tags-tck/j2ee.pass rename to glassfish-runner/tags-tck/tags-tck-run/j2ee.pass diff --git a/glassfish-runner/tags-tck/javajoe.pass b/glassfish-runner/tags-tck/tags-tck-run/javajoe.pass similarity index 100% rename from glassfish-runner/tags-tck/javajoe.pass rename to glassfish-runner/tags-tck/tags-tck-run/javajoe.pass diff --git a/glassfish-runner/tags-tck/tags-tck-run/password.txt b/glassfish-runner/tags-tck/tags-tck-run/password.txt new file mode 100644 index 0000000000..c7546fecbe --- /dev/null +++ b/glassfish-runner/tags-tck/tags-tck-run/password.txt @@ -0,0 +1,4 @@ +AS_ADMIN_MASTERPASSWORD= +AS_ADMIN_PASSWORD= +AS_ADMIN_USERPASSWORD= +AS_ADMIN_DBPASSWORD=CTS1 diff --git a/glassfish-runner/tags-tck/tags-tck-run/pom.xml b/glassfish-runner/tags-tck/tags-tck-run/pom.xml new file mode 100644 index 0000000000..8720302c28 --- /dev/null +++ b/glassfish-runner/tags-tck/tags-tck-run/pom.xml @@ -0,0 +1,188 @@ + + + + 4.0.0 + + + org.eclipse.ee4j + project + 1.0.9 + + + + jakarta + glassfish.jstl-tck + 11.0.0-SNAPSHOT + jar + + + ${glassfish.root}/glassfish${glassfish.version.main} + ${project.build.directory} + 8.0.0-JDK17-M9 + 8 + 11.0.0-M4 + 11.0.0-M2 + + + + + + jakarta.platform + jakarta.jakartaee-api + ${jakarta.platform.version} + provided + + + + + jakarta.tck + jakarta-tags-tck + ${tck.version} + + + + + org.junit.jupiter + junit-jupiter + 5.11.3 + test + + + + org.jboss.arquillian.junit5 + arquillian-junit5-container + 1.9.1.Final + + + + org.jboss.arquillian.container + arquillian-container-test-spi + 1.9.1.Final + + + + commons-httpclient + commons-httpclient + 3.1 + + + + + org.omnifaces.arquillian + arquillian-glassfish-server-managed + 1.7 + test + + + + + + + maven-dependency-plugin + + + 1-download-gf + + unpack + + generate-resources + + + + org.glassfish.main.distributions + ${glassfish-artifact-id} + ${glassfish.version} + zip + true + ${project.build.directory} + + + + + + + + + maven-failsafe-plugin + + + gf-tests + + integration-test + verify + + + ${testGroups} + jakarta.tck:jakarta-tags-tck + + ${project.build.directory}/${glassfish.toplevel.dir} + + true + ${glassfish.home}/glassfish/domains/domain1/config/derbyDB;create=true + ${project.basedir}/sql/derby/derby.ddl.jstl.sql + cts1 + ${project.basedir}/password.txt + + set server-config.network-config.protocols.protocol.http-listener-1.http.trace-enabled=true + create-jvm-options -Djavax.xml.accessExternalStylesheet=all + create-jvm-options -Djavax.xml.accessExternalSchema=all + create-jvm-options -Djavax.xml.accessExternalDTD=file,http + restart-domain + create-file-user --groups staff:mgr --passwordfile ${project.basedir}/j2ee.pass j2ee + create-file-user --groups guest --passwordfile ${project.basedir}/javajoe.pass javajoe + list-file-users + + true + ${glassfish.home}/glassfish/domains/domain1/config/derbyDB + localhost + 1527 + jdbc:derby://localhost:1527/${glassfish.home}/glassfish/domains/domain1/config/derbyDB + org.apache.derby.jdbc.ClientDriver + cts1 + cts1 + true + true + + + + + + + + + + + full + + true + + + glassfish + platform + + + + web + + web + web + + + + diff --git a/glassfish-runner/tags-tck/sql/derby/derby.ddl.jstl.sql b/glassfish-runner/tags-tck/tags-tck-run/sql/derby/derby.ddl.jstl.sql similarity index 100% rename from glassfish-runner/tags-tck/sql/derby/derby.ddl.jstl.sql rename to glassfish-runner/tags-tck/tags-tck-run/sql/derby/derby.ddl.jstl.sql diff --git a/glassfish-runner/tags-tck/sql/derby/derby.dml.jstl.sql b/glassfish-runner/tags-tck/tags-tck-run/sql/derby/derby.dml.jstl.sql similarity index 100% rename from glassfish-runner/tags-tck/sql/derby/derby.dml.jstl.sql rename to glassfish-runner/tags-tck/tags-tck-run/sql/derby/derby.dml.jstl.sql diff --git a/glassfish-runner/tags-tck/src/test/resources/arquillian.xml b/glassfish-runner/tags-tck/tags-tck-run/src/test/resources/arquillian.xml similarity index 100% rename from glassfish-runner/tags-tck/src/test/resources/arquillian.xml rename to glassfish-runner/tags-tck/tags-tck-run/src/test/resources/arquillian.xml diff --git a/glassfish-runner/transactions-tck/transactions-tck-install/pom.xml b/glassfish-runner/transactions-tck/transactions-tck-install/pom.xml index 822d554775..d090237b71 100644 --- a/glassfish-runner/transactions-tck/transactions-tck-install/pom.xml +++ b/glassfish-runner/transactions-tck/transactions-tck-install/pom.xml @@ -101,7 +101,7 @@ pom.xml - clean source:jar install + clean source:jar install -DskipTests diff --git a/jpa_extras/pom.xml b/jpa_extras/pom.xml deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/jsp/src/main/resources/.DS_Store b/jsp/src/main/resources/.DS_Store deleted file mode 100644 index 49a97e4ef9..0000000000 Binary files a/jsp/src/main/resources/.DS_Store and /dev/null differ diff --git a/jsp/src/main/resources/ee/.DS_Store b/jsp/src/main/resources/ee/.DS_Store deleted file mode 100644 index d54fc2d9e0..0000000000 Binary files a/jsp/src/main/resources/ee/.DS_Store and /dev/null differ diff --git a/jsp/src/main/resources/ee/jakarta/.DS_Store b/jsp/src/main/resources/ee/jakarta/.DS_Store deleted file mode 100644 index 50f0ea2008..0000000000 Binary files a/jsp/src/main/resources/ee/jakarta/.DS_Store and /dev/null differ diff --git a/jsp/src/main/resources/ee/jakarta/tck/.DS_Store b/jsp/src/main/resources/ee/jakarta/tck/.DS_Store deleted file mode 100644 index 4aae2c69bd..0000000000 Binary files a/jsp/src/main/resources/ee/jakarta/tck/.DS_Store and /dev/null differ diff --git a/jsp/src/main/resources/ee/jakarta/tck/pages/.DS_Store b/jsp/src/main/resources/ee/jakarta/tck/pages/.DS_Store deleted file mode 100644 index f9538889e8..0000000000 Binary files a/jsp/src/main/resources/ee/jakarta/tck/pages/.DS_Store and /dev/null differ diff --git a/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java b/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java deleted file mode 100644 index 485d0710de..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java +++ /dev/null @@ -1,552 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import java.io.*; -import java.util.*; -import javax.xml.parsers.*; -import org.xml.sax.helpers.*; -import org.xml.sax.*; -import org.apache.tools.ant.taskdefs.*; -import org.apache.tools.ant.types.*; -import org.apache.tools.ant.*; -import com.sun.ts.lib.util.*; - -public final class AssertionMapper { - private static final String NO_DESC = "See assertion html documents."; - - private static final String INVALID = "WARN: invalid assertion_id: "; - - public final static String NL = System.getProperty("line.separator"); - - public final static String NL2 = NL; - - private static boolean debug; - - private static boolean showRetrievedAssertions; - - protected static String assertionDir; - - private static String[] assertionFiles; - - private static Map fileName2Map = new HashMap(); - - private static Map aMap = new HashMap(); - - // xmlFileNames that parser has failed to load, and thus will not load it - // again. - private static Set unloadable = new HashSet(); - - static { - debug = Boolean.getBoolean("AssertionMapper.debug"); - showRetrievedAssertions = Boolean.getBoolean("show.retrieved.assertions"); - assertionDir = System.getProperty("assertion.dir"); - if (assertionDir == null) - assertionDir = System.getProperty("ts.home") + File.separator + "internal" - + File.separator + "docs"; - - DirectoryScanner ds = new DirectoryScanner(); - ds.setBasedir(assertionDir); - ds.addDefaultExcludes(); - ds.setCaseSensitive(false); - ds.setIncludes(new String[] { "**/*Assertions.xml" }); - ds.scan(); - assertionFiles = ds.getIncludedFiles(); - System.out.println( - assertionFiles.length + " assertion files under " + assertionDir); - for (int i = 0; i < assertionFiles.length; i++) { - System.out.println(assertionFiles[i]); - } - } - - private AssertionMapper() { - } - - /** - * main program to test AssertionComparator, the nested class. - */ - public static void main(String[] args) { - String[] s = { "JMS:SPEC:130.3", "EJB:JAVADOC:27", "JMS:SPEC:130.19", - "JSP:SPEC:130", "JMS:SPEC:130.9.5", "JMS:SPEC:130.9" }; - Arrays.sort(s, AssertionComparator.getInstance()); - System.out.println("After sorting"); - for (int i = 0; i < s.length; i++) { - System.out.println(s[i]); - } - - } - - public static void log(String s) { - System.out.println(s); - } - - /* - * Retrieves assertion descriptions for assertion_ids. - * - * @param assertionIds separated by ; - * - * @param file test source file that contains the assertion ids. For debug - * purpose. - * - * @return a single string containing all assertion descriptions separated by - * new line. - * - */ - public static String getAssertionDescriptions(String assertionIds, - File file) { - String filePath = file.getPath(); - if (assertionIds == null || assertionIds.length() == 0) { - System.out.println("WARN: no value for assertion_ids (" + filePath + ")"); - return NO_DESC; - } - StringTokenizer st = new StringTokenizer(assertionIds, ";,\n\r\f\t"); - int countId = st.countTokens(); - String[] idArray = new String[countId]; - for (int i = 0; i < idArray.length; i++) { - idArray[i] = st.nextToken().trim(); - } - Arrays.sort(idArray, AssertionComparator.getInstance()); - Set addedAssertions = new HashSet(); // avoid one assertion to be added - // multiple times - StringBuffer retval = new StringBuffer(); - for (int i = 0; i < idArray.length; i++) { - String aDescription = getDescription0(idArray[i], filePath, - addedAssertions); - if (aDescription != null && aDescription.length() > 0) { - retval.append(aDescription).append(NL2); - } - } - return retval.toString().trim(); - }// getAssertionDescription - - /** - * @param token - * a token in assertion_ids. It has not beenn validated or split. - * @param filePath - * the full path to the test source code that contained the assertion - * ids. For example, - * /files/ts/src/com/sun/ts/tests/jsp/syntax/Client.java. - * @param addedAssertion - * set to keep track of assertions that have been added to the - * result. - * @return a complete description of this assertion id. If it's not a valid - * assertion, null or empty string is returned. A complete description - * includes description of all of its ancestors, its own description, - * and that of all of its descendents. - */ - private static String getDescription0(String token, String filePath, - Set addedAssertions) { - String aDescription = null; // assertion description for token(id) - int pos1 = token.indexOf(":"); - if (pos1 == -1) { - System.out.println(INVALID + token + " (" + filePath + ")"); - return null; - } - String first = token.substring(0, pos1); - int pos2 = token.indexOf(":", pos1 + 1); - if (pos2 == -1) { - System.out.println(INVALID + token + " (" + filePath + ")"); - return null; - } - String second = token.substring(pos1 + 1, pos2); - String third = token.substring(pos2 + 1); // the number, e.g., 14 - - // for example, first=JMS, second=SPEC, third=14.1 - StringBuffer xmlFileName = new StringBuffer(); - xmlFileName.append(first); - xmlFileName.append(Character.toUpperCase(second.charAt(0))); - xmlFileName.append(second.substring(1).toLowerCase()); - xmlFileName.append("Assertions.xml"); - - // some old assertion doc use 8, instead of JMS:SPEC:8 - String fn = xmlFileName.toString(); - Map assertionMap = (Map) fileName2Map.get(fn); - if (assertionMap == null) { // has not been read, or has failed to load - if (!unloadable.contains(fn)) { - new HelpHandler().load(fn, first); - } - } - assertionMap = (Map) fileName2Map.get(fn); - StringBuffer resultBuffer = new StringBuffer(); - if (assertionMap == null) { // failed to read xml file - resultBuffer.append(token).append(" ").append(NO_DESC); - return resultBuffer.toString(); - } - - // get description of all ancestors. Assume ancestors and descendants are - // in the same map. - int dotPosition = token.indexOf(".", pos2); - while (dotPosition != -1) { - String upperId = token.substring(0, dotPosition); - if (!addedAssertions.contains(upperId)) { - String upperDesc = (String) assertionMap.get(upperId); - if (upperDesc == null || upperDesc.length() == 0) { - System.out.println( - "WARN: no description for " + upperId + " in " + filePath); - upperDesc = NO_DESC; - } - resultBuffer.append(upperId).append(" ").append(upperDesc).append(NL2); - addedAssertions.add(upperId); - } - dotPosition = token.indexOf(".", dotPosition + 1); - } - - // get description for itself and all descendants - if (!addedAssertions.contains(token)) { - String thisDescription = (String) assertionMap.get(token); - if (thisDescription == null) { - thisDescription = NO_DESC; - System.out - .println("WARN: no description for " + token + " in " + filePath); - } - resultBuffer.append(token).append(" ").append(thisDescription) - .append(NL2); - addedAssertions.add(token); - } - - List keyList = new ArrayList(); - String tokenDot = token + '.'; - for (Iterator i = assertionMap.keySet().iterator(); i.hasNext();) { - String key = (String) i.next(); - if (key.startsWith(tokenDot) && !addedAssertions.contains(key)) { - keyList.add(key); - } - } - Collections.sort(keyList, AssertionComparator.getInstance()); - for (int i = 0, n = keyList.size(); i < n; i++) { - String k = (String) keyList.get(i); - resultBuffer.append(k).append(" ").append(assertionMap.get(k)) - .append(NL2); - addedAssertions.add(k); - } - return resultBuffer.toString().trim(); - // TODO: remove from assertion description - } - - // ------------------------ static nested class --------------------------- - public static class AssertionComparator implements Comparator { - private static AssertionComparator instance = new AssertionComparator(); - - private AssertionComparator() { - } - - public static AssertionComparator getInstance() { - return instance; - } - - public int compare(Object o1, Object o2) { - String s1 = (String) o1; - String s2 = (String) o2; - int pos1 = s1.lastIndexOf(":"); - int pos2 = s2.lastIndexOf(":"); - String word1 = null; - String word2 = null; - if (pos1 != -1) { - word1 = s1.substring(0, pos1); - } - if (pos2 != -1) { - word2 = s2.substring(0, pos2); - } - - String numPart1 = null; - String numPart2 = null; - // to handle invalid ids like 145, 234. - if (pos1 == -1 && pos2 == -1) { - numPart1 = s1; - numPart2 = s2; - } else { - // one is null, but not both - if (word1 == null || word2 == null) { - return -1; - } - // both have wordpart - int wordCompare = word1.compareTo(word2); - if (wordCompare != 0) { - return wordCompare; - } - // continue to compare number part. pos1 and pos2 are not -1 now. - numPart1 = s1.substring(pos1 + 1); - numPart2 = s2.substring(pos2 + 1); // for example, 1.1.4.5 - } - - StringTokenizer st1 = new StringTokenizer(numPart1, "."); - StringTokenizer st2 = new StringTokenizer(numPart2, "."); - int size1 = st1.countTokens(); - int size2 = st2.countTokens(); - int biggerSize = (size1 == size2) ? size1 - : (size1 > size2) ? size1 : size2; - - int[] int1 = new int[biggerSize]; - int[] int2 = new int[biggerSize]; - fillIntArray(st1, int1); - fillIntArray(st2, int2); - - for (int i = 0; i < biggerSize; i++) { - int diff = int1[i] - int2[i]; - if (diff != 0) { - return diff; - } - // both are zero, or the same positive number - if (int1[i] == 0) { - return -1; - } - } - return -1; - } - - /** - * @param int1 - * bigger of the two. equal to bigger than number of tokens. - */ - private void fillIntArray(StringTokenizer st, int[] int1) { - for (int i = 0; i < int1.length && st.hasMoreTokens(); i++) { - try { - int1[i] = Integer.parseInt(st.nextToken()); - } catch (NumberFormatException exp) { - break; // stop once we hit a non-number. Unitializaed part will be 0. - } - } - } - } - - // ------------------------------------------------------------------------ - /** - * sax2 event handler is too slow. So stick to HandlerBase. - */ - public static class HelpHandler - // extends DefaultHandler { - extends HandlerBase { - private String xmlFileName; - - private boolean b_assertions; - - private boolean b_assertion; - - private boolean b_id; - - private boolean b_description; - - private boolean b_technology; - - private String currentId; - - private String currentDescription; - - private String techType; // JMS:SPEC, JSP:JAVADOC, etc - - private String specOrJavadoc; // spec, or javadoc - - private Map aFileMap; - - private boolean alreadyPut; - - private String parentDir; - - public HelpHandler() { - } - - public void load(String xmlFileName, String technologyName) { - String fn = null; - for (int i = 0; i < assertionFiles.length; i++) { - int index = assertionFiles[i].lastIndexOf(File.separator) + 1; - String fName = assertionFiles[i].substring(index); - if (fName.equalsIgnoreCase(xmlFileName)) { - fn = assertionFiles[i]; - break; - } - } - if (fn == null) { - System.out.println("WARN: failed to find file " + xmlFileName - + " under " + assertionDir + ", verify the technology name [" - + technologyName + "] is spelled correcting in the test clients"); - return; - } - this.xmlFileName = xmlFileName; - try { - // Store the parent directory of this file for the resolver to use - System.err.println("%%%%%%%%%% Parsing file \"" + fn + "\" %%%%%%%%%"); - File fileFN = new File(fn); - parentDir = fileFN.getParent(); - System.err.println("%%%%%%%%%% parentDir set to (resolver uses this) \"" - + parentDir + "\" %%%%%%%%%"); - - InputSource is = new InputSource( - new FileInputStream(new File(assertionDir, fn))); - SAXParserFactory factory = SAXParserFactory.newInstance(); - factory.setValidating(false); - SAXParser saxParser = factory.newSAXParser(); - saxParser.parse(is, this); - } catch (SAXException se) { - se.printStackTrace(); - unloadable.add(xmlFileName); - System.out.println("Will skip all assertions in " + xmlFileName); - } catch (IOException fe) { - fe.printStackTrace(); - unloadable.add(xmlFileName); - System.out.println("Will skip all assertions in " + xmlFileName); - } catch (ParserConfigurationException pe) { - pe.printStackTrace(); - unloadable.add(xmlFileName); - System.out.println("Will skip all assertions in " + xmlFileName); - } - } - - /* - * Implementation of the entity resolver interface. This allows CTS - * developers to use entity declarations in their assertion docs provided - * the assertion doc (the referencing doc) and the referenced docs are in - * the same directory. - */ - public InputSource resolveEntity(String publicId, String systemId) { - System.err.println("publicId \"" + publicId + "\""); - System.err.println("systemId \"" + systemId + "\""); - String result = null; - String fileName = systemId.substring(systemId.lastIndexOf("/") + 1); - String possibleLocation = assertionDir + File.separator + parentDir - + File.separator + fileName; - File possibleFile = new File(possibleLocation); - if (possibleFile.isFile()) { - result = possibleLocation; - } else { - System.err.println( - "%%%%%%% Error could not resolve file \"" + fileName + "\""); - result = systemId; - } - System.err - .println("%%%%%%%% Entity Resolver returning \"" + result + "\""); - return new InputSource(result); - } - - public void startElement(String localName, AttributeList attrs) - throws SAXException { - // public void startElement(String uri, - // String localName, - // String qName, - // Attributes attributes) - // throws SAXException { - if (localName.equalsIgnoreCase("assertions")) { - b_assertions = true; - aFileMap = new HashMap(); - } else if (localName.equalsIgnoreCase("assertion") && b_assertions) { - b_assertion = true; - } else if (localName.equalsIgnoreCase("id") && b_assertions - && b_assertion) { - b_id = true; - } else if (localName.equalsIgnoreCase("description") && b_assertions - && b_assertion) { - b_description = true; - } else if (localName.equalsIgnoreCase("sub-assertions") && b_assertions - && b_assertion) { - putIdAndDescription(); - } else if (localName.equalsIgnoreCase("spec") - || localName.equalsIgnoreCase("javadoc")) { - specOrJavadoc = localName; - } else if (localName.equalsIgnoreCase("technology")) { - b_technology = true; - } - } - - public void endElement(String localName) throws SAXException { - // public void endElement(String uri, - // String localName, - // String qName) - // throws SAXException { - if (localName.equalsIgnoreCase("assertions")) { - fileName2Map.put(this.xmlFileName, aFileMap); - b_assertions = false; - return; - } else if (localName.equalsIgnoreCase("assertion")) { - putIdAndDescription(); - b_assertion = false; - b_id = false; - b_description = false; - } else if (localName.equalsIgnoreCase("id") && b_assertions - && b_assertion) { - b_id = false; - } else if (localName.equalsIgnoreCase("description") && b_assertions - && b_assertion) { - b_description = false; - } else if (localName.equalsIgnoreCase("technology")) { - b_technology = false; - } - } - - public void characters(char[] ch, int start, int length) - throws SAXException { - if (b_id && b_description) { - System.out.println( - "WARN: invalid state: in both id and description element."); - } - if (b_id) { - currentId = new String(ch, start, length); - alreadyPut = false; - } else if (b_description) { - String content = new String(ch, start, length); - if (currentDescription == null) { - currentDescription = content; - } else { // some descriptions have formatting elements , - // ,which - // may be treated as nested elements of description by the parser - currentDescription += " " + content; - } - alreadyPut = false; - } else if (b_technology) { - if (specOrJavadoc == null) { - System.out - .println("Should have encountered javadoc or spec element!"); - } else { - String tech = new String(ch, start, length).trim(); - techType = (tech + ':' + specOrJavadoc).toUpperCase(); - } - } - } // characters - - /** - * need to put at end of assertion, or start of sub-assertion - */ - private void putIdAndDescription() { - if (alreadyPut) { - return; - } - if (currentId == null || currentId.length() == 0) { - System.out.println("WARN: null id in " + xmlFileName); - return; - } - currentId = currentId.trim(); - // some id may be like 14, while it really should be like JMS:SPEC:14 - if (techType != null && !currentId.startsWith(techType)) { - currentId = techType + ':' + currentId; - } - if (currentDescription == null || currentDescription.length() == 0) { - System.out.println("WARN: for id:[" + currentId - + "] null description in " + xmlFileName); - currentDescription = NO_DESC; - } else { - currentDescription = currentDescription.trim(); - } - if (showRetrievedAssertions) { - System.out.println(currentId + " " + currentDescription); - } - aFileMap.put(currentId, currentDescription); - alreadyPut = true; - currentId = null; - currentDescription = null; - } - - } // nested class - -}// main class diff --git a/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java b/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java deleted file mode 100644 index ecb540dffe..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java +++ /dev/null @@ -1,155 +0,0 @@ -/* - * Copyright (c) 1995, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import java.io.OutputStream; -import java.io.PushbackInputStream; -import java.io.PrintStream; - -/** - * This class implements a BASE64 Character decoder as specified in RFC1521. - * - * This RFC is part of the MIME specification which is published by the Internet - * Engineering Task Force (IETF). Unlike some other encoding schemes there is - * nothing in this encoding that tells the decoder where a buffer starts or - * stops, so to use it you will need to isolate your encoded data into a single - * chunk and then feed them this decoder. The simplest way to do that is to read - * all of the encoded data into a string and then use: - * - *
- * byte mydata[];
- * BASE64Decoder base64 = new BASE64Decoder();
- *
- * mydata = base64.decodeBuffer(bufferString);
- * 
- * - * This will decode the String in bufferString and give you an array of - * bytes in the array myData. - * - * On errors, this class throws a CEFormatException with the following detail - * strings: - * - *
- * "BASE64Decoder: Not enough bytes for an atom."
- * 
- * - * @author Chuck McManis - * @see CharacterEncoder - * @see BASE64Decoder - */ - -public class BASE64Decoder extends CharacterDecoder { - - /** This class has 4 bytes per atom */ - protected int bytesPerAtom() { - return (4); - } - - /** Any multiple of 4 will do, 72 might be common */ - protected int bytesPerLine() { - return (72); - } - - /** - * This character array provides the character to value map based on RFC1521. - */ - private final static char pem_array[] = { - // 0 1 2 3 4 5 6 7 - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0 - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1 - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2 - 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3 - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4 - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5 - 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6 - '4', '5', '6', '7', '8', '9', '+', '/' // 7 - }; - - private final static byte pem_convert_array[] = new byte[256]; - - static { - for (int i = 0; i < 255; i++) { - pem_convert_array[i] = -1; - } - for (int i = 0; i < pem_array.length; i++) { - pem_convert_array[pem_array[i]] = (byte) i; - } - } - - byte decode_buffer[] = new byte[4]; - - /** - * Decode one BASE64 atom into 1, 2, or 3 bytes of data. - */ - protected void decodeAtom(PushbackInputStream inStream, - OutputStream outStream, int rem) throws java.io.IOException { - int i; - byte a = -1, b = -1, c = -1, d = -1; - - if (rem < 2) { - throw new CEFormatException( - "BASE64Decoder: Not enough bytes for an atom."); - } - do { - i = inStream.read(); - if (i == -1) { - throw new CEStreamExhausted(); - } - } while (i == '\n' || i == '\r'); - decode_buffer[0] = (byte) i; - - i = readFully(inStream, decode_buffer, 1, rem - 1); - if (i == -1) { - throw new CEStreamExhausted(); - } - - if (rem > 3 && decode_buffer[3] == '=') { - rem = 3; - } - if (rem > 2 && decode_buffer[2] == '=') { - rem = 2; - } - switch (rem) { - case 4: - d = pem_convert_array[decode_buffer[3] & 0xff]; - // NOBREAK - case 3: - c = pem_convert_array[decode_buffer[2] & 0xff]; - // NOBREAK - case 2: - b = pem_convert_array[decode_buffer[1] & 0xff]; - a = pem_convert_array[decode_buffer[0] & 0xff]; - break; - } - - switch (rem) { - case 2: - outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); - break; - case 3: - outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); - outStream.write((byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf))); - break; - case 4: - outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); - outStream.write((byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf))); - outStream.write((byte) (((c << 6) & 0xc0) | (d & 0x3f))); - break; - } - return; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java b/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java deleted file mode 100644 index da7cce73f3..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import java.io.OutputStream; -import java.io.InputStream; -import java.io.PrintStream; -import java.io.IOException; - -/** - * This class implements a BASE64 Character encoder as specified in RFC1521. - * This RFC is part of the MIME specification as published by the Internet - * Engineering Task Force (IETF). Unlike some other encoding schemes there is - * nothing in this encoding that indicates where a buffer starts or ends. - * - * This means that the encoded text will simply start with the first line of - * encoded text and end with the last line of encoded text. - * - * @version 1.23, 11/17/05 - * @author Chuck McManis - * @see CharacterEncoder - * @see BASE64Decoder - */ - -public class BASE64Encoder extends CharacterEncoder { - - /** this class encodes three bytes per atom. */ - protected int bytesPerAtom() { - return (3); - } - - /** - * this class encodes 57 bytes per line. This results in a maximum of 57/3 * 4 - * or 76 characters per output line. Not counting the line termination. - */ - protected int bytesPerLine() { - return (57); - } - - /** This array maps the characters to their 6 bit values */ - private final static char pem_array[] = { - // 0 1 2 3 4 5 6 7 - 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0 - 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1 - 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2 - 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3 - 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4 - 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5 - 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6 - '4', '5', '6', '7', '8', '9', '+', '/' // 7 - }; - - /** - * encodeAtom - Take three bytes of input and encode it as 4 printable - * characters. Note that if the length in len is less than three is encodes - * either one or two '=' signs to indicate padding characters. - */ - protected void encodeAtom(OutputStream outStream, byte data[], int offset, - int len) throws IOException { - byte a, b, c; - - if (len == 1) { - a = data[offset]; - b = 0; - c = 0; - outStream.write(pem_array[(a >>> 2) & 0x3F]); - outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); - outStream.write('='); - outStream.write('='); - } else if (len == 2) { - a = data[offset]; - b = data[offset + 1]; - c = 0; - outStream.write(pem_array[(a >>> 2) & 0x3F]); - outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); - outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]); - outStream.write('='); - } else { - a = data[offset]; - b = data[offset + 1]; - c = data[offset + 2]; - outStream.write(pem_array[(a >>> 2) & 0x3F]); - outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); - outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]); - outStream.write(pem_array[c & 0x3F]); - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java b/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java deleted file mode 100644 index a80ff7c070..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright (c) 1995, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import java.io.OutputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.io.PushbackInputStream; -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.nio.ByteBuffer; - -/** - * This class defines the decoding half of character encoders. A character - * decoder is an algorithim for transforming 8 bit binary data that has been - * encoded into text by a character encoder, back into original binary form. - * - * The character encoders, in general, have been structured around a central - * theme that binary data can be encoded into text that has the form: - * - *
- *      [Buffer Prefix]
- *      [Line Prefix][encoded data atoms][Line Suffix]
- *      [Buffer Suffix]
- * 
- * - * Of course in the simplest encoding schemes, the buffer has no distinct prefix - * of suffix, however all have some fixed relationship between the text in an - * 'atom' and the binary data itself. - * - * In the CharacterEncoder and CharacterDecoder classes, one complete chunk of - * data is referred to as a buffer. Encoded buffers are all text, and - * decoded buffers (sometimes just referred to as buffers) are binary octets. - * - * To create a custom decoder, you must, at a minimum, overide three abstract - * methods in this class. - *
- *
bytesPerAtom which tells the decoder how many bytes to expect from - * decodeAtom - *
decodeAtom which decodes the bytes sent to it as text. - *
bytesPerLine which tells the encoder the maximum number of bytes per - * line. - *
- * - * In general, the character decoders return error in the form of a - * CEFormatException. The syntax of the detail string is - * - *
- *      DecoderClassName: Error message.
- * 
- * - * Several useful decoders have already been written and are referenced in the - * See Also list below. - * - * @author Chuck McManis - * @see CEFormatException - * @see CharacterEncoder - * @see UCDecoder - * @see UUDecoder - * @see BASE64Decoder - */ - -public abstract class CharacterDecoder { - - /** Return the number of bytes per atom of decoding */ - abstract protected int bytesPerAtom(); - - /** Return the maximum number of bytes that can be encoded per line */ - abstract protected int bytesPerLine(); - - /** decode the beginning of the buffer, by default this is a NOP. */ - protected void decodeBufferPrefix(PushbackInputStream aStream, - OutputStream bStream) throws IOException { - } - - /** decode the buffer suffix, again by default it is a NOP. */ - protected void decodeBufferSuffix(PushbackInputStream aStream, - OutputStream bStream) throws IOException { - } - - /** - * This method should return, if it knows, the number of bytes that will be - * decoded. Many formats such as uuencoding provide this information. By - * default we return the maximum bytes that could have been encoded on the - * line. - */ - protected int decodeLinePrefix(PushbackInputStream aStream, - OutputStream bStream) throws IOException { - return (bytesPerLine()); - } - - /** - * This method post processes the line, if there are error detection or - * correction codes in a line, they are generally processed by this method. - * The simplest version of this method looks for the (newline) character. - */ - protected void decodeLineSuffix(PushbackInputStream aStream, - OutputStream bStream) throws IOException { - } - - /** - * This method does an actual decode. It takes the decoded bytes and writes - * them to the OutputStream. The integer l tells the method how many - * bytes are required. This is always <= bytesPerAtom(). - */ - protected void decodeAtom(PushbackInputStream aStream, OutputStream bStream, - int l) throws IOException { - throw new CEStreamExhausted(); - } - - /** - * This method works around the bizarre semantics of BufferedInputStream's - * read method. - */ - protected int readFully(InputStream in, byte buffer[], int offset, int len) - throws java.io.IOException { - for (int i = 0; i < len; i++) { - int q = in.read(); - if (q == -1) - return ((i == 0) ? -1 : i); - buffer[i + offset] = (byte) q; - } - return len; - } - - /** - * Decode the text from the InputStream and write the decoded octets to the - * OutputStream. This method runs until the stream is exhausted. - * - * @exception CEFormatException - * An error has occured while decoding - * @exception CEStreamExhausted - * The input stream is unexpectedly out of data - */ - public void decodeBuffer(InputStream aStream, OutputStream bStream) - throws IOException { - int i; - int totalBytes = 0; - - PushbackInputStream ps = new PushbackInputStream(aStream); - decodeBufferPrefix(ps, bStream); - while (true) { - int length; - - try { - length = decodeLinePrefix(ps, bStream); - for (i = 0; (i + bytesPerAtom()) < length; i += bytesPerAtom()) { - decodeAtom(ps, bStream, bytesPerAtom()); - totalBytes += bytesPerAtom(); - } - if ((i + bytesPerAtom()) == length) { - decodeAtom(ps, bStream, bytesPerAtom()); - totalBytes += bytesPerAtom(); - } else { - decodeAtom(ps, bStream, length - i); - totalBytes += (length - i); - } - decodeLineSuffix(ps, bStream); - } catch (CEStreamExhausted e) { - break; - } - } - decodeBufferSuffix(ps, bStream); - } - - /** - * Alternate decode interface that takes a String containing the encoded - * buffer and returns a byte array containing the data. - * - * @exception CEFormatException - * An error has occured while decoding - */ - public byte decodeBuffer(String inputString)[] throws IOException { - byte inputBuffer[] = new byte[inputString.length()]; - ByteArrayInputStream inStream; - ByteArrayOutputStream outStream; - - inputString.getBytes(0, inputString.length(), inputBuffer, 0); - inStream = new ByteArrayInputStream(inputBuffer); - outStream = new ByteArrayOutputStream(); - decodeBuffer(inStream, outStream); - return (outStream.toByteArray()); - } - - /** - * Decode the contents of the inputstream into a buffer. - */ - public byte decodeBuffer(InputStream in)[] throws IOException { - ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - decodeBuffer(in, outStream); - return (outStream.toByteArray()); - } - - /** - * Decode the contents of the String into a ByteBuffer. - */ - public ByteBuffer decodeBufferToByteBuffer(String inputString) - throws IOException { - return ByteBuffer.wrap(decodeBuffer(inputString)); - } - - /** - * Decode the contents of the inputStream into a ByteBuffer. - */ - public ByteBuffer decodeBufferToByteBuffer(InputStream in) - throws IOException { - return ByteBuffer.wrap(decodeBuffer(in)); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java b/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java deleted file mode 100644 index 8df650e00b..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java +++ /dev/null @@ -1,340 +0,0 @@ -/* - * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import java.io.InputStream; -import java.io.ByteArrayInputStream; -import java.io.OutputStream; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.io.IOException; -import java.nio.ByteBuffer; - -/** - * This class defines the encoding half of character encoders. A character - * encoder is an algorithim for transforming 8 bit binary data into text - * (generally 7 bit ASCII or 8 bit ISO-Latin-1 text) for transmition over text - * channels such as e-mail and network news. - * - * The character encoders have been structured around a central theme that, in - * general, the encoded text has the form: - * - *
- *	[Buffer Prefix]
- *	[Line Prefix][encoded data atoms][Line Suffix]
- *	[Buffer Suffix]
- * 
- * - * In the CharacterEncoder and CharacterDecoder classes, one complete chunk of - * data is referred to as a buffer. Encoded buffers are all text, and - * decoded buffers (sometimes just referred to as buffers) are binary octets. - * - * To create a custom encoder, you must, at a minimum, overide three abstract - * methods in this class. - *
- *
bytesPerAtom which tells the encoder how many bytes to send to encodeAtom - *
encodeAtom which encodes the bytes sent to it as text. - *
bytesPerLine which tells the encoder the maximum number of bytes per - * line. - *
- * - * Several useful encoders have already been written and are referenced in the - * See Also list below. - * - * @version 1.38, 11/17/05 - * @author Chuck McManis - * @see CharacterDecoder; - * @see UCEncoder - * @see UUEncoder - * @see BASE64Encoder - */ -public abstract class CharacterEncoder { - - /** Stream that understands "printing" */ - protected PrintStream pStream; - - /** Return the number of bytes per atom of encoding */ - abstract protected int bytesPerAtom(); - - /** Return the number of bytes that can be encoded per line */ - abstract protected int bytesPerLine(); - - /** - * Encode the prefix for the entire buffer. By default is simply opens the - * PrintStream for use by the other functions. - */ - protected void encodeBufferPrefix(OutputStream aStream) throws IOException { - pStream = new PrintStream(aStream); - } - - /** - * Encode the suffix for the entire buffer. - */ - protected void encodeBufferSuffix(OutputStream aStream) throws IOException { - } - - /** - * Encode the prefix that starts every output line. - */ - protected void encodeLinePrefix(OutputStream aStream, int aLength) - throws IOException { - } - - /** - * Encode the suffix that ends every output line. By default this method just - * prints a into the output stream. - */ - protected void encodeLineSuffix(OutputStream aStream) throws IOException { - pStream.println(); - } - - /** Encode one "atom" of information into characters. */ - abstract protected void encodeAtom(OutputStream aStream, byte someBytes[], - int anOffset, int aLength) throws IOException; - - /** - * This method works around the bizarre semantics of BufferedInputStream's - * read method. - */ - protected int readFully(InputStream in, byte buffer[]) - throws java.io.IOException { - for (int i = 0; i < buffer.length; i++) { - int q = in.read(); - if (q == -1) - return i; - buffer[i] = (byte) q; - } - return buffer.length; - } - - /** - * Encode bytes from the input stream, and write them as text characters to - * the output stream. This method will run until it exhausts the input stream, - * but does not print the line suffix for a final line that is shorter than - * bytesPerLine(). - */ - public void encode(InputStream inStream, OutputStream outStream) - throws IOException { - int j; - int numBytes; - byte tmpbuffer[] = new byte[bytesPerLine()]; - - encodeBufferPrefix(outStream); - - while (true) { - numBytes = readFully(inStream, tmpbuffer); - if (numBytes == 0) { - break; - } - encodeLinePrefix(outStream, numBytes); - for (j = 0; j < numBytes; j += bytesPerAtom()) { - - if ((j + bytesPerAtom()) <= numBytes) { - encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); - } else { - encodeAtom(outStream, tmpbuffer, j, (numBytes) - j); - } - } - if (numBytes < bytesPerLine()) { - break; - } else { - encodeLineSuffix(outStream); - } - } - encodeBufferSuffix(outStream); - } - - /** - * Encode the buffer in aBuffer and write the encoded result to the - * OutputStream aStream. - */ - public void encode(byte aBuffer[], OutputStream aStream) throws IOException { - ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); - encode(inStream, aStream); - } - - /** - * A 'streamless' version of encode that simply takes a buffer of bytes and - * returns a string containing the encoded buffer. - */ - public String encode(byte aBuffer[]) { - ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); - String retVal = null; - try { - encode(inStream, outStream); - // explicit ascii->unicode conversion - retVal = outStream.toString("8859_1"); - } catch (Exception IOException) { - // This should never happen. - throw new Error("CharacterEncoder.encode internal error"); - } - return (retVal); - } - - /** - * Return a byte array from the remaining bytes in this ByteBuffer. - *

- * The ByteBuffer's position will be advanced to ByteBuffer's limit. - *

- * To avoid an extra copy, the implementation will attempt to return the byte - * array backing the ByteBuffer. If this is not possible, a new byte array - * will be created. - */ - private byte[] getBytes(ByteBuffer bb) { - /* - * This should never return a BufferOverflowException, as we're careful to - * allocate just the right amount. - */ - byte[] buf = null; - - /* - * If it has a usable backing byte buffer, use it. Use only if the array - * exactly represents the current ByteBuffer. - */ - if (bb.hasArray()) { - byte[] tmp = bb.array(); - if ((tmp.length == bb.capacity()) && (tmp.length == bb.remaining())) { - buf = tmp; - bb.position(bb.limit()); - } - } - - if (buf == null) { - /* - * This class doesn't have a concept of encode(buf, len, off), so if we - * have a partial buffer, we must reallocate space. - */ - buf = new byte[bb.remaining()]; - - /* - * position() automatically updated - */ - bb.get(buf); - } - - return buf; - } - - /** - * Encode the aBuffer ByteBuffer and write the encoded result to the - * OutputStream aStream. - *

- * The ByteBuffer's position will be advanced to ByteBuffer's limit. - */ - public void encode(ByteBuffer aBuffer, OutputStream aStream) - throws IOException { - byte[] buf = getBytes(aBuffer); - encode(buf, aStream); - } - - /** - * A 'streamless' version of encode that simply takes a ByteBuffer and returns - * a string containing the encoded buffer. - *

- * The ByteBuffer's position will be advanced to ByteBuffer's limit. - */ - public String encode(ByteBuffer aBuffer) { - byte[] buf = getBytes(aBuffer); - return encode(buf); - } - - /** - * Encode bytes from the input stream, and write them as text characters to - * the output stream. This method will run until it exhausts the input stream. - * It differs from encode in that it will add the line at the end of a final - * line that is shorter than bytesPerLine(). - */ - public void encodeBuffer(InputStream inStream, OutputStream outStream) - throws IOException { - int j; - int numBytes; - byte tmpbuffer[] = new byte[bytesPerLine()]; - - encodeBufferPrefix(outStream); - - while (true) { - numBytes = readFully(inStream, tmpbuffer); - if (numBytes == 0) { - break; - } - encodeLinePrefix(outStream, numBytes); - for (j = 0; j < numBytes; j += bytesPerAtom()) { - if ((j + bytesPerAtom()) <= numBytes) { - encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); - } else { - encodeAtom(outStream, tmpbuffer, j, (numBytes) - j); - } - } - encodeLineSuffix(outStream); - if (numBytes < bytesPerLine()) { - break; - } - } - encodeBufferSuffix(outStream); - } - - /** - * Encode the buffer in aBuffer and write the encoded result to the - * OutputStream aStream. - */ - public void encodeBuffer(byte aBuffer[], OutputStream aStream) - throws IOException { - ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); - encodeBuffer(inStream, aStream); - } - - /** - * A 'streamless' version of encode that simply takes a buffer of bytes and - * returns a string containing the encoded buffer. - */ - public String encodeBuffer(byte aBuffer[]) { - ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); - try { - encodeBuffer(inStream, outStream); - } catch (Exception IOException) { - // This should never happen. - throw new Error("CharacterEncoder.encodeBuffer internal error"); - } - return (outStream.toString()); - } - - /** - * Encode the aBuffer ByteBuffer and write the encoded result to the - * OutputStream aStream. - *

- * The ByteBuffer's position will be advanced to ByteBuffer's limit. - */ - public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream) - throws IOException { - byte[] buf = getBytes(aBuffer); - encodeBuffer(buf, aStream); - } - - /** - * A 'streamless' version of encode that simply takes a ByteBuffer and returns - * a string containing the encoded buffer. - *

- * The ByteBuffer's position will be advanced to ByteBuffer's limit. - */ - public String encodeBuffer(ByteBuffer aBuffer) { - byte[] buf = getBytes(aBuffer); - return encodeBuffer(buf); - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java b/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java deleted file mode 100644 index 248a1c04bf..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.util; - -import java.util.*; -import java.io.*; - -public class ConfigUtil { - public final static File PROPS_DIR = new File( - System.getProperty("TS_HOME", System.getProperty("ts.home")) - + File.separator + "src" + File.separator + "com" + File.separator - + "sun" + File.separator + "ts" + File.separator + "lib", - "harness"); - - public final static File SRC_DIR = new File( - System.getProperty("TS_HOME", System.getProperty("ts.home")), "src"); - - public final static String INTEROP_DIRECTION_PROP_FILE_NAME = "interop-direction.properties"; - - public static String[] getMappingValue(Properties mapping, String[] keys, - String relativePath) { - String forwardSlashRelativePath = relativePath.replace(File.separator, "/"); - - for (int i = keys.length - 1; i >= 0; i--) { // must traverse in reverse - // order. - if (forwardSlashRelativePath.startsWith(keys[i])) { - return stringToArray(mapping.getProperty(keys[i])); - } - } - return TestUtil.EMPTY_STRING_ARRAY; - } - - public static String[] loadKeysFrom(Properties mapping) { - String[] keys = null; - if (mapping != null) { - keys = new String[mapping.size()]; - int i = 0; - for (Enumeration enum1 = mapping.keys(); enum1.hasMoreElements(); i++) { - keys[i] = (String) enum1.nextElement(); - } - Arrays.sort(keys); - } - return keys; - } - - public static String[] stringToArray(String s) { - if (s == null) { - return TestUtil.EMPTY_STRING_ARRAY; - } - StringTokenizer st = new StringTokenizer(s, " ,;\t\r\n\f"); - int tokenCount = st.countTokens(); - if (tokenCount == 0) { - return TestUtil.EMPTY_STRING_ARRAY; - } - String[] result = new String[tokenCount]; - for (int i = 0; st.hasMoreTokens(); i++) { - result[i] = st.nextToken(); - } - return result; - } - - public static Properties loadPropertiesFor(String propFileName) { - File propFile; - - // always load vehicle.properties from under src - if (propFileName.equals("vehicle.properties")) { - propFile = new File(SRC_DIR, propFileName); - } else { - propFile = new File(PROPS_DIR, propFileName); - } - - Properties props = null; - String propPath = propFile.getPath(); - if (propFile.exists()) { - props = new Properties(); - try { - System.out.println("Loading " + propPath); - props.load(new FileInputStream(propFile)); - } catch (IOException ioe) { - ioe.printStackTrace(); - } - } - return props; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java b/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java deleted file mode 100644 index b15ed32ffb..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -/** - * This class contains additional constants documenting limits of the - * double type. - * - * @author Joseph D. Darcy - */ - -public class DoubleConsts { - /** - * Don't let anyone instantiate this class. - */ - private DoubleConsts() { - } - - public static final double POSITIVE_INFINITY = java.lang.Double.POSITIVE_INFINITY; - - public static final double NEGATIVE_INFINITY = java.lang.Double.NEGATIVE_INFINITY; - - public static final double NaN = java.lang.Double.NaN; - - public static final double MAX_VALUE = java.lang.Double.MAX_VALUE; - - public static final double MIN_VALUE = java.lang.Double.MIN_VALUE; - - /** - * A constant holding the smallest positive normal value of type - * double, 2-1022. It is equal to the value returned - * by Double.longBitsToDouble(0x0010000000000000L). - * - * @since 1.5 - */ - public static final double MIN_NORMAL = 2.2250738585072014E-308; - - /** - * The number of logical bits in the significand of a double - * number, including the implicit bit. - */ - public static final int SIGNIFICAND_WIDTH = 53; - - /** - * Maximum exponent a finite double number may have. It is equal - * to the value returned by Math.ilogb(Double.MAX_VALUE). - */ - public static final int MAX_EXPONENT = 1023; - - /** - * Minimum exponent a normalized double number may have. It is - * equal to the value returned by Math.ilogb(Double.MIN_NORMAL). - */ - public static final int MIN_EXPONENT = -1022; - - /** - * The exponent the smallest positive double subnormal value - * would have if it could be normalized. It is equal to the value returned by - * FpUtils.ilogb(Double.MIN_VALUE). - */ - public static final int MIN_SUB_EXPONENT = MIN_EXPONENT - - (SIGNIFICAND_WIDTH - 1); - - /** - * Bias used in representing a double exponent. - */ - public static final int EXP_BIAS = 1023; - - /** - * Bit mask to isolate the sign bit of a double. - */ - public static final long SIGN_BIT_MASK = 0x8000000000000000L; - - /** - * Bit mask to isolate the exponent field of a double. - */ - public static final long EXP_BIT_MASK = 0x7FF0000000000000L; - - /** - * Bit mask to isolate the significand field of a double. - */ - public static final long SIGNIF_BIT_MASK = 0x000FFFFFFFFFFFFFL; - - static { - // verify bit masks cover all bit positions and that the bit - // masks are non-overlapping - assert (((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0L) - && (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0L) - && ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0L) - && ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0L))); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java b/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java deleted file mode 100644 index 4ce9b158c8..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -/** - * This class contains additional constants documenting limits of the - * float type. - * - * @author Joseph D. Darcy - */ - -public class FloatConsts { - /** - * Don't let anyone instantiate this class. - */ - private FloatConsts() { - } - - public static final float POSITIVE_INFINITY = java.lang.Float.POSITIVE_INFINITY; - - public static final float NEGATIVE_INFINITY = java.lang.Float.NEGATIVE_INFINITY; - - public static final float NaN = java.lang.Float.NaN; - - public static final float MAX_VALUE = java.lang.Float.MAX_VALUE; - - public static final float MIN_VALUE = java.lang.Float.MIN_VALUE; - - /** - * A constant holding the smallest positive normal value of type - * float, 2-126. It is equal to the value returned by - * Float.intBitsToFloat(0x00800000). - */ - public static final float MIN_NORMAL = 1.17549435E-38f; - - /** - * The number of logical bits in the significand of a float - * number, including the implicit bit. - */ - public static final int SIGNIFICAND_WIDTH = 24; - - /** - * Maximum exponent a finite float number may have. It is equal - * to the value returned by Math.ilogb(Float.MAX_VALUE). - */ - public static final int MAX_EXPONENT = 127; - - /** - * Minimum exponent a normalized float number may have. It is - * equal to the value returned by Math.ilogb(Float.MIN_NORMAL). - */ - public static final int MIN_EXPONENT = -126; - - /** - * The exponent the smallest positive float subnormal value would - * have if it could be normalized. It is equal to the value returned by - * FpUtils.ilogb(Float.MIN_VALUE). - */ - public static final int MIN_SUB_EXPONENT = MIN_EXPONENT - - (SIGNIFICAND_WIDTH - 1); - - /** - * Bias used in representing a float exponent. - */ - public static final int EXP_BIAS = 127; - - /** - * Bit mask to isolate the sign bit of a float. - */ - public static final int SIGN_BIT_MASK = 0x80000000; - - /** - * Bit mask to isolate the exponent field of a float. - */ - public static final int EXP_BIT_MASK = 0x7F800000; - - /** - * Bit mask to isolate the significand field of a float. - */ - public static final int SIGNIF_BIT_MASK = 0x007FFFFF; - - static { - // verify bit masks cover all bit positions and that the bit - // masks are non-overlapping - assert (((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0) - && (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0) - && ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0) - && ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0))); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java b/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java deleted file mode 100644 index e7b8c9873a..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java +++ /dev/null @@ -1,1166 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util; - -import com.sun.ts.lib.util.FloatConsts; -import com.sun.ts.lib.util.DoubleConsts; - -/** - * The class {@code FpUtils} contains static utility methods for manipulating - * and inspecting {@code float} and {@code double} floating-point numbers. These - * methods include functionality recommended or required by the IEEE 754 - * floating-point standard. - * - * @author Joseph D. Darcy - */ - -public class FpUtils { - /* - * The methods in this class are reasonably implemented using direct or - * indirect bit-level manipulation of floating-point values. However, having - * access to the IEEE 754 recommended functions would obviate the need for - * most programmers to engage in floating-point bit-twiddling. - * - * An IEEE 754 number has three fields, from most significant bit to to least - * significant, sign, exponent, and significand. - * - * msb lsb [sign|exponent| fractional_significand] - * - * Using some encoding cleverness, explained below, the high order bit of the - * logical significand does not need to be explicitly stored, thus - * "fractional_significand" instead of simply "significand" in the figure - * above. - * - * For finite normal numbers, the numerical value encoded is - * - * (-1)^sign * 2^(exponent)*(1.fractional_significand) - * - * Most finite floating-point numbers are normalized; the exponent value is - * reduced until the leading significand bit is 1. Therefore, the leading 1 is - * redundant and is not explicitly stored. If a numerical value is so small it - * cannot be normalized, it has a subnormal representation. Subnormal numbers - * don't have a leading 1 in their significand; subnormals are encoding using - * a special exponent value. In other words, the high-order bit of the logical - * significand can be elided in from the representation in either case since - * the bit's value is implicit from the exponent value. - * - * The exponent field uses a biased representation; if the bits of the - * exponent are interpreted as a unsigned integer E, the exponent represented - * is E - E_bias where E_bias depends on the floating-point format. E can - * range between E_min and E_max, constants which depend on the floating-point - * format. E_min and E_max are -126 and +127 for float, -1022 and +1023 for - * double. - * - * The 32-bit float format has 1 sign bit, 8 exponent bits, and 23 bits for - * the significand (which is logically 24 bits wide because of the implicit - * bit). The 64-bit double format has 1 sign bit, 11 exponent bits, and 52 - * bits for the significand (logically 53 bits). - * - * Subnormal numbers and zero have the special exponent value E_min -1; the - * numerical value represented by a subnormal is: - * - * (-1)^sign * 2^(E_min)*(0.fractional_significand) - * - * Zero is represented by all zero bits in the exponent and all zero bits in - * the significand; zero can have either sign. - * - * Infinity and NaN are encoded using the exponent value E_max + 1. Signed - * infinities have all significand bits zero; NaNs have at least one non-zero - * significand bit. - * - * The details of IEEE 754 floating-point encoding will be used in the methods - * below without further comment. For further exposition on IEEE 754 numbers, - * see "IEEE Standard for Binary Floating-Point Arithmetic" ANSI/IEEE Std - * 754-1985 or William Kahan's "Lecture Notes on the Status of IEEE Standard - * 754 for Binary Floating-Point Arithmetic", - * http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps. - * - * Many of this class's methods are members of the set of IEEE 754 recommended - * functions or similar functions recommended or required by IEEE 754R. - * Discussion of various implementation techniques for these functions have - * occurred in: - * - * W.J. Cody and Jerome T. Coonen, "Algorithm 772 Functions to Support the - * IEEE Standard for Binary Floating-Point Arithmetic," ACM Transactions on - * Mathematical Software, vol. 19, no. 4, December 1993, pp. 443-451. - * - * Joseph D. Darcy, "Writing robust IEEE recommended functions in ``100% Pure - * Java''(TM)," University of California, Berkeley technical report - * UCB//CSD-98-1009. - */ - - /** - * Don't let anyone instantiate this class. - */ - private FpUtils() { - } - - // Constants used in scalb - static double twoToTheDoubleScaleUp = powerOfTwoD(512); - - static double twoToTheDoubleScaleDown = powerOfTwoD(-512); - - // Helper Methods - - // The following helper methods are used in the implementation of - // the public recommended functions; they generally omit certain - // tests for exception cases. - - /** - * Returns unbiased exponent of a {@code double}. - */ - public static int getExponent(double d) { - /* - * Bitwise convert d to long, mask out exponent bits, shift to the right and - * then subtract out double's bias adjust to get true exponent value. - */ - return (int) (((Double.doubleToRawLongBits(d) - & DoubleConsts.EXP_BIT_MASK) >> (DoubleConsts.SIGNIFICAND_WIDTH - 1)) - - DoubleConsts.EXP_BIAS); - } - - /** - * Returns unbiased exponent of a {@code float}. - */ - public static int getExponent(float f) { - /* - * Bitwise convert f to integer, mask out exponent bits, shift to the right - * and then subtract out float's bias adjust to get true exponent value - */ - return ((Float.floatToRawIntBits(f) - & FloatConsts.EXP_BIT_MASK) >> (FloatConsts.SIGNIFICAND_WIDTH - 1)) - - FloatConsts.EXP_BIAS; - } - - /** - * Returns a floating-point power of two in the normal range. - */ - static double powerOfTwoD(int n) { - assert (n >= DoubleConsts.MIN_EXPONENT && n <= DoubleConsts.MAX_EXPONENT); - return Double.longBitsToDouble((((long) n - + (long) DoubleConsts.EXP_BIAS) << (DoubleConsts.SIGNIFICAND_WIDTH - 1)) - & DoubleConsts.EXP_BIT_MASK); - } - - /** - * Returns a floating-point power of two in the normal range. - */ - static float powerOfTwoF(int n) { - assert (n >= FloatConsts.MIN_EXPONENT && n <= FloatConsts.MAX_EXPONENT); - return Float.intBitsToFloat( - ((n + FloatConsts.EXP_BIAS) << (FloatConsts.SIGNIFICAND_WIDTH - 1)) - & FloatConsts.EXP_BIT_MASK); - } - - /** - * Returns the first floating-point argument with the sign of the second - * floating-point argument. Note that unlike the - * {@link FpUtils#copySign(double, double) copySign} method, this method does - * not require NaN {@code sign} arguments to be treated as positive values; - * implementations are permitted to treat some NaN arguments as positive and - * other NaN arguments as negative to allow greater performance. - * - * @param magnitude - * the parameter providing the magnitude of the result - * @param sign - * the parameter providing the sign of the result - * @return a value with the magnitude of {@code magnitude} and the sign of - * {@code sign}. - * @author Joseph D. Darcy - */ - public static double rawCopySign(double magnitude, double sign) { - return Double.longBitsToDouble( - (Double.doubleToRawLongBits(sign) & (DoubleConsts.SIGN_BIT_MASK)) - | (Double.doubleToRawLongBits(magnitude) - & (DoubleConsts.EXP_BIT_MASK | DoubleConsts.SIGNIF_BIT_MASK))); - } - - /** - * Returns the first floating-point argument with the sign of the second - * floating-point argument. Note that unlike the - * {@link FpUtils#copySign(float, float) copySign} method, this method does - * not require NaN {@code sign} arguments to be treated as positive values; - * implementations are permitted to treat some NaN arguments as positive and - * other NaN arguments as negative to allow greater performance. - * - * @param magnitude - * the parameter providing the magnitude of the result - * @param sign - * the parameter providing the sign of the result - * @return a value with the magnitude of {@code magnitude} and the sign of - * {@code sign}. - * @author Joseph D. Darcy - */ - public static float rawCopySign(float magnitude, float sign) { - return Float.intBitsToFloat( - (Float.floatToRawIntBits(sign) & (FloatConsts.SIGN_BIT_MASK)) - | (Float.floatToRawIntBits(magnitude) - & (FloatConsts.EXP_BIT_MASK | FloatConsts.SIGNIF_BIT_MASK))); - } - - /* ***************************************************************** */ - - /** - * Returns {@code true} if the argument is a finite floating-point value; - * returns {@code false} otherwise (for NaN and infinity arguments). - * - * @param d - * the {@code double} value to be tested - * @return {@code true} if the argument is a finite floating-point value, - * {@code false} otherwise. - */ - public static boolean isFinite(double d) { - return Math.abs(d) <= DoubleConsts.MAX_VALUE; - } - - /** - * Returns {@code true} if the argument is a finite floating-point value; - * returns {@code false} otherwise (for NaN and infinity arguments). - * - * @param f - * the {@code float} value to be tested - * @return {@code true} if the argument is a finite floating-point value, - * {@code false} otherwise. - */ - public static boolean isFinite(float f) { - return Math.abs(f) <= FloatConsts.MAX_VALUE; - } - - /** - * Returns {@code true} if the specified number is infinitely large in - * magnitude, {@code false} otherwise. - * - *

- * Note that this method is equivalent to the {@link Double#isInfinite(double) - * Double.isInfinite} method; the functionality is included in this class for - * convenience. - * - * @param d - * the value to be tested. - * @return {@code true} if the value of the argument is positive infinity or - * negative infinity; {@code false} otherwise. - */ - public static boolean isInfinite(double d) { - return Double.isInfinite(d); - } - - /** - * Returns {@code true} if the specified number is infinitely large in - * magnitude, {@code false} otherwise. - * - *

- * Note that this method is equivalent to the {@link Float#isInfinite(float) - * Float.isInfinite} method; the functionality is included in this class for - * convenience. - * - * @param f - * the value to be tested. - * @return {@code true} if the argument is positive infinity or negative - * infinity; {@code false} otherwise. - */ - public static boolean isInfinite(float f) { - return Float.isInfinite(f); - } - - /** - * Returns {@code true} if the specified number is a Not-a-Number (NaN) value, - * {@code false} otherwise. - * - *

- * Note that this method is equivalent to the {@link Double#isNaN(double) - * Double.isNaN} method; the functionality is included in this class for - * convenience. - * - * @param d - * the value to be tested. - * @return {@code true} if the value of the argument is NaN; {@code false} - * otherwise. - */ - public static boolean isNaN(double d) { - return Double.isNaN(d); - } - - /** - * Returns {@code true} if the specified number is a Not-a-Number (NaN) value, - * {@code false} otherwise. - * - *

- * Note that this method is equivalent to the {@link Float#isNaN(float) - * Float.isNaN} method; the functionality is included in this class for - * convenience. - * - * @param f - * the value to be tested. - * @return {@code true} if the argument is NaN; {@code false} otherwise. - */ - public static boolean isNaN(float f) { - return Float.isNaN(f); - } - - /** - * Returns {@code true} if the unordered relation holds between the two - * arguments. When two floating-point values are unordered, one value is - * neither less than, equal to, nor greater than the other. For the unordered - * relation to be true, at least one argument must be a {@code NaN}. - * - * @param arg1 - * the first argument - * @param arg2 - * the second argument - * @return {@code true} if at least one argument is a NaN, {@code false} - * otherwise. - */ - public static boolean isUnordered(double arg1, double arg2) { - return isNaN(arg1) || isNaN(arg2); - } - - /** - * Returns {@code true} if the unordered relation holds between the two - * arguments. When two floating-point values are unordered, one value is - * neither less than, equal to, nor greater than the other. For the unordered - * relation to be true, at least one argument must be a {@code NaN}. - * - * @param arg1 - * the first argument - * @param arg2 - * the second argument - * @return {@code true} if at least one argument is a NaN, {@code false} - * otherwise. - */ - public static boolean isUnordered(float arg1, float arg2) { - return isNaN(arg1) || isNaN(arg2); - } - - /** - * Returns unbiased exponent of a {@code double}; for subnormal values, the - * number is treated as if it were normalized. That is for all finite, - * non-zero, positive numbers x, - * scalb(x, -ilogb(x)) is always in the range [1, - * 2). - *

- * Special cases: - *

    - *
  • If the argument is NaN, then the result is 230. - *
  • If the argument is infinite, then the result is 228. - *
  • If the argument is zero, then the result is -(228). - *
- * - * @param d - * floating-point number whose exponent is to be extracted - * @return unbiased exponent of the argument. - * @author Joseph D. Darcy - */ - public static int ilogb(double d) { - int exponent = getExponent(d); - - switch (exponent) { - case DoubleConsts.MAX_EXPONENT + 1: // NaN or infinity - if (isNaN(d)) - return (1 << 30); // 2^30 - else // infinite value - return (1 << 28); // 2^28 - - case DoubleConsts.MIN_EXPONENT - 1: // zero or subnormal - if (d == 0.0) { - return -(1 << 28); // -(2^28) - } else { - long transducer = Double.doubleToRawLongBits(d); - - /* - * To avoid causing slow arithmetic on subnormals, the scaling to - * determine when d's significand is normalized is done in integer - * arithmetic. (there must be at least one "1" bit in the significand - * since zero has been screened out. - */ - - // isolate significand bits - transducer &= DoubleConsts.SIGNIF_BIT_MASK; - assert (transducer != 0L); - - // This loop is simple and functional. We might be - // able to do something more clever that was faster; - // e.g. number of leading zero detection on - // (transducer << (# exponent and sign bits). - while (transducer < (1L << (DoubleConsts.SIGNIFICAND_WIDTH - 1))) { - transducer *= 2; - exponent--; - } - exponent++; - assert (exponent >= DoubleConsts.MIN_EXPONENT - - (DoubleConsts.SIGNIFICAND_WIDTH - 1) - && exponent < DoubleConsts.MIN_EXPONENT); - return exponent; - } - - default: - assert (exponent >= DoubleConsts.MIN_EXPONENT - && exponent <= DoubleConsts.MAX_EXPONENT); - return exponent; - } - } - - /** - * Returns unbiased exponent of a {@code float}; for subnormal values, the - * number is treated as if it were normalized. That is for all finite, - * non-zero, positive numbers x, - * scalb(x, -ilogb(x)) is always in the range [1, - * 2). - *

- * Special cases: - *

    - *
  • If the argument is NaN, then the result is 230. - *
  • If the argument is infinite, then the result is 228. - *
  • If the argument is zero, then the result is -(228). - *
- * - * @param f - * floating-point number whose exponent is to be extracted - * @return unbiased exponent of the argument. - * @author Joseph D. Darcy - */ - public static int ilogb(float f) { - int exponent = getExponent(f); - - switch (exponent) { - case FloatConsts.MAX_EXPONENT + 1: // NaN or infinity - if (isNaN(f)) - return (1 << 30); // 2^30 - else // infinite value - return (1 << 28); // 2^28 - - case FloatConsts.MIN_EXPONENT - 1: // zero or subnormal - if (f == 0.0f) { - return -(1 << 28); // -(2^28) - } else { - int transducer = Float.floatToRawIntBits(f); - - /* - * To avoid causing slow arithmetic on subnormals, the scaling to - * determine when f's significand is normalized is done in integer - * arithmetic. (there must be at least one "1" bit in the significand - * since zero has been screened out. - */ - - // isolate significand bits - transducer &= FloatConsts.SIGNIF_BIT_MASK; - assert (transducer != 0); - - // This loop is simple and functional. We might be - // able to do something more clever that was faster; - // e.g. number of leading zero detection on - // (transducer << (# exponent and sign bits). - while (transducer < (1 << (FloatConsts.SIGNIFICAND_WIDTH - 1))) { - transducer *= 2; - exponent--; - } - exponent++; - assert (exponent >= FloatConsts.MIN_EXPONENT - - (FloatConsts.SIGNIFICAND_WIDTH - 1) - && exponent < FloatConsts.MIN_EXPONENT); - return exponent; - } - - default: - assert (exponent >= FloatConsts.MIN_EXPONENT - && exponent <= FloatConsts.MAX_EXPONENT); - return exponent; - } - } - - /* - * The scalb operation should be reasonably fast; however, there are tradeoffs - * in writing a method to minimize the worst case performance and writing a - * method to minimize the time for expected common inputs. Some processors - * operate very slowly on subnormal operands, taking hundreds or thousands of - * cycles for one floating-point add or multiply as opposed to, say, four - * cycles for normal operands. For processors with very slow subnormal - * execution, scalb would be fastest if written entirely with integer - * operations; in other words, scalb would need to include the logic of - * performing correct rounding of subnormal values. This could be reasonably - * done in at most a few hundred cycles. However, this approach may penalize - * normal operations since at least the exponent of the floating-point - * argument must be examined. - * - * The approach taken in this implementation is a compromise. Floating-point - * multiplication is used to do most of the work; but knowingly multiplying by - * a subnormal scaling factor is avoided. However, the floating-point argument - * is not examined to see whether or not it is subnormal since subnormal - * inputs are assumed to be rare. At most three multiplies are needed to scale - * from the largest to smallest exponent ranges (scaling down, at most two - * multiplies are needed if subnormal scaling factors are allowed). However, - * in this implementation an expensive integer remainder operation is avoided - * at the cost of requiring five floating-point multiplies in the worst case, - * which should still be a performance win. - * - * If scaling of entire arrays is a concern, it would probably be more - * efficient to provide a double[] scalb(double[], int) version of scalb to - * avoid having to recompute the needed scaling factors for each - * floating-point value. - */ - - /** - * Return {@code d} × 2{@code scale_factor} rounded as if - * performed by a single correctly rounded floating-point multiply to a member - * of the double value set. See section 4.2.3 of The Java™ - * Language Specification for a discussion of floating-point value - * sets. If the exponent of the result is between the {@code double}'s minimum - * exponent and maximum exponent, the answer is calculated exactly. If the - * exponent of the result would be larger than {@code doubles}'s maximum - * exponent, an infinity is returned. Note that if the result is subnormal, - * precision may be lost; that is, when {@code scalb(x, - * n)} is subnormal, {@code scalb(scalb(x, n), -n)} may not equal x. - * When the result is non-NaN, the result has the same sign as {@code d}. - * - *

- * Special cases: - *

    - *
  • If the first argument is NaN, NaN is returned. - *
  • If the first argument is infinite, then an infinity of the same sign is - * returned. - *
  • If the first argument is zero, then a zero of the same sign is - * returned. - *
- * - * @param d - * number to be scaled by a power of two. - * @param scale_factor - * power of 2 used to scale {@code d} - * @return {@code d * }2{@code scale_factor} - * @author Joseph D. Darcy - */ - public static double scalb(double d, int scale_factor) { - /* - * This method does not need to be declared strictfp to compute the same - * correct result on all platforms. When scaling up, it does not matter what - * order the multiply-store operations are done; the result will be finite - * or overflow regardless of the operation ordering. However, to get the - * correct result when scaling down, a particular ordering must be used. - * - * When scaling down, the multiply-store operations are sequenced so that it - * is not possible for two consecutive multiply-stores to return subnormal - * results. If one multiply-store result is subnormal, the next multiply - * will round it away to zero. This is done by first multiplying by 2 ^ - * (scale_factor % n) and then multiplying several times by by 2^n as needed - * where n is the exponent of number that is a covenient power of two. In - * this way, at most one real rounding error occurs. If the double value set - * is being used exclusively, the rounding will occur on a multiply. If the - * double-extended-exponent value set is being used, the products will - * (perhaps) be exact but the stores to d are guaranteed to round to the - * double value set. - * - * It is _not_ a valid implementation to first multiply d by 2^MIN_EXPONENT - * and then by 2 ^ (scale_factor % MIN_EXPONENT) since even in a strictfp - * program double rounding on underflow could occur; e.g. if the - * scale_factor argument was (MIN_EXPONENT - n) and the exponent of d was a - * little less than -(MIN_EXPONENT - n), meaning the final result would be - * subnormal. - * - * Since exact reproducibility of this method can be achieved without any - * undue performance burden, there is no compelling reason to allow double - * rounding on underflow in scalb. - */ - - // magnitude of a power of two so large that scaling a finite - // nonzero value by it would be guaranteed to over or - // underflow; due to rounding, scaling down takes takes an - // additional power of two which is reflected here - final int MAX_SCALE = DoubleConsts.MAX_EXPONENT + -DoubleConsts.MIN_EXPONENT - + DoubleConsts.SIGNIFICAND_WIDTH + 1; - int exp_adjust = 0; - int scale_increment = 0; - double exp_delta = Double.NaN; - - // Make sure scaling factor is in a reasonable range - - if (scale_factor < 0) { - scale_factor = Math.max(scale_factor, -MAX_SCALE); - scale_increment = -512; - exp_delta = twoToTheDoubleScaleDown; - } else { - scale_factor = Math.min(scale_factor, MAX_SCALE); - scale_increment = 512; - exp_delta = twoToTheDoubleScaleUp; - } - - // Calculate (scale_factor % +/-512), 512 = 2^9, using - // technique from "Hacker's Delight" section 10-2. - int t = (scale_factor >> 9 - 1) >>> 32 - 9; - exp_adjust = ((scale_factor + t) & (512 - 1)) - t; - - d *= powerOfTwoD(exp_adjust); - scale_factor -= exp_adjust; - - while (scale_factor != 0) { - d *= exp_delta; - scale_factor -= scale_increment; - } - return d; - } - - /** - * Return {@code f} × 2{@code scale_factor} rounded as if - * performed by a single correctly rounded floating-point multiply to a member - * of the float value set. See section 4.2.3 of The Java™ Language - * Specification for a discussion of floating-point value sets. If the - * exponent of the result is between the {@code float}'s minimum exponent and - * maximum exponent, the answer is calculated exactly. If the exponent of the - * result would be larger than {@code float}'s maximum exponent, an infinity - * is returned. Note that if the result is subnormal, precision may be lost; - * that is, when {@code scalb(x, n)} is subnormal, - * {@code scalb(scalb(x, n), -n)} may not equal x. When the result is - * non-NaN, the result has the same sign as {@code f}. - * - *

- * Special cases: - *

    - *
  • If the first argument is NaN, NaN is returned. - *
  • If the first argument is infinite, then an infinity of the same sign is - * returned. - *
  • If the first argument is zero, then a zero of the same sign is - * returned. - *
- * - * @param f - * number to be scaled by a power of two. - * @param scale_factor - * power of 2 used to scale {@code f} - * @return {@code f * }2{@code scale_factor} - * @author Joseph D. Darcy - */ - public static float scalb(float f, int scale_factor) { - // magnitude of a power of two so large that scaling a finite - // nonzero value by it would be guaranteed to over or - // underflow; due to rounding, scaling down takes takes an - // additional power of two which is reflected here - final int MAX_SCALE = FloatConsts.MAX_EXPONENT + -FloatConsts.MIN_EXPONENT - + FloatConsts.SIGNIFICAND_WIDTH + 1; - - // Make sure scaling factor is in a reasonable range - scale_factor = Math.max(Math.min(scale_factor, MAX_SCALE), -MAX_SCALE); - - /* - * Since + MAX_SCALE for float fits well within the double exponent range - * and + float -> double conversion is exact the multiplication below will - * be exact. Therefore, the rounding that occurs when the double product is - * cast to float will be the correctly rounded float result. Since all - * operations other than the final multiply will be exact, it is not - * necessary to declare this method strictfp. - */ - return (float) ((double) f * powerOfTwoD(scale_factor)); - } - - /** - * Returns the floating-point number adjacent to the first argument in the - * direction of the second argument. If both arguments compare as equal the - * second argument is returned. - * - *

- * Special cases: - *

    - *
  • If either argument is a NaN, then NaN is returned. - * - *
  • If both arguments are signed zeros, {@code direction} is returned - * unchanged (as implied by the requirement of returning the second argument - * if the arguments compare as equal). - * - *
  • If {@code start} is ±{@code Double.MIN_VALUE} and - * {@code direction} has a value such that the result should have a smaller - * magnitude, then a zero with the same sign as {@code start} is returned. - * - *
  • If {@code start} is infinite and {@code direction} has a value such - * that the result should have a smaller magnitude, {@code Double.MAX_VALUE} - * with the same sign as {@code start} is returned. - * - *
  • If {@code start} is equal to ± {@code Double.MAX_VALUE} and - * {@code direction} has a value such that the result should have a larger - * magnitude, an infinity with same sign as {@code start} is returned. - *
- * - * @param start - * starting floating-point value - * @param direction - * value indicating which of {@code start}'s neighbors or - * {@code start} should be returned - * @return The floating-point number adjacent to {@code start} in the - * direction of {@code direction}. - * @author Joseph D. Darcy - */ - public static double nextAfter(double start, double direction) { - /* - * The cases: - * - * nextAfter(+infinity, 0) == MAX_VALUE nextAfter(+infinity, +infinity) == - * +infinity nextAfter(-infinity, 0) == -MAX_VALUE nextAfter(-infinity, - * -infinity) == -infinity - * - * are naturally handled without any additional testing - */ - - // First check for NaN values - if (isNaN(start) || isNaN(direction)) { - // return a NaN derived from the input NaN(s) - return start + direction; - } else if (start == direction) { - return direction; - } else { // start > direction or start < direction - // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0) - // then bitwise convert start to integer. - long transducer = Double.doubleToRawLongBits(start + 0.0d); - - /* - * IEEE 754 floating-point numbers are lexicographically ordered if - * treated as signed- magnitude integers . Since Java's integers are two's - * complement, incrementing" the two's complement representation of a - * logically negative floating-point value *decrements* the - * signed-magnitude representation. Therefore, when the integer - * representation of a floating-point values is less than zero, the - * adjustment to the representation is in the opposite direction than - * would be expected at first . - */ - if (direction > start) { // Calculate next greater value - transducer = transducer + (transducer >= 0L ? 1L : -1L); - } else { // Calculate next lesser value - assert direction < start; - if (transducer > 0L) - --transducer; - else if (transducer < 0L) - ++transducer; - /* - * transducer==0, the result is -MIN_VALUE - * - * The transition from zero (implicitly positive) to the smallest - * negative signed magnitude value must be done explicitly. - */ - else - transducer = DoubleConsts.SIGN_BIT_MASK | 1L; - } - - return Double.longBitsToDouble(transducer); - } - } - - /** - * Returns the floating-point number adjacent to the first argument in the - * direction of the second argument. If both arguments compare as equal, the - * second argument is returned. - * - *

- * Special cases: - *

    - *
  • If either argument is a NaN, then NaN is returned. - * - *
  • If both arguments are signed zeros, a {@code float} zero with the same - * sign as {@code direction} is returned (as implied by the requirement of - * returning the second argument if the arguments compare as equal). - * - *
  • If {@code start} is ±{@code Float.MIN_VALUE} and - * {@code direction} has a value such that the result should have a smaller - * magnitude, then a zero with the same sign as {@code start} is returned. - * - *
  • If {@code start} is infinite and {@code direction} has a value such - * that the result should have a smaller magnitude, {@code Float.MAX_VALUE} - * with the same sign as {@code start} is returned. - * - *
  • If {@code start} is equal to ± {@code Float.MAX_VALUE} and - * {@code direction} has a value such that the result should have a larger - * magnitude, an infinity with same sign as {@code start} is returned. - *
- * - * @param start - * starting floating-point value - * @param direction - * value indicating which of {@code start}'s neighbors or - * {@code start} should be returned - * @return The floating-point number adjacent to {@code start} in the - * direction of {@code direction}. - * @author Joseph D. Darcy - */ - public static float nextAfter(float start, double direction) { - /* - * The cases: - * - * nextAfter(+infinity, 0) == MAX_VALUE nextAfter(+infinity, +infinity) == - * +infinity nextAfter(-infinity, 0) == -MAX_VALUE nextAfter(-infinity, - * -infinity) == -infinity - * - * are naturally handled without any additional testing - */ - - // First check for NaN values - if (isNaN(start) || isNaN(direction)) { - // return a NaN derived from the input NaN(s) - return start + (float) direction; - } else if (start == direction) { - return (float) direction; - } else { // start > direction or start < direction - // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0) - // then bitwise convert start to integer. - int transducer = Float.floatToRawIntBits(start + 0.0f); - - /* - * IEEE 754 floating-point numbers are lexicographically ordered if - * treated as signed- magnitude integers . Since Java's integers are two's - * complement, incrementing" the two's complement representation of a - * logically negative floating-point value *decrements* the - * signed-magnitude representation. Therefore, when the integer - * representation of a floating-point values is less than zero, the - * adjustment to the representation is in the opposite direction than - * would be expected at first. - */ - if (direction > start) {// Calculate next greater value - transducer = transducer + (transducer >= 0 ? 1 : -1); - } else { // Calculate next lesser value - assert direction < start; - if (transducer > 0) - --transducer; - else if (transducer < 0) - ++transducer; - /* - * transducer==0, the result is -MIN_VALUE - * - * The transition from zero (implicitly positive) to the smallest - * negative signed magnitude value must be done explicitly. - */ - else - transducer = FloatConsts.SIGN_BIT_MASK | 1; - } - - return Float.intBitsToFloat(transducer); - } - } - - /** - * Returns the floating-point value adjacent to {@code d} in the direction of - * positive infinity. This method is semantically equivalent to - * {@code nextAfter(d, - * Double.POSITIVE_INFINITY)}; however, a {@code nextUp} implementation may - * run faster than its equivalent {@code nextAfter} call. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, the result is NaN. - * - *
  • If the argument is positive infinity, the result is positive infinity. - * - *
  • If the argument is zero, the result is {@code Double.MIN_VALUE} - * - *
- * - * @param d - * starting floating-point value - * @return The adjacent floating-point value closer to positive infinity. - * @author Joseph D. Darcy - */ - public static double nextUp(double d) { - if (isNaN(d) || d == Double.POSITIVE_INFINITY) - return d; - else { - d += 0.0d; - return Double.longBitsToDouble( - Double.doubleToRawLongBits(d) + ((d >= 0.0d) ? +1L : -1L)); - } - } - - /** - * Returns the floating-point value adjacent to {@code f} in the direction of - * positive infinity. This method is semantically equivalent to - * {@code nextAfter(f, - * Double.POSITIVE_INFINITY)}; however, a {@code nextUp} implementation may - * run faster than its equivalent {@code nextAfter} call. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, the result is NaN. - * - *
  • If the argument is positive infinity, the result is positive infinity. - * - *
  • If the argument is zero, the result is {@code Float.MIN_VALUE} - * - *
- * - * @param f - * starting floating-point value - * @return The adjacent floating-point value closer to positive infinity. - * @author Joseph D. Darcy - */ - public static float nextUp(float f) { - if (isNaN(f) || f == FloatConsts.POSITIVE_INFINITY) - return f; - else { - f += 0.0f; - return Float - .intBitsToFloat(Float.floatToRawIntBits(f) + ((f >= 0.0f) ? +1 : -1)); - } - } - - /** - * Returns the floating-point value adjacent to {@code d} in the direction of - * negative infinity. This method is semantically equivalent to - * {@code nextAfter(d, - * Double.NEGATIVE_INFINITY)}; however, a {@code nextDown} implementation may - * run faster than its equivalent {@code nextAfter} call. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, the result is NaN. - * - *
  • If the argument is negative infinity, the result is negative infinity. - * - *
  • If the argument is zero, the result is {@code -Double.MIN_VALUE} - * - *
- * - * @param d - * starting floating-point value - * @return The adjacent floating-point value closer to negative infinity. - * @author Joseph D. Darcy - */ - public static double nextDown(double d) { - if (isNaN(d) || d == Double.NEGATIVE_INFINITY) - return d; - else { - if (d == 0.0) - return -Double.MIN_VALUE; - else - return Double.longBitsToDouble( - Double.doubleToRawLongBits(d) + ((d > 0.0d) ? -1L : +1L)); - } - } - - /** - * Returns the floating-point value adjacent to {@code f} in the direction of - * negative infinity. This method is semantically equivalent to - * {@code nextAfter(f, - * Float.NEGATIVE_INFINITY)}; however, a {@code nextDown} implementation may - * run faster than its equivalent {@code nextAfter} call. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, the result is NaN. - * - *
  • If the argument is negative infinity, the result is negative infinity. - * - *
  • If the argument is zero, the result is {@code -Float.MIN_VALUE} - * - *
- * - * @param f - * starting floating-point value - * @return The adjacent floating-point value closer to negative infinity. - * @author Joseph D. Darcy - */ - public static double nextDown(float f) { - if (isNaN(f) || f == Float.NEGATIVE_INFINITY) - return f; - else { - if (f == 0.0f) - return -Float.MIN_VALUE; - else - return Float.intBitsToFloat( - Float.floatToRawIntBits(f) + ((f > 0.0f) ? -1 : +1)); - } - } - - /** - * Returns the first floating-point argument with the sign of the second - * floating-point argument. For this method, a NaN {@code sign} argument is - * always treated as if it were positive. - * - * @param magnitude - * the parameter providing the magnitude of the result - * @param sign - * the parameter providing the sign of the result - * @return a value with the magnitude of {@code magnitude} and the sign of - * {@code sign}. - * @author Joseph D. Darcy - * @since 1.5 - */ - public static double copySign(double magnitude, double sign) { - return rawCopySign(magnitude, (isNaN(sign) ? 1.0d : sign)); - } - - /** - * Returns the first floating-point argument with the sign of the second - * floating-point argument. For this method, a NaN {@code sign} argument is - * always treated as if it were positive. - * - * @param magnitude - * the parameter providing the magnitude of the result - * @param sign - * the parameter providing the sign of the result - * @return a value with the magnitude of {@code magnitude} and the sign of - * {@code sign}. - * @author Joseph D. Darcy - */ - public static float copySign(float magnitude, float sign) { - return rawCopySign(magnitude, (isNaN(sign) ? 1.0f : sign)); - } - - /** - * Returns the size of an ulp of the argument. An ulp of a {@code double} - * value is the positive distance between this floating-point value and the - * {@code double} value next larger in magnitude. Note that for non-NaN - * x, ulp(-x) == ulp(x). - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, then the result is NaN. - *
  • If the argument is positive or negative infinity, then the result is - * positive infinity. - *
  • If the argument is positive or negative zero, then the result is - * {@code Double.MIN_VALUE}. - *
  • If the argument is ±{@code Double.MAX_VALUE}, then the result is - * equal to 2971. - *
- * - * @param d - * the floating-point value whose ulp is to be returned - * @return the size of an ulp of the argument - * @author Joseph D. Darcy - * @since 1.5 - */ - public static double ulp(double d) { - int exp = getExponent(d); - - switch (exp) { - case DoubleConsts.MAX_EXPONENT + 1: // NaN or infinity - return Math.abs(d); - - case DoubleConsts.MIN_EXPONENT - 1: // zero or subnormal - return Double.MIN_VALUE; - - default: - assert exp <= DoubleConsts.MAX_EXPONENT - && exp >= DoubleConsts.MIN_EXPONENT; - - // ulp(x) is usually 2^(SIGNIFICAND_WIDTH-1)*(2^ilogb(x)) - exp = exp - (DoubleConsts.SIGNIFICAND_WIDTH - 1); - if (exp >= DoubleConsts.MIN_EXPONENT) { - return powerOfTwoD(exp); - } else { - // return a subnormal result; left shift integer - // representation of Double.MIN_VALUE appropriate - // number of positions - return Double.longBitsToDouble(1L << (exp - (DoubleConsts.MIN_EXPONENT - - (DoubleConsts.SIGNIFICAND_WIDTH - 1)))); - } - } - } - - /** - * Returns the size of an ulp of the argument. An ulp of a {@code float} value - * is the positive distance between this floating-point value and the - * {@code float} value next larger in magnitude. Note that for non-NaN - * x, ulp(-x) == ulp(x). - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, then the result is NaN. - *
  • If the argument is positive or negative infinity, then the result is - * positive infinity. - *
  • If the argument is positive or negative zero, then the result is - * {@code Float.MIN_VALUE}. - *
  • If the argument is ±{@code Float.MAX_VALUE}, then the result is - * equal to 2104. - *
- * - * @param f - * the floating-point value whose ulp is to be returned - * @return the size of an ulp of the argument - * @author Joseph D. Darcy - * @since 1.5 - */ - public static float ulp(float f) { - int exp = getExponent(f); - - switch (exp) { - case FloatConsts.MAX_EXPONENT + 1: // NaN or infinity - return Math.abs(f); - - case FloatConsts.MIN_EXPONENT - 1: // zero or subnormal - return FloatConsts.MIN_VALUE; - - default: - assert exp <= FloatConsts.MAX_EXPONENT && exp >= FloatConsts.MIN_EXPONENT; - - // ulp(x) is usually 2^(SIGNIFICAND_WIDTH-1)*(2^ilogb(x)) - exp = exp - (FloatConsts.SIGNIFICAND_WIDTH - 1); - if (exp >= FloatConsts.MIN_EXPONENT) { - return powerOfTwoF(exp); - } else { - // return a subnormal result; left shift integer - // representation of FloatConsts.MIN_VALUE appropriate - // number of positions - return Float.intBitsToFloat(1 << (exp - (FloatConsts.MIN_EXPONENT - - (FloatConsts.SIGNIFICAND_WIDTH - 1)))); - } - } - } - - /** - * Returns the signum function of the argument; zero if the argument is zero, - * 1.0 if the argument is greater than zero, -1.0 if the argument is less than - * zero. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, then the result is NaN. - *
  • If the argument is positive zero or negative zero, then the result is - * the same as the argument. - *
- * - * @param d - * the floating-point value whose signum is to be returned - * @return the signum function of the argument - * @author Joseph D. Darcy - * @since 1.5 - */ - public static double signum(double d) { - return (d == 0.0 || isNaN(d)) ? d : copySign(1.0, d); - } - - /** - * Returns the signum function of the argument; zero if the argument is zero, - * 1.0f if the argument is greater than zero, -1.0f if the argument is less - * than zero. - * - *

- * Special Cases: - *

    - *
  • If the argument is NaN, then the result is NaN. - *
  • If the argument is positive zero or negative zero, then the result is - * the same as the argument. - *
- * - * @param f - * the floating-point value whose signum is to be returned - * @return the signum function of the argument - * @author Joseph D. Darcy - * @since 1.5 - */ - public static float signum(float f) { - return (f == 0.0f || isNaN(f)) ? f : copySign(1.0f, f); - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java b/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java deleted file mode 100644 index 3e8517caa8..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.util; - -/** - * This class acts as an adapter between the logging API used in the API check - * utility and the logginf API available in the CTS harness. The API check - * utility uses a PrintWriter to log messages. The parts of the PrintWriter API - * used by the API check utility will be translated to TestUtil calls in this - * class. The SigLogIntf will capture the parts of the PrintWriter API that need - * to be reimplemented so API check can fit into the CTS test framework. - */ -public class SigLogAdapter implements SigLogIntf { - - private static final String NL = System.getProperty("line.separator", "\n"); - - private boolean dumpMessagesToStdErr; - - public SigLogAdapter() { - String useStdErr = System.getProperty("dump.api.check.stderr", "false"); - if (useStdErr.equalsIgnoreCase("true")) { - dumpMessagesToStdErr = true; - } - } - - public void println(String msg) { - print(msg + NL); - } - - public void println(Object obj) { - print(obj.toString() + NL); - } - - public void println(char c) { - print(c); - println(); - } - - public void println() { - print(NL); - } - - public void print(String msg) { - if (dumpMessagesToStdErr) { - System.err.println(msg); - } else { - TestUtil.logMsg(msg); - } - } - - public void print(Object obj) { - print(obj.toString()); - } - - public void print(char c) { - char[] chars = new char[] { c }; - print(new String(chars)); - } - - public void flush() { - // do nothing unless there is an equivalent call in TestUtil - // to flush the output stream - } - - public void close() { - // do nothing unless there is an equivalent call in TestUtil - // to close the output stream - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java b/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java deleted file mode 100644 index e96ffabe84..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * @(#)TSXADataSource.java 1.6 04/10/01 - */ - -package com.sun.ts.lib.util; - -import java.util.*; -import java.lang.reflect.*; -import javax.sql.XADataSource; - -public class TSXADataSource { - - private static final char PROPS_DELIM = ':'; - - private static final char PAIR_DELIM = '='; - - private static final char LITERAL_DELIM = '\''; - - private static final String XA_CLASS_NAME = "XADataSourceName"; - - private static TSXADataSource instance = new TSXADataSource(); - - private TSXADataSource() { - } - - public static TSXADataSource instance() { - return instance; - } - - private String lowerFirstChar(String str) { - String result = str; - if (str == null || str.length() == 0) { - return str; - } - char firstChar = str.charAt(0); - if (Character.isLowerCase(firstChar)) { - result = Character.toString(Character.toUpperCase(firstChar)) - + result.substring(1); - } - return result; - } - - private void setProperties(Map props, Class clazz, Object target) - throws Exception { - try { - Iterator iter = props.keySet().iterator(); - while (iter.hasNext()) { - String originalPropName = (String) iter.next(); - String propName = lowerFirstChar(originalPropName); - String methodName = "set" + propName; - Method m = findMethod(methodName, clazz); - String propValue = (String) props.get(originalPropName); - // Get the parameter type supported by the setter - Class[] parameters = m.getParameterTypes(); - Object[] values = new Object[1]; - // Now Convert the type to a wrapper object as needed - values[0] = convertType(parameters[0], propValue); - m.invoke(target, values); - System.err.println("$$$$$ TSXADataSource.setProperties \"[" - + originalPropName + ", " + propValue + "]\""); - } - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - private Map getProps(String arg) throws Exception { - Map result = new HashMap(); - boolean inValue = false; - boolean inQuote = false; - StringBuffer nameBuffer = new StringBuffer(); - StringBuffer valueBuffer = new StringBuffer(); - int numChars = arg.length(); - for (int i = 0; i < numChars; i++) { - char current = arg.charAt(i); - if (Character.isWhitespace(current)) { - continue; - } - if (current == PAIR_DELIM) { - inValue = true; - } else if (current == LITERAL_DELIM) { - inQuote = !inQuote; - } else if (current == PROPS_DELIM && !inQuote) { - inValue = false; - result.put(nameBuffer.toString(), valueBuffer.toString()); - nameBuffer.delete(0, nameBuffer.length()); - valueBuffer.delete(0, valueBuffer.length()); - } else { - if (inQuote || inValue) { - valueBuffer.append(current); - } else { - nameBuffer.append(current); - } - } - } - result.put(nameBuffer.toString(), valueBuffer.toString()); - System.err.println("$$$$$ getProps()" + result); - return result; - } - - /** - * Find a specific method within a Class - * - * @param methodName - * the name of the method to search for in clazz - * @param clazz - * The Class to search for 'methodName' in - * @return the returned Method. - * @throws Exception, - * in case methodName cannot be found in clazz - */ - private Method findMethod(String methodName, Class clazz) throws Exception { - Method[] methods = clazz.getMethods(); - Method result = null; - for (int i = 0; i < methods.length; i++) { - if (methods[i].getName().equalsIgnoreCase(methodName)) { - result = methods[i]; - System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); - System.err.println("$$$$$ findMethod() found method: " + result); - System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); - break; - } - } - if (result == null) { - throw new Exception("$$$$ Could not find method " + methodName - + " in Class: " + clazz.getName()); - } - return result; - } - - /** - * Converts the type from String to the Class type. - * - * @param type - * Class name to which the conversion is required. - * @param parameter - * String value to be converted. - * @return Converted value. - * @throws NumberFormatException, - * in case of the mismatch of parameter values. - */ - private Object convertType(Class type, String parameter) - throws NumberFormatException { - try { - String typeName = type.getName(); - if (typeName.equals("java.lang.String") - || typeName.equals("java.lang.Object")) { - return parameter; - } - - if (typeName.equals("int") || typeName.equals("java.lang.Integer")) { - return new Integer(parameter); - } - - if (typeName.equals("short") || typeName.equals("java.lang.Short")) { - return new Short(parameter); - } - - if (typeName.equals("byte") || typeName.equals("java.lang.Byte")) { - return new Byte(parameter); - } - - if (typeName.equals("long") || typeName.equals("java.lang.Long")) { - return new Long(parameter); - } - - if (typeName.equals("float") || typeName.equals("java.lang.Float")) { - return new Float(parameter); - } - - if (typeName.equals("double") || typeName.equals("java.lang.Double")) { - return new Double(parameter); - } - - if (typeName.equals("java.math.BigDecimal")) { - return new java.math.BigDecimal(parameter); - } - - if (typeName.equals("java.math.BigInteger")) { - return new java.math.BigInteger(parameter); - } - - if (typeName.equals("boolean") || typeName.equals("java.lang.Boolean")) { - return new Boolean(parameter); - } - - return parameter; - } catch (NumberFormatException nfe) { - System.err.println("$$$$$ NumberFormatException Encountered"); - throw nfe; - } - } - - public XADataSource getXADataSource(String xaProps, String className) - throws Exception { - System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); - System.err.println("xaProps \"" + xaProps + "\""); - System.err.println("className \"" + className + "\""); - System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); - Map props = getProps(xaProps); - Class clazz = Class.forName(className); - XADataSource target = (XADataSource) clazz.newInstance(); - setProperties(props, clazz, target); - return target; - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java b/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java deleted file mode 100644 index c440435a59..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java +++ /dev/null @@ -1,1162 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.util; - -import java.io.*; -import java.util.*; -import java.net.*; -import java.text.SimpleDateFormat; - -/** - * TestUtil is a final utility class responsible for implementing logging across - * multiple VMs. It also contains many convenience methods for logging property - * object contents, stacktraces, and header lines. - * - * @author Kyle Grucci - * - */ -public final class TestUtil { - public static boolean traceflag = true; - - // this can be set in TestUtil's start logging method!! - public static String sTestName; - - public static final String[] EMPTY_STRING_ARRAY = new String[0]; - - public static final int VM_UNDER_TEST = 0; - - public static final int VM_HARNESS = 1; // this is really the test client VM - - public static final int VM_JAVATEST = 2; - - public static final int DEBUG_OUTPUT_LEVEL = 2; - - public static final int NORMAL_OUTPUT_LEVEL = 3; - - public static final int ERROR_STREAM = 4; - - public static final int OUTPUT_STREAM = 5; - - public static String NEW_LINE = System.getProperty("line.separator", "\n"); - - // by default so the testers don't have to do anything - public static int iWhereAreWe = VM_UNDER_TEST; - - private static PrintWriter out = null; - - private static PrintWriter err = null; - - private static PrintWriter additionalWriter = null; - - private static ObjectOutputStream objectOutputStream = null; - - private static ObjectOutputStream objectInputStream = null; - - private static Socket socketOnRemoteVM = null; - - private static boolean bAlreadyInitialized = false; - - private static Object socketMutex = new Object(); - - private static int portOfHarness = 2000; - - private static String hostOfHarness = "unset host"; - - private static Vector vBuffereredOutput = new Vector(); - - // Transaction Attribute Value Mapping Table - private static final String UNRECOGNIZED_STATUS = "UNRECOGNIZED_STATUS"; - - private static final String transactionTable[] = { "STATUS_ACTIVE", // 0 - "STATUS_MARKED_ROLLBACK", // 1 - "STATUS_PREPARED", // 2 - "STATUS_COMMITTED", // 3 - "STATUS_ROLLEDBACK", // 4 - "STATUS_UNKNOWN", // 5 - "STATUS_NO_TRANSACTION", // 6 - "STATUS_PREPARING", // 7 - "STATUS_COMMITTING", // 8 - "STATUS_ROLLING_BACK", // 9 - }; - - // debug flag for printing TS harness debug output - public static boolean harnessDebug; - - // hang onto the props that are passed in during logging init calls - private static Properties testProps = null; - - private static SimpleDateFormat df = new SimpleDateFormat( - "MM-dd-yyyy HH:mm:ss"); - - static { - harnessDebug = Boolean.getBoolean("cts.harness.debug"); - } - - /** - * used by harness to log debug output to the standard output stream - * - * @param s - * the output string - */ - public static void logHarnessDebug(String s) { - if (harnessDebug) { - logHarness(s, null); - } - } - - /** - * used by TSTestFinder and TSScript to log output to the standard output - * stream - * - * @param s - * the output string - * @param t - * a Throwable whose stacktrace gets printed - */ - public static void logHarness(String s, Throwable t) { - synchronized (System.out) { - System.out.println(df.format(new Date()) + ": Harness - " + s); - logToAdditionalWriter(s, t); - if (t != null) { - t.printStackTrace(); - } - } - } - - public static void logHarness(String s) { - logHarness(s, null); - } - - private static void logToAdditionalWriter(String s) { - logToAdditionalWriter(s, null); - } - - private static void logToAdditionalWriter(String s, Throwable t) { - if (additionalWriter != null) - additionalWriter.println(s); - if (t != null) { - t.printStackTrace(additionalWriter); - } - } - - /** - * This method returns the properties object - * - * @return the properties object - */ - public static Properties getProperties() { - if (testProps == null) { - testProps = getPropsFromFile(); - } - return testProps; - } - - /** - * This method returns the property value for the appropriate property key - * - * @param s - * the property name - * @return the property value - */ - public static String getProperty(String s) { - Properties p = getProperties(); - return getProperty(p, s); - } - - /** - * This method returns the property value for the appropriate property key - * - * @param s - * the property name - * @return the property value - */ - public static String getProperty(String s, String defaultValue) { - Properties p = getProperties(); - return getProperty(p, s, defaultValue); - } - - /** - * Reads a property from the properties object and logs a message if the value is not set - * @param props the properties object - * @param key the property key - * @return the property value, null if not set - */ - public static String getProperty(Properties props, String key) { - String value = props.getProperty(key); - if (value == null) { - logMsg("Test property " + key + " is not set"); - } - return value; - } - /** - * Reads a property from the properties object and logs a message if the value is not set - * @param props the properties object - * @param key the property key - * @param defaultValue the default value - * @return the property value, defaultValue if not set - */ - public static String getProperty(Properties props, String key, String defaultValue) { - String value = props.getProperty(key); - if (value == null) { - logMsg("Test property " + key + " is not set, using: "+defaultValue); - value = defaultValue; - } - return value; - } - - /** - * Wrapper for System.getProperty(String) that logs missing properties - * @param key the property key - * @return the property value - */ - public static String getSystemProperty(String key) { - String value = System.getProperty(key); - if (value == null) { - logMsg("System property " + key + " is not set"); - } - return value; - } - public static String getSystemProperty(String key, String def) { - return System.getProperty(key, def); - } - - /** - * returns the transaction status value as a String given its integer - * representation - * - * @param status - * integer representation of a transaction status - * @return string representation of a transaction status - */ - public static String getTransactionStatus(int status) { - if (status < 0 || status > transactionTable.length - 1) - return UNRECOGNIZED_STATUS; - else - return transactionTable[status]; - } - - /** - * prints the transaction status value as a String given its integer - * representation - * - * @param status - * integer representation of a transaction status - */ - public static void printTransactionStatus(int status) { - logMsg("TRANSACTION_STATUS: " + getTransactionStatus(status)); - } - - // MilliSeconds Multiple - public static final int MILLI = 1000; - - /** - * pauses the calling thread for the specified number of seconds - * - * @param s - * number of seconds - */ - public static void sleepSec(int s) { - logTrace("Sleeping " + s + " seconds"); - try { - Thread.sleep(s * MILLI); - } catch (InterruptedException e) { - logErr("Exception: " + e); - } - } - - /** - * pauses the calling thread for the specified number of milliseconds - * - * @param s - * number of milliseconds - */ - public static void sleep(int s) { - sleepMsec(s); - } - - /** - * pauses the calling thread for the specified number of milliseconds - * - * @param s - * number of milliseconds - */ - public static void sleepMsec(int s) { - logTrace("Sleeping " + s + " milliseconds"); - try { - Thread.sleep(s); - } catch (InterruptedException e) { - logErr("Exception: " + e); - } - } - - public static void flushStream() { - synchronized (socketMutex) { - try { - objectOutputStream.flush(); - } catch (Throwable t) { - // Ignore - // System.out.println("EXCEPTION WHILE FLUSHING"); - } - } - } - - public static void writeObject(TestReportInfo info) { - synchronized (socketMutex) { - flushStream(); - try { - objectOutputStream.writeObject(info); - // System.out.println("WROTE: " + info.sOutput); - } catch (Exception e) { - // System.out.println("EXCEPTION WHILE WRITING: " + info.sOutput); - synchronized (vBuffereredOutput) { - vBuffereredOutput.addElement(info); - // System.out.println("ADDED THIS STRING TO BUFFERED OUT: " + - // info.sOutput); - } - } - flushStream(); - } - } - - private static void sendBufferedData() throws Exception { - TestReportInfo tri = null; - synchronized (vBuffereredOutput) { - try { - // logMsg("vBuffereredOutput size = " + vBuffereredOutput.size()); - synchronized (socketMutex) { - for (int ii = 0; ii < vBuffereredOutput.size(); ii++) { - tri = (TestReportInfo) vBuffereredOutput.elementAt(ii); - writeObject(tri); - // System.out.println("WRITING_bufferedoutput: " + tri.sOutput); - // objectOutputStream.writeObject(tri); - // objectOutputStream.flush(); - // logMsg("writing: " + ii); - // logMsg("writing: " + tri.sOutput); - } - } - // logMsg("wrote buffered output"); - } catch (Exception e) { - throw e; - } finally { - vBuffereredOutput.removeAllElements(); - // logMsg("reinititialized buffered output vector"); - } - } - } - - private static final String PROPS_FILE_NAME = "-cts-props.txt"; - - private static final String PROPS_FILE; - - static { - String userName = System.getProperty("user.name"); - String tmpDir = System.getProperty("java.io.tmpdir", - File.separator + "tmp"); - if (tmpDir.endsWith(File.separator)) { - PROPS_FILE = tmpDir + userName + PROPS_FILE_NAME; - } else { - PROPS_FILE = tmpDir + File.separator + userName + PROPS_FILE_NAME; - } - System.out.println( - "************************************************************"); - System.out.println("* props file set to \"" + PROPS_FILE + "\""); - System.out.println( - "************************************************************"); - } - - private static Properties getPropsFromFile() { - FileInputStream in = null; - Properties p = new Properties(); - try { - in = new FileInputStream(PROPS_FILE); - p.load(in); - } catch (Exception e) { - logErr("Error reading the Properties object", e); - } finally { - if (in != null) { - try { - in.close(); - } catch (Exception e) { - } - } - } - return p; - } - - private static void savePropsToFile(Properties p) { - try (FileOutputStream out = new FileOutputStream(PROPS_FILE)) { - p.store(out, "CTS Test Properties File"); - } catch (Exception e) { - logErr("Error saving the Properties object", e); - } - } - - /** - * This static method must be called once by each new remote VM. Once called, - * a socket connection is created back to the host running the test harness. - * All calls to logMsg, logErr, and logTrace are immediately sent back to the - * harness host. - * - * @param p - * properties containing harness host, port, and trace flag - * @exception RemoteLoggingInitException - * if an exception occurs while the server side is setting up the - * socket connection back to the client host - */ - public static void init(Properties p) throws RemoteLoggingInitException { - savePropsToFile(p); // persist properties to a disk file - // System.out.println("INIT_CALLED"); - synchronized (socketMutex) { - try { - // TSPropertyManager.createTSPropertyManager(p); - testProps = p; - if (p.isEmpty()) { - throw new RemoteLoggingInitException( - "Init: Error - Empty properties object passed to TestUtil.init"); - } - NEW_LINE = p.getProperty("line.separator"); - if (socketOnRemoteVM != null) { - socketOnRemoteVM.close(); - } - if (objectOutputStream != null) { - objectOutputStream.close(); - } - if (true) { - // System.out.println("INIT_CALLED AND SOCKET = NULL"); - traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); - hostOfHarness = p.getProperty("harness.host"); - portOfHarness = Integer - .parseInt(p.getProperty("harness.log.port", "2000")); - if (hostOfHarness == null) { - throw new RemoteLoggingInitException( - "Init: Error while trying to getProperty(harness.host) - returned null"); - } - socketOnRemoteVM = new Socket(hostOfHarness, portOfHarness); - objectOutputStream = new ObjectOutputStream( - socketOnRemoteVM.getOutputStream()); - sendBufferedData(); - // logMsg("socketOnRemoteVM=null, renewed everything"); - } else { - // we'll never get here now... - // call flush to make sure that we still have an open connection. - // if the client went away and a new client is being run, we will - // get an IOException, in which case we will reconnect. - // logMsg("socketOnRemoteVM != null, calling flush"); - // objectOutputStream.flush(); - // if this fails, then the connection is gone - // this is better than flush, because flush seems to always fail - TestReportInfo tri = new TestReportInfo("SVR: " + "Logging check", - OUTPUT_STREAM, DEBUG_OUTPUT_LEVEL, null); - objectOutputStream.writeObject(tri); - // System.out.println("WROTE TEST OBJECT"); - } - } catch (UnknownHostException e) { - throw new RemoteLoggingInitException( - "You must pass a valid host string to init()"); - } catch (IOException e) { - // System.out.println("EXCEPTION WHILE WRITING TEST OBJECT"); - // the client VM may have shutdown, so establish a new connection - try { - // System.out.println("INIT_CALLED AND TRYING TO ESABLISH CONN. AFTER - // IOEXCEPTION"); - traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); - hostOfHarness = p.getProperty("harness.host"); - portOfHarness = Integer - .parseInt(p.getProperty("harness.log.port", "2000")); - if (hostOfHarness == null) { - throw new RemoteLoggingInitException( - "Init: Error while trying to getProperty(harness.host) - returned null"); - } - if(socketOnRemoteVM != null) { - socketOnRemoteVM.close(); - } - socketOnRemoteVM = new Socket(hostOfHarness, portOfHarness); - objectOutputStream = new ObjectOutputStream( - socketOnRemoteVM.getOutputStream()); - sendBufferedData(); - // logMsg("caught IOException from flush(), renewed everything"); - } catch (IOException e2) { - e2.printStackTrace(); - throw new RemoteLoggingInitException( - "IOException in TestUtil.init()"); - } catch (Exception e2) { - e2.printStackTrace(); - throw new RemoteLoggingInitException( - "got a random exception in init()"); - } - } catch (NumberFormatException e) { - throw new RemoteLoggingInitException( - "You must pass a valid port number string to init()"); - } catch (Exception e) { - e.printStackTrace(); - throw new RemoteLoggingInitException( - "got a random exception in init()"); - } - } - } - - /* - * This method is called by our harness code to allow code that is shared - * between the harness and the tests and calls TestUtil logMsg and logTrace to - * do the right thing inside of the JavaTest VM. These calls will call to our - * logHarness methods. - */ - public static void initJavaTest() { - iWhereAreWe = VM_JAVATEST; - } - - public static void setAdditionalWriter(PrintWriter pw) { - iWhereAreWe = VM_JAVATEST; - additionalWriter = pw; - } - - /** - * This static method must be called once by a VM which does not rely upon any - * remote logging. - * - * param p properties containing harness trace flag - */ - public static void initNoLogging(Properties p) { - if (bAlreadyInitialized) - return; - - testProps = p; - NEW_LINE = p.getProperty("line.separator"); - traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); - iWhereAreWe = VM_HARNESS; - bAlreadyInitialized = true; - } - - /** - * This static method must be called once by the harness VM. Once called, a - * serversocket begins listening for Remote VMs to connect on the port - * specified by harness.log.port. - * - * @param p - * properties containing harness trace flag - */ - public static void initClient(Properties p) { - if (bAlreadyInitialized) - return; - // start listener thread - try { - testProps = p; - NEW_LINE = p.getProperty("line.separator"); - traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); - iWhereAreWe = VM_HARNESS; - ServerSocket ss = getServerSocket(p); - new Acceptor(ss); - bAlreadyInitialized = true; - } catch (IOException e) { - e.printStackTrace(); - } - } - - private static ServerSocket getServerSocket(Properties p) throws IOException { - ServerSocket result = null; - int port = 2000; - int retry = 10; - final int delaySeconds = 1; - try { - port = Integer.parseInt(p.getProperty("harness.log.port", "2000")); - } catch (NumberFormatException e1) { - e1.printStackTrace(); - System.err.println("Invalid value for harness.log.port," - + " using default harness.log.port of " + port); - } - try { - retry = Integer - .parseInt(p.getProperty("harness.socket.retry.count", "10")); - } catch (NumberFormatException e2) { - e2.printStackTrace(); - System.err.println("Invalid value for harness.socket.retry.count," - + " using default harness.socket.retry.count of " + retry); - } - logTrace( - "####### Value of harness.socket.retry.count is \"" + retry + "\""); - logTrace("####### Value of harness.log.port is \"" + port + "\""); - result = getServerSocket0(port, retry, delaySeconds); - while (result == null) { - port++; - result = getServerSocket0(port, retry, delaySeconds); - } - p.setProperty("harness.log.port", Integer.toString(port)); - logTrace( - "####### Actual bind value of harness.log.port is \"" + port + "\""); - return result; - } - - private static ServerSocket getServerSocket0(int port, int retry, - int delaySeconds) { - ServerSocket result = null; - for (int i = 0; i < retry; i++) { - try { - result = new ServerSocket(port); - break; - } catch (IOException e3) { - try { - Thread.sleep(delaySeconds * 1000); - } catch (InterruptedException e4) { - } - } - } - return result; - } - - /** - * This static method must be called once by the harness VM in order to set - * the output and error streams and the name of the current test. - * - * @param testName - * the currently running testname as specified in the source code - * tags - * @param outStream - * stream printed to by the logMsg and logTrace methods - * @param errStream - * stream printed to by the logErr methods - */ - public static void setCurrentTest(String testName, PrintWriter outStream, - PrintWriter errStream) { - sTestName = testName; - out = outStream; - err = outStream; - } - - /** - * prints a string to the log stream. All tests should use this method for - * standard logging messages - * - * @param s - * string to print to the log stream - */ - public static void logMsg(String s) { - if (iWhereAreWe == VM_JAVATEST) { - logHarness(s); - } else if (iWhereAreWe == VM_HARNESS) { - synchronized (out) { - // just print to the appropriate stream - out.println(df.format(new Date()) + ": " + s); - out.flush(); - } - } else { - TestReportInfo tri = new TestReportInfo("SVR: " + s, OUTPUT_STREAM, - NORMAL_OUTPUT_LEVEL, null); - writeObject( - tri); /* - * try { synchronized(socketMutex) { objectOutputStream.flush(); - * objectOutputStream.writeObject(tri); - * objectOutputStream.flush(); //System.out. - * println("successfully wrote to objectOutputStream"); } } - * catch(Exception ex) { //System.out. - * println("got exception trying to write to objectOutputStream" - * ); //if we have any problem, buffer the data - * synchronized(vBuffereredOutput) { - * vBuffereredOutput.addElement(tri); } } - */ - - } - } - - /** - * prints a string as well as the provided Throwable's stacktrace to the log - * stream. All tests should use this method for standard logging messages - * - * @param s - * string to print to the log stream - * @param t - * - throwable whose stacktrace gets printed* - * - */ - public static void logMsg(String s, Throwable t) { - if (iWhereAreWe == VM_JAVATEST) { - logHarnessDebug(s); - if (t != null) { - t.printStackTrace(); - } - } else { - if (iWhereAreWe == VM_HARNESS) { - synchronized (out) { - // just print to the appropriate stream - out.println(df.format(new Date()) + ": " + s); - out.flush(); - } - } else { - TestReportInfo tri = new TestReportInfo("SVR: " + s, OUTPUT_STREAM, - NORMAL_OUTPUT_LEVEL, null); - writeObject(tri); - } - if (t != null) { - printStackTrace(t); - } - } - - } - - /** - * turns on/off debugging. Once on, all calls to the logTrace method result in - * messages being printed to the log stream. If off, all logTrace calls are - * not printed. - * - * @param b - * If true, debugging is on. If false, debugging is - * turned off. - */ - public static void setTrace(boolean b) { - traceflag = b; - } - - /** - * prints a debug string to the log stream. All tests should use this method - * for verbose logging messages. Whether or not the string is printed is - * determined by the last call to the setTrace method. - * - * @param s - * string to print to the log stream - */ - public static void logTrace(String s) { - logTrace(s, null); - } - - /** - * Prints a debug string as well as the provided Throwable's stacktrace. Use - * this if certain exceptions are only desired while tracing. - * - * @param s - * - string to print to the log stream - * @param t - * - throwable whose stactrace gets printed - */ - public static void logTrace(String s, Throwable t) { - if (traceflag) { - if (iWhereAreWe == VM_JAVATEST) { - logHarnessDebug(s); - } else { - if (iWhereAreWe == VM_HARNESS) { - synchronized (out) { - // just print to the appropriate stream - if (s != null && s.startsWith("SVR-TRACE")) - out.println(df.format(new Date()) + ": " + s); - else - out.println(df.format(new Date()) + ": TRACE: " + s); - } - } else { - TestReportInfo tri = new TestReportInfo("SVR-TRACE: " + s, - OUTPUT_STREAM, DEBUG_OUTPUT_LEVEL, null); - writeObject(tri); - } - } - if (t != null) { - t.printStackTrace(); - } - } - } - - /** - * prints an error string to the error stream. All tests should use this - * method for error messages. - * - * @param s - * string to print to the error stream - * @param e - * a Throwable whose stacktrace gets printed - */ - public static void logErr(String s, Throwable e) { - if (iWhereAreWe == VM_JAVATEST) { - logHarness(s); - if (e != null) { - e.printStackTrace(); - } - } else { - if (iWhereAreWe == VM_HARNESS) { - synchronized (err) { - // just print to the appropriate stream - if (s != null && s.startsWith("SVR-ERROR")) - err.println(df.format(new Date()) + ": " + s); - else - err.println(df.format(new Date()) + ": ERROR: " + s); - } - } else { - TestReportInfo tri = new TestReportInfo("SVR-ERROR: " + s, ERROR_STREAM, - NORMAL_OUTPUT_LEVEL, null); - writeObject(tri); - } - if (e != null) { - printStackTrace(e); - } - } - } - - /** - * prints an error string to the error stream. All tests should use this - * method for error messages. - * - * @param s - * string to print to the error stream - */ - public static void logErr(String s) { - logErr(s, null); - } - - /** - * prints the contents of a properties object to the logging stream - * - * @param p - * properties to print - */ - public static void list(Properties p) { - StringBuffer sb = new StringBuffer(); - if (p == null) - return; - sb.append("--- Property Listing ---").append(TestUtil.NEW_LINE); - Enumeration e = p.propertyNames(); - String key = null; - while (e.hasMoreElements()) { - key = (String) e.nextElement(); - sb.append(key).append("=").append(p.getProperty(key)) - .append(TestUtil.NEW_LINE); - } - sb.append("--- End Property Listing ---").append(TestUtil.NEW_LINE); - logTrace(new String(sb)); - } - - /** - * prints the stacktrace of a Throwable to the logging stream - * - * @param e - * exception to print the stacktrace of - */ - public static void printStackTrace(Throwable e) { - if (e == null) { - return; - } - try { - StringWriter sw = new StringWriter(); - PrintWriter writer = new PrintWriter(sw); - e.printStackTrace(writer); - logErr(sw.toString()); - writer.close(); - } catch (Exception E) { - } - } - - /** - * prints the stacktrace of a Throwable to a string - * - * @param e - * exception to print the stacktrace of - */ - public static String printStackTraceToString(Throwable e) { - String sTrace = ""; - if (e == null) - return ""; - try { - StringWriter sw = new StringWriter(); - PrintWriter writer = new PrintWriter(sw); - e.printStackTrace(writer); - sTrace = sw.toString(); - writer.close(); - } catch (Exception E) { - } - return sTrace; - } - - /** - * prints a line of asterisks to the logging stream - */ - public static void separator2() { - logMsg("**************************************************" - + "******************************"); - } - - /** - * prints a line of dashes to the logging stream - */ - public static void separator1() { - logMsg("--------------------------------------------------" - + "------------------------------"); - } - - /** - * Convience method to handle sucking in the data from a connection. - */ - public static String getResponse(URLConnection connection) - throws IOException { - StringBuffer content; - BufferedReader in; - // set up the streams / readers - InputStream instream = connection.getInputStream(); - InputStreamReader inreader = new InputStreamReader(instream); - in = new BufferedReader(inreader); - // data structures - content = new StringBuffer(1024); - char[] chars = new char[1024]; - int length = 0; - // pull the data into the content buffer - while (length != -1) { - content.append(chars, 0, length); - length = in.read(chars, 0, chars.length); - } - // return - instream.close(); // john feb 16 - inreader.close(); // john feb 16 - in.close(); // john feb 16 - return content.toString(); - } - - /** - * Loads any properties that might be in a given String. - */ - public static Properties getResponseProperties(String string) - throws IOException { - Properties props; - ByteArrayInputStream in; - byte[] bytes; - props = new Properties(); - bytes = string.getBytes(); - in = new ByteArrayInputStream(bytes); - props.load(in); - in.close(); - return props; - } - - /** - * One shot method to get Properties directly from a URLConnection. - */ - public static Properties getResponseProperties(URLConnection connection) - throws IOException { - Properties props; - String input; - input = getResponse(connection); - props = getResponseProperties(input); - return props; - } - - public static String toEncodedString(Properties args) { - StringBuffer buf = new StringBuffer(); - Enumeration names = args.propertyNames(); - while (names.hasMoreElements()) { - String name = (String) names.nextElement(); - String value = args.getProperty(name); - buf.append(URLEncoder.encode(name)).append("=") - .append(URLEncoder.encode(value)); - if (names.hasMoreElements()) - buf.append("&"); - } - return buf.toString(); - } - - public static URLConnection sendPostData(Properties p, URL url) - throws IOException { - TestUtil.logMsg("Openning url connection to: " + url.toString()); - URLConnection urlConn = url.openConnection(); - // Begin POST of properties to SERVLET - String argString = TestUtil.toEncodedString(p); - urlConn.setDoOutput(true); - urlConn.setDoInput(true); - urlConn.setUseCaches(false); - DataOutputStream out = new DataOutputStream(urlConn.getOutputStream()); - out.writeBytes(argString); - out.flush(); - out.close(); - // End POST - return urlConn; - } - - /** - * Parse a the table name from the ddl string such as: "create table foo" or - * "delete from foo" - * - * @param value - * buffer to parse - * @return The name of the table - */ - public static String getTableName(String value) { - String tableName = ""; - if (value != null) { - tableName = value.trim(); - int pos = tableName.lastIndexOf(" "); - tableName = tableName.substring(pos + 1); - } else { - TestUtil.logMsg("Error: Null value passed for table Name"); - } - return (tableName); - } // END -- getTableName - - public static String srcToDist(String src) { - return replaceLastSrc(src, "dist"); - } - - public static String replaceLastSrc(String src, String replacement) { - // find last index of /src/, remove "src", then replace it with replacement - StringBuffer sbToConvert = new StringBuffer(src); - int iStart = src.lastIndexOf("src"); - if (iStart != -1) { - if (harnessDebug) { - TestUtil.logHarnessDebug("Pre-converted src dir = " + sbToConvert); - } - sbToConvert.replace(iStart, iStart + 3, replacement); - - if (harnessDebug) { - TestUtil.logHarnessDebug( - "Converted " + replacement + " dir = " + sbToConvert); - } - } - return sbToConvert.toString(); - } - - public static String getDistString() { - // we may need to default to src until we are ready to convert for good - return "dist"; - } - - public static String getRelativePath(String oldVal) { - if (oldVal == null) { - return oldVal; - } - String result = oldVal; - oldVal = oldVal.replace('\\', '/'); - while (oldVal.endsWith("/")) { - oldVal = oldVal.substring(0, oldVal.length() - 1); - } - if (oldVal.endsWith("/src")) { - return result; - } - int pos = oldVal.indexOf("/src/"); - if (pos == -1) { - pos = oldVal.indexOf("/dist/"); - if (pos == -1) { - result = oldVal; - } else { - result = oldVal.substring(pos + 6); // len of '/dist/' - } - } else { - result = oldVal.substring(pos + 5); - } - return result; - } - - // Convert the given string of key-value-pair into a properties object - // - // for example : - // DatabaseName=derbyDB:user=cts1:password=cts1:serverName=localhost:portNumber=1527 - // - public static Properties strToProps(String strProps) { - - logTrace("Props String = " + strProps); - Properties props = new Properties(); - String strArray[] = strProps.split(":"); // Split the given string into - // array of key value pairs - - for (String keyValuePair : strArray) { - String strArray2[] = keyValuePair.split("="); // Take the key value pair - // and store it into - // properties - logTrace("Setting property " + strArray2[0] + " = " + strArray2[1]); - props.setProperty(strArray2[0], strArray2[1]); - } - - return props; - - } - - public static void printProperties(Properties props) { - Set propertyNames = props.stringPropertyNames(); - for (String key : propertyNames) { - logTrace(key + " = " + props.getProperty(key)); - } - } - -} - -// ======================= end of class TestUtil ====================== - -class Acceptor extends Thread { - ServerSocket serverSocket; - - private Socket outputSocket = null; - - public Acceptor(ServerSocket ss) { - serverSocket = ss; - this.start(); - } - - public void run() { - while (true) { - try { - outputSocket = serverSocket.accept(); - new SocketReader(outputSocket); - // System.out.println("new connection!!!!!"); - } catch (IOException ex) { - ex.printStackTrace(); - } - } - } -} - - -class SocketReader extends Thread { - private Socket outputSocket = null; - - public SocketReader(Socket s) { - outputSocket = s; - this.start(); - } - - public void run() { - ObjectInputStream objIn; - TestReportInfo tri = null; - try { - objIn = new ObjectInputStream(outputSocket.getInputStream()); - // while((tri = (TestReportInfo)objIn.readObject()) != null) - while (true) { - tri = (TestReportInfo) objIn.readObject(); - if (tri.iDebugLevel == TestUtil.DEBUG_OUTPUT_LEVEL) { - // System.out.println("about to call logTrace"); - TestUtil.logTrace(tri.sOutput); - } else { - if (tri.iStream == TestUtil.ERROR_STREAM) { - if (tri.exception == null) - TestUtil.logErr(tri.sOutput); - else - TestUtil.logErr(tri.sOutput, tri.exception); - // System.out.println("about to call logErr"); - } else // assume outputstream - { - // System.out.println("about to call logMsg"); - TestUtil.logMsg(tri.sOutput); - } - } - } - } catch (EOFException e) { - // do nothing since the eof broke us out of the loop - } catch (ClassNotFoundException e) { - e.printStackTrace(); - } catch (IOException e) { - e.printStackTrace(); - } - // cleanup socket no matter what happens - /* - * try { outputSocket.close(); outputSocket = null; } catch(IOException e) { - * - * } - */ - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java b/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java deleted file mode 100644 index b11a0f1da1..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java +++ /dev/null @@ -1,319 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.util; - -import java.io.*; -import java.net.*; -import java.util.*; - -/** - * Contains convenience methods for interacting with a web server. - * - * @author Mark Roth - */ -public class WebUtil { - - /** - * Reponse object containing information returned from the web server - */ - public static class Response { - /** Version (usually HTTP/1.0) */ - public String versionToken; - - /** Status (e.g. 401) */ - public String statusToken; - - /** Location (for redirections) */ - public String location; - - /** Actual page content */ - public String content = ""; - - /** Storage for cookies */ - public Hashtable cookies = new Hashtable(); - - /** Flag; true if authentication requested */ - public boolean authenticationRequested = false; - - /** - * Parses a header line for an old-style cookie (not Set-Cookie2), and - * stores the cookie in the cookies table. Only the key and value are - * stored. Expected syntax: "Set-Cookie: NAME=VALUE[;...]" The key is stored - * in upper-case. - * - * @param cookieLine - * The string with the cookie in it. - */ - public void parseCookie(String cookieLine) { - // Strip Set-Cookie: from line: - cookieLine = cookieLine.substring("Set-Cookie:".length()).trim(); - - // Strip any additional parameters from the end of the line. - int semicolon = cookieLine.indexOf(";"); - if (semicolon != -1) { - cookieLine = cookieLine.substring(0, semicolon).trim(); - } - - // Now we have "NAME=VALUE" - int equals = cookieLine.indexOf("="); - String name = cookieLine.substring(0, equals).toUpperCase(); - String value = cookieLine.substring(equals + 1); - cookies.put(name.trim(), value.trim()); - } - - /** - * Returns true if the status token for this response represents an error, - * or false if the status token indicates the page was retrieved okay. Note - * that a redirection is not an error. - */ - public boolean isError() { - // According to RFC2616, all status tokens staring with 4xx or 5xx - // are errors. - return statusToken.startsWith("4") || statusToken.startsWith("5"); - } - } - - /** - * Converts a standard URL to a request. For example, the string - * "http://goodtimes:8000/testing" would be converted to "/testing". - * - * @param urlString - * The URL to convert - * @return The resulting GET request - * @exception MalformedURLException - * Thrown if the urlString does not contain a valid URL. - */ - public static String getRequestFromURL(String urlString) - throws MalformedURLException { - URL url = new URL(urlString); - return url.getFile(); - } - - /** - * Sends a request to the web server. A WebUtil.Response object is returned - * with the response information. - * - * @param method - * Can be either "GET" or "POST" - * @param addr - * Address of web server - * @param port - * Port of web server - * @param req - * The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) - * @param postData - * If this is a POST request, the data to be posted, encoded in a - * Properties class. null if no post data to be sent. - * @param cookieList - * A list of cookies to send when requesting the page. null if no - * cookie list is to be sent. - * @return WebUtil.Response object containing response information - * @exception IOException - * Thrown if request could not be made - */ - public static Response sendRequest(String method, InetAddress addr, int port, - String req, Properties postData, Hashtable cookieList) - throws IOException { - return sendAuthenticatedRequest(method, addr, port, req, postData, - cookieList, null, null); - } - - /** - * Sends an authenticated request to the web server. A WebUtil.Response object - * is returned with the response information. - * - * @param method - * Can be either "GET" or "POST" - * @param addr - * Address of web server - * @param port - * Port of web server - * @param req - * The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) - * @param postData - * If this is a POST request, the data to be posted, encoded in a - * Properties class. null if no post data to be sent. - * @param cookieList - * A list of cookies to send when requesting the page. null if no - * cookie list is to be sent. - * @param username - * The username for authentication, null if no authentication - * required. - * @param password - * The password for authentication, null if no authentication - * required. - * @return WebUtil.Response object containing response information - * @exception IOException - * Thrown if request could not be made - */ - public static Response sendAuthenticatedRequest(String method, - InetAddress addr, int port, String req, Properties postData, - Hashtable cookieList, String username, String password) - throws IOException { - String protocol = "HTTP/1.0"; - URL requestURL; - Socket socket = null; - PrintWriter out = null; - BufferedReader in = null; - String line = null; - Response response = new Response(); - String hostname = null; - - try { - hostname = addr.getHostName(); - requestURL = new URL("http", hostname, port, req); - req = method + " " + req + " " + protocol; - - socket = new Socket(addr, port); - - in = new BufferedReader(new InputStreamReader(socket.getInputStream())); - out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); - send(out, req); - - // send Host header - if (port == 80) { - send(out, "Host: " + hostname); - } else { - send(out, "Host: " + hostname + ':' + port); - } - - if (cookieList != null) { - // Send cookies: - Enumeration keys = cookieList.keys(); - - // Does at least one cookie exist? - if (keys.hasMoreElements()) { - String cookieString = "Cookie: "; - - // Add each cookie to the string - boolean first = true; - while (keys.hasMoreElements()) { - String key = (String) keys.nextElement(); - String value = (String) cookieList.get(key); - cookieString += (first ? "" : "; ") + key + "=" + value; // + "; - // $Path=/"; - first = false; - } - - // Write cookies: - send(out, cookieString); - } - } - - // Send authentication information if necessary: - if (username != null) { - String code = encodeBase64(username + ":" + password); - send(out, "Authorization: Basic " + code.trim()); - } - - // Send extra header information if we are posting. - if (postData != null) { - send(out, "Content-type: application/x-www-form-urlencoded"); - } - - // If this is a post request, send post data: - if ((postData != null) && method.toUpperCase().equals("POST")) { - String postString = TestUtil.toEncodedString(postData); - - // Skip a line: - send(out, "Content-length: " + postString.length()); - send(out, ""); - send(out, postString); - } else { - // Skip a line: - send(out, ""); - } - - out.flush(); - - // Read first line and check for HTTP version and OK. - line = in.readLine(); - if (line != null) { - TestUtil.logTrace("HEADER: " + line); - - StringTokenizer st = new StringTokenizer(line.trim()); - response.versionToken = st.nextToken(); - response.statusToken = st.nextToken(); - } - - // Read each line of the header until we hit a blank line - while ((line = in.readLine()) != null) { - TestUtil.logTrace("HEADER: " + line); - - // Blank line means we are done with the header: - if (line.trim().equals("")) - break; - - // Analyze special tags location and set cookie - if (line.toLowerCase().startsWith("location:")) { - // This is a redirect. Extract valuable infomration: - response.location = line.substring(10); - } else if (line.toLowerCase().startsWith("set-cookie:")) { - // This is a cookie. Add the cookie to the response - // object. - response.parseCookie(line); - } else if (line.toLowerCase().startsWith("www-authenticate:")) { - // Request to authenticate this page. - response.authenticationRequested = true; - } - } - - // The rest is content: - while ((line = in.readLine()) != null) { - response.content += line + "\n"; - } - - in.close(); - out.close(); - } catch (MalformedURLException e) { - throw new IOException("MalformedURLException: " + e.getMessage()); - } catch (UnknownHostException e) { - throw new IOException("UnknownHostException: " + e.getMessage()); - } catch (ConnectException e) { - throw new IOException("ConnectException: " + e.getMessage()); - } - - return response; - } - - /** - * Outputs a single line of text to the given output stream. Appends a \r\n - * automatically. By adding a System.out.println here, you can easily echo - * what is being sent to the web server. - */ - private static void send(PrintWriter out, String s) { - out.print(s + "\r\n"); - TestUtil.logTrace("REQUEST: " + s); - } - - /** - * Encodes the given string in base64 format (useful for BASIC - * authentication). Base64 encoding is defined by RFC2047. - * - * @param s - * The string to encode - * @return The encoded string - */ - public static String encodeBase64(String s) { - BASE64Encoder encoder = new BASE64Encoder(); - return encoder.encodeBuffer(s.getBytes()); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java deleted file mode 100644 index 5ca6c1f8f5..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (c) 1999, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.util.StringTokenizer; -import java.util.jar.Attributes; -import java.util.jar.Attributes.Name; -import java.util.ResourceBundle; -import java.util.MissingResourceException; -import java.text.MessageFormat; -import java.lang.Character.*; - -/** - * This class holds all necessary information to install or upgrade a extension - * on the user's disk - * - * @author Jerome Dochez - */ -public class ExtensionInfo { - - /** - *

- * public static values returned by the isCompatible method - *

- */ - public static final int COMPATIBLE = 0; - - public static final int REQUIRE_SPECIFICATION_UPGRADE = 1; - - public static final int REQUIRE_IMPLEMENTATION_UPGRADE = 2; - - public static final int REQUIRE_VENDOR_SWITCH = 3; - - public static final int INCOMPATIBLE = 4; - - /** - *

- * attributes fully describer an extension. The underlying described extension - * may be installed and requested. - *

- */ - public String title; - - public String name; - - public String specVersion; - - public String specVendor; - - public String implementationVersion; - - public String vendor; - - public String vendorId; - - public String url; - - // For I18N support - private static final ResourceBundle rb = ResourceBundle - .getBundle("sun.misc.resources.Messages"); - - /** - *

- * Create a new uninitialized extension information object - *

- */ - public ExtensionInfo() { - } - - /** - *

- * Create and initialize an extension information object. The initialization - * uses the attributes passed as being the content of a manifest file to load - * the extension information from. Since manifest file may contain information - * on several extension they may depend on, the extension key parameter is - * prepanded to the attribute name to make the key used to retrieve the - * attribute from the manifest file - *

- * - * @param extensionKey - * unique extension key in the manifest - * @param attr - * Attributes of a manifest file - */ - public ExtensionInfo(String extensionKey, Attributes attr) - throws NullPointerException { - String s; - if (extensionKey != null) { - s = extensionKey + "-"; - } else { - s = ""; - } - - String attrKey = s + Name.EXTENSION_NAME.toString(); - name = attr.getValue(attrKey); - if (name != null) - name = name.trim(); - - attrKey = s + Name.SPECIFICATION_TITLE.toString(); - title = attr.getValue(attrKey); - if (title != null) - title = title.trim(); - - attrKey = s + Name.SPECIFICATION_VERSION.toString(); - specVersion = attr.getValue(attrKey); - if (specVersion != null) - specVersion = specVersion.trim(); - - attrKey = s + Name.SPECIFICATION_VENDOR.toString(); - specVendor = attr.getValue(attrKey); - if (specVendor != null) - specVendor = specVendor.trim(); - - attrKey = s + Name.IMPLEMENTATION_VERSION.toString(); - implementationVersion = attr.getValue(attrKey); - if (implementationVersion != null) - implementationVersion = implementationVersion.trim(); - - attrKey = s + Name.IMPLEMENTATION_VENDOR.toString(); - vendor = attr.getValue(attrKey); - if (vendor != null) - vendor = vendor.trim(); - - attrKey = s + Name.IMPLEMENTATION_VENDOR_ID.toString(); - vendorId = attr.getValue(attrKey); - if (vendorId != null) - vendorId = vendorId.trim(); - - attrKey = s + Name.IMPLEMENTATION_URL.toString(); - url = attr.getValue(attrKey); - if (url != null) - url = url.trim(); - } - - /** - *

- * - * @return true if the extension described by this extension information is - * compatible with the extension described by the extension - * information passed as a parameter - *

- * - * @param the - * requested extension information to compare to - */ - public int isCompatibleWith(ExtensionInfo ei) { - - if (name == null || ei.name == null) - return INCOMPATIBLE; - if (name.compareTo(ei.name) == 0) { - // is this true, if not spec version is specified, we consider - // the value as being "any". - if (specVersion == null || ei.specVersion == null) - return COMPATIBLE; - - int version = compareExtensionVersion(specVersion, ei.specVersion); - if (version < 0) { - // this extension specification is "older" - if (vendorId != null && ei.vendorId != null) { - if (vendorId.compareTo(ei.vendorId) != 0) { - return REQUIRE_VENDOR_SWITCH; - } - } - return REQUIRE_SPECIFICATION_UPGRADE; - } else { - // the extension spec is compatible, let's look at the - // implementation attributes - if (vendorId != null && ei.vendorId != null) { - // They care who provides the extension - if (vendorId.compareTo(ei.vendorId) != 0) { - // They want to use another vendor implementation - return REQUIRE_VENDOR_SWITCH; - } else { - // Vendor matches, let's see the implementation version - if (implementationVersion != null - && ei.implementationVersion != null) { - // they care about the implementation version - version = compareExtensionVersion(implementationVersion, - ei.implementationVersion); - if (version < 0) { - // This extension is an older implementation - return REQUIRE_IMPLEMENTATION_UPGRADE; - } - } - } - } - // All othe cases, we consider the extensions to be compatible - return COMPATIBLE; - } - } - return INCOMPATIBLE; - } - - /** - *

- * helper method to print sensible information on the undelying described - * extension - *

- */ - public String toString() { - return "Extension : title(" + title + "), name(" + name + "), spec vendor(" - + specVendor + "), spec version(" + specVersion + "), impl vendor(" - + vendor + "), impl vendor id(" + vendorId + "), impl version(" - + implementationVersion + "), impl url(" + url + ")"; - } - - /* - *

helper method to compare two versions. version are in the x.y.z.t - * pattern.

- * - * @param source version to compare to - * - * @param target version used to compare against - * - * @return < 0 if source < version > 0 if source > version = 0 if source = - * version - */ - private int compareExtensionVersion(String source, String target) - throws NumberFormatException { - source = source.toLowerCase(); - target = target.toLowerCase(); - - return strictCompareExtensionVersion(source, target); - } - - /* - *

helper method to compare two versions. version are in the x.y.z.t - * pattern.

- * - * @param source version to compare to - * - * @param target version used to compare against - * - * @return < 0 if source < version > 0 if source > version = 0 if source = - * version - */ - private int strictCompareExtensionVersion(String source, String target) - throws NumberFormatException { - if (source.equals(target)) - return 0; - - StringTokenizer stk = new StringTokenizer(source, ".,"); - StringTokenizer ttk = new StringTokenizer(target, ".,"); - - // Compare number - int n = 0, m = 0, result = 0; - - // Convert token into meaning number for comparision - if (stk.hasMoreTokens()) - n = convertToken(stk.nextToken().toString()); - - // Convert token into meaning number for comparision - if (ttk.hasMoreTokens()) - m = convertToken(ttk.nextToken().toString()); - - if (n > m) - return 1; - else if (m > n) - return -1; - else { - // Look for index of "." in the string - int sIdx = source.indexOf("."); - int tIdx = target.indexOf("."); - - if (sIdx == -1) - sIdx = source.length() - 1; - - if (tIdx == -1) - tIdx = target.length() - 1; - - return strictCompareExtensionVersion(source.substring(sIdx + 1), - target.substring(tIdx + 1)); - } - } - - private int convertToken(String token) { - if (token == null || token.equals("")) - return 0; - - int charValue = 0; - int charVersion = 0; - int patchVersion = 0; - int strLength = token.length(); - int endIndex = strLength; - char lastChar; - - Object[] args = { name }; - MessageFormat mf = new MessageFormat(rb.getString("optpkg.versionerror")); - String versionError = mf.format(args); - - // Look for "-" for pre-release - int prIndex = token.indexOf("-"); - - // Look for "_" for patch release - int patchIndex = token.indexOf("_"); - - if (prIndex == -1 && patchIndex == -1) { - // This is a FCS release - try { - return Integer.parseInt(token) * 100; - } catch (NumberFormatException e) { - System.out.println(versionError); - return 0; - } - } else if (patchIndex != -1) { - // This is a patch (update) release - int prversion; - try { - // Obtain the version - prversion = Integer.parseInt(token.substring(0, patchIndex)); - - // Check to see if the patch version is in the n.n.n_nnl format (special - // release) - lastChar = token.charAt(strLength - 1); - if (Character.isLetter(lastChar)) { - // letters a-z have values from 10-35 - charValue = Character.getNumericValue(lastChar); - endIndex = strLength - 1; - - // Obtain the patch version id - patchVersion = Integer - .parseInt(token.substring(patchIndex + 1, endIndex)); - - if (charValue >= Character.getNumericValue('a') - && charValue <= Character.getNumericValue('z')) { - // This is a special release - charVersion = (patchVersion * 100) + charValue; - } else { - // character is not a a-z letter, ignore - charVersion = 0; - System.out.println(versionError); - } - } else { - // This is a regular update release. Obtain the patch version id - patchVersion = Integer - .parseInt(token.substring(patchIndex + 1, endIndex)); - } - } catch (NumberFormatException e) { - System.out.println(versionError); - return 0; - } - return prversion * 100 + (patchVersion + charVersion); - } else { - // This is a milestone release, either a early access, alpha, beta, or RC - - // Obtain the version - int mrversion; - try { - mrversion = Integer.parseInt(token.substring(0, prIndex)); - } catch (NumberFormatException e) { - System.out.println(versionError); - return 0; - } - - // Obtain the patch version string, including the milestone + version - String prString = token.substring(prIndex + 1); - - // Milestone version - String msVersion = ""; - int delta = 0; - - if (prString.indexOf("ea") != -1) { - msVersion = prString.substring(2); - delta = 50; - } else if (prString.indexOf("alpha") != -1) { - msVersion = prString.substring(5); - delta = 40; - } else if (prString.indexOf("beta") != -1) { - msVersion = prString.substring(4); - delta = 30; - } else if (prString.indexOf("rc") != -1) { - msVersion = prString.substring(2); - delta = 20; - } - - if (msVersion == null || msVersion.equals("")) { - // No version after the milestone, assume 0 - return mrversion * 100 - delta; - } else { - // Convert the milestone version - try { - return mrversion * 100 - delta + Integer.parseInt(msVersion); - } catch (NumberFormatException e) { - System.out.println(versionError); - return 0; - } - } - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java deleted file mode 100644 index 2560504443..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Copyright (c) 1999, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.io.*; -import java.util.*; -import java.util.jar.*; -import java.util.zip.*; - -/** - * This class is used to maintain mappings from packages, classes and resources - * to their enclosing JAR files. Mappings are kept at the package level except - * for class or resource files that are located at the root directory. - * URLClassLoader uses the mapping information to determine where to fetch an - * extension class or resource from. - * - * @author Zhenghua Li - * @since 1.3 - */ - -public class JarIndex { - - /** - * The hash map that maintains mappings from package/classe/resource to jar - * file list(s) - */ - private HashMap indexMap; - - /** - * The hash map that maintains mappings from jar file to - * package/class/resource lists - */ - private HashMap jarMap; - - /* - * An ordered list of jar file names. - */ - private String[] jarFiles; - - /** - * The index file name. - */ - public static final String INDEX_NAME = "META-INF/INDEX.LIST"; - - /** - * Constructs a new, empty jar index. - */ - public JarIndex() { - indexMap = new HashMap(); - jarMap = new HashMap(); - } - - /** - * Constructs a new index from the specified input stream. - * - * @param is - * the input stream containing the index data - */ - public JarIndex(InputStream is) throws IOException { - this(); - read(is); - } - - /** - * Constructs a new index for the specified list of jar files. - * - * @param files - * the list of jar files to construct the index from. - */ - public JarIndex(String[] files) throws IOException { - this(); - this.jarFiles = files; - parseJars(files); - } - - /** - * Returns the jar index, or null if none. - * - * @param jar - * the JAR file to get the index from. - * @exception IOException - * if an I/O error has occurred. - */ - public static JarIndex getJarIndex(JarFile jar, MetaIndex metaIndex) - throws IOException { - JarIndex index = null; - /* - * If metaIndex is not null, check the meta index to see if - * META-INF/INDEX.LIST is contained in jar file or not. - */ - if (metaIndex != null && !metaIndex.mayContain(INDEX_NAME)) { - return null; - } - JarEntry e = jar.getJarEntry(INDEX_NAME); - // if found, then load the index - if (e != null) { - index = new JarIndex(jar.getInputStream(e)); - } - return index; - } - - /** - * Returns the jar files that are defined in this index. - */ - public String[] getJarFiles() { - return jarFiles; - } - - /* - * Add the key, value pair to the hashmap, the value will be put in a linked - * list which is created if necessary. - */ - private void addToList(String key, String value, HashMap t) { - LinkedList list = (LinkedList) t.get(key); - if (list == null) { - list = new LinkedList(); - list.add(value); - t.put(key, list); - } else if (!list.contains(value)) { - list.add(value); - } - } - - /** - * Returns the list of jar files that are mapped to the file. - * - * @param fileName - * the key of the mapping - */ - public LinkedList get(String fileName) { - LinkedList jarFiles = null; - if ((jarFiles = (LinkedList) indexMap.get(fileName)) == null) { - /* try the package name again */ - int pos; - if ((pos = fileName.lastIndexOf("/")) != -1) { - jarFiles = (LinkedList) indexMap.get(fileName.substring(0, pos)); - } - } - return jarFiles; - } - - /** - * Add the mapping from the specified file to the specified jar file. If there - * were no mapping for the package of the specified file before, a new linked - * list will be created, the jar file is added to the list and a new mapping - * from the package to the jar file list is added to the hashmap. Otherwise, - * the jar file will be added to the end of the existing list. - * - * @param fileName - * the file name - * @param jarName - * the jar file that the file is mapped to - * - */ - public void add(String fileName, String jarName) { - String packageName; - int pos; - if ((pos = fileName.lastIndexOf("/")) != -1) { - packageName = fileName.substring(0, pos); - } else { - packageName = fileName; - } - - // add the mapping to indexMap - addToList(packageName, jarName, indexMap); - - // add the mapping to jarMap - addToList(jarName, packageName, jarMap); - } - - /** - * Go through all the jar files and construct the index table. - */ - private void parseJars(String[] files) throws IOException { - if (files == null) { - return; - } - - String currentJar = null; - - for (int i = 0; i < files.length; i++) { - currentJar = files[i]; - ZipFile zrf = new ZipFile(currentJar.replace('/', File.separatorChar)); - - Enumeration entries = zrf.entries(); - while (entries.hasMoreElements()) { - String fileName = ((ZipEntry) (entries.nextElement())).getName(); - // Index the META-INF directory, but not the index or manifest. - if (!fileName.startsWith("META-INF/") - || !(fileName.equals("META-INF/") || fileName.equals(INDEX_NAME) - || fileName.equals(JarFile.MANIFEST_NAME))) { - add(fileName, currentJar); - } - } - zrf.close(); - } - } - - /** - * Writes the index to the specified OutputStream - * - * @param out - * the output stream - * @exception IOException - * if an I/O error has occurred - */ - public void write(OutputStream out) throws IOException { - BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out, "UTF8")); - bw.write("JarIndex-Version: 1.0\n\n"); - - if (jarFiles != null) { - for (int i = 0; i < jarFiles.length; i++) { - /* print out the jar file name */ - String jar = jarFiles[i]; - bw.write(jar + "\n"); - LinkedList jarlist = (LinkedList) jarMap.get(jar); - if (jarlist != null) { - Iterator listitr = jarlist.iterator(); - while (listitr.hasNext()) { - bw.write((String) (listitr.next()) + "\n"); - } - } - bw.write("\n"); - } - bw.flush(); - } - } - - /** - * Reads the index from the specified InputStream. - * - * @param is - * the input stream - * @exception IOException - * if an I/O error has occurred - */ - public void read(InputStream is) throws IOException { - BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF8")); - String line = null; - String currentJar = null; - - /* an ordered list of jar file names */ - Vector jars = new Vector(); - - /* read until we see a .jar line */ - while ((line = br.readLine()) != null && !line.endsWith(".jar")) - ; - - for (; line != null; line = br.readLine()) { - if (line.length() == 0) - continue; - - if (line.endsWith(".jar")) { - currentJar = line; - jars.add(currentJar); - } else { - String name = line; - addToList(name, currentJar, indexMap); - addToList(currentJar, name, jarMap); - } - } - - jarFiles = (String[]) jars.toArray(new String[jars.size()]); - } - - /** - * Merges the current index into another index, taking into account the - * relative path of the current index. - * - * @param toIndex - * The destination index which the current index will merge into. - * @param path - * The relative path of the this index to the destination index. - * - */ - public void merge(JarIndex toIndex, String path) { - Iterator itr = indexMap.entrySet().iterator(); - while (itr.hasNext()) { - Map.Entry e = (Map.Entry) itr.next(); - String packageName = (String) e.getKey(); - LinkedList from_list = (LinkedList) e.getValue(); - Iterator listItr = from_list.iterator(); - while (listItr.hasNext()) { - String jarName = (String) listItr.next(); - if (path != null) { - jarName = path.concat(jarName); - } - toIndex.add(packageName, jarName); - } - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java deleted file mode 100644 index 124dde1d05..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java +++ /dev/null @@ -1,265 +0,0 @@ -/* - * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.io.BufferedReader; -import java.io.FileReader; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/* - * MetaIndex is intended to decrease startup time (in particular cold - * start, when files are not yet in the disk cache) by providing a - * quick reject mechanism for probes into jar files. The on-disk - * representation of the meta-index is a flat text file with per-jar - * entries indicating (generally speaking) prefixes of package names - * contained in the jar. As an example, here is an edited excerpt of - * the meta-index generated for jre/lib in the current build: - * -
-% VERSION 1
-# charsets.jar
-sun/
-# jce.jar
-javax/
-! jsse.jar
-sun/
-com/sun/net/
-javax/
-com/sun/security/
-@ resources.jar
-com/sun/xml/
-com/sun/rowset/
-com/sun/org/
-sun/
-com/sun/imageio/
-javax/
-com/sun/java/swing/
-META-INF/services/
-com/sun/java/util/jar/pack/
-com/sun/corba/
-com/sun/jndi/
-! rt.jar
-org/w3c/
-com/sun/imageio/
-javax/
-sunw/util/
-java/
-sun/
-...
-
- *

A few notes about the design of the meta-index: - * - *

    - * - *
  • It contains entries for multiple jar files. This is - * intentional, to reduce the number of disk accesses that need to be - * performed during startup. - * - *
  • It is only intended to act as a fast reject mechanism to - * prevent application and other classes from forcing all jar files on - * the boot and extension class paths to be opened. It is not intended - * as a precise index of the contents of the jar. - * - *
  • It should be as small as possible to reduce the amount of time - * required to parse it during startup. For example, adding on the - * secondary package element to java/ and javax/ packages - * ("javax/swing/", for example) causes the meta-index to grow - * significantly. This is why substrings of the packages have been - * chosen as the principal contents. - * - *
  • It is versioned, and optional, to prevent strong dependencies - * between the JVM and JDK. It is also potentially applicable to more - * than just the boot and extension class paths. - * - *
  • Precisely speaking, it plays different role in JVM and J2SE - * side. On the JVM side, meta-index file is used to speed up locating the - * class files only while on the J2SE side, meta-index file is used to speed - * up the resources file & class file. - * To help the JVM and J2SE code to better utilize the information in meta-index - * file, we mark the jar file differently. Here is the current rule we use. - * For jar file containing only class file, we put '!' before the jar file name; - * for jar file containing only resources file, we put '@' before the jar file name; - * for jar file containing both resources and class file, we put '#' before the - * jar name. - * Notice the fact that every jar file contains at least the manifest file, so when - * we say "jar file containing only class file", we don't include that file. - * - *
- * - *

To avoid changing the behavior of the current application - * loader and other loaders, the current MetaIndex implementation in - * the JDK requires that the directory containing the meta-index be - * registered with the MetaIndex class before construction of the - * associated URLClassPath. This prevents the need for automatic - * searching for the meta-index in the URLClassPath code and potential - * changes in behavior for non-core ClassLoaders. - * - * This class depends on make/tools/MetaIndex/BuildMetaIndex.java and - * is used principally by sun.misc.URLClassPath. - */ - -public class MetaIndex { - // Maps jar file names in registered directories to meta-indices - private static volatile Map jarMap; - - // List of contents of this meta-index - private String[] contents; - - // Indicate whether the coresponding jar file is a pure class jar file or not - private boolean isClassOnlyJar; - - // ---------------------------------------------------------------------- - // Registration of directories (which can cause parsing of the - // meta-index file if it is present), and fetching of parsed - // meta-indices - // jarMap is not strictly thread-safe when the meta index mechanism - // is extended for user-provided jar files in future. - - public static MetaIndex forJar(File jar) { - return getJarMap().get(jar); - } - - // 'synchronized' is added to protect the jarMap from being modified - // by multiple threads. - public static synchronized void registerDirectory(File dir) { - // Note that this does not currently check to see whether the - // directory has previously been registered, since the meta-index - // in a particular directory creates multiple entries in the - // jarMap. If this mechanism is extended beyond the boot and - // extension class paths (for example, automatically searching for - // meta-index files in directories containing jars which have been - // explicitly opened) then this code should be generalized. - // - // This method must be called from a privileged context. - File indexFile = new File(dir, "meta-index"); - if (indexFile.exists()) { - try { - BufferedReader reader = new BufferedReader(new FileReader(indexFile)); - String line = null; - String curJarName = null; - boolean isCurJarContainClassOnly = false; - List contents = new ArrayList(); - Map map = getJarMap(); - - /* Convert dir into canonical form. */ - dir = dir.getCanonicalFile(); - /* - * Note: The first line should contain the version of the meta-index - * file. We have to match the right version before trying to parse this - * file. - */ - line = reader.readLine(); - if (line == null || !line.equals("% VERSION 2")) { - reader.close(); - return; - } - while ((line = reader.readLine()) != null) { - switch (line.charAt(0)) { - case '!': - case '#': - case '@': { - // Store away current contents, if any - if ((curJarName != null) && (contents.size() > 0)) { - map.put(new File(dir, curJarName), - new MetaIndex(contents, isCurJarContainClassOnly)); - - contents.clear(); - } - // Fetch new current jar file name - curJarName = line.substring(2); - if (line.charAt(0) == '!') { - isCurJarContainClassOnly = true; - } else if (isCurJarContainClassOnly) { - isCurJarContainClassOnly = false; - } - - break; - } - case '%': - break; - default: { - contents.add(line); - } - } - } - // Store away current contents, if any - if ((curJarName != null) && (contents.size() > 0)) { - map.put(new File(dir, curJarName), - new MetaIndex(contents, isCurJarContainClassOnly)); - } - - reader.close(); - - } catch (IOException e) { - // Silently fail for now (similar behavior to elsewhere in - // extension and core loaders) - } - } - } - - // ---------------------------------------------------------------------- - // Public APIs - // - - public boolean mayContain(String entry) { - // Ask non-class file from class only jar returns false - // This check is important to avoid some class only jar - // files such as rt.jar are opened for resource request. - if (isClassOnlyJar && !entry.endsWith(".class")) { - return false; - } - - String[] conts = contents; - for (int i = 0; i < conts.length; i++) { - if (entry.startsWith(conts[i])) { - return true; - } - } - return false; - } - - // ---------------------------------------------------------------------- - // Implementation only below this point - // @IllegalArgumentException if entries is null. - private MetaIndex(List entries, boolean isClassOnlyJar) - throws IllegalArgumentException { - if (entries == null) { - throw new IllegalArgumentException(); - } - - contents = entries.toArray(new String[0]); - this.isClassOnlyJar = isClassOnlyJar; - } - - private static Map getJarMap() { - if (jarMap == null) { - synchronized (MetaIndex.class) { - if (jarMap == null) { - jarMap = new HashMap(); - } - } - } - assert jarMap != null; - return jarMap; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java deleted file mode 100644 index 960ff58b71..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.io.EOFException; -import java.net.URL; -import java.io.IOException; -import java.io.InterruptedIOException; -import java.io.InputStream; -import java.security.CodeSigner; -import java.util.jar.Manifest; -import java.nio.ByteBuffer; -import java.util.Arrays; -import com.sun.ts.lib.util.sec.nio.ByteBuffered; - -/** - * This class is used to represent a Resource that has been loaded from the - * class path. - * - * @author David Connelly - * @since 1.2 - */ -public abstract class Resource { - /** - * Returns the name of the Resource. - */ - public abstract String getName(); - - /** - * Returns the URL of the Resource. - */ - public abstract URL getURL(); - - /** - * Returns the CodeSource URL for the Resource. - */ - public abstract URL getCodeSourceURL(); - - /** - * Returns an InputStream for reading the Resource data. - */ - public abstract InputStream getInputStream() throws IOException; - - /** - * Returns the length of the Resource data, or -1 if unknown. - */ - public abstract int getContentLength() throws IOException; - - private InputStream cis; - - /* Cache result in case getBytes is called after getByteBuffer. */ - private synchronized InputStream cachedInputStream() throws IOException { - if (cis == null) { - cis = getInputStream(); - } - return cis; - } - - /** - * Returns the Resource data as an array of bytes. - */ - public byte[] getBytes() throws IOException { - byte[] b; - // Get stream before content length so that a FileNotFoundException - // can propagate upwards without being caught too early - InputStream in = cachedInputStream(); - - // This code has been uglified to protect against interrupts. - // Even if a thread has been interrupted when loading resources, - // the IO should not abort, so must carefully retry, failing only - // if the retry leads to some other IO exception. - - boolean isInterrupted = Thread.interrupted(); - int len; - for (;;) { - try { - len = getContentLength(); - break; - } catch (InterruptedIOException iioe) { - Thread.interrupted(); - isInterrupted = true; - } - } - - try { - b = new byte[0]; - if (len == -1) - len = Integer.MAX_VALUE; - int pos = 0; - while (pos < len) { - int bytesToRead; - if (pos >= b.length) { // Only expand when there's no room - bytesToRead = Math.min(len - pos, b.length + 1024); - if (b.length < pos + bytesToRead) { - b = Arrays.copyOf(b, pos + bytesToRead); - } - } else { - bytesToRead = b.length - pos; - } - int cc = 0; - try { - cc = in.read(b, pos, bytesToRead); - } catch (InterruptedIOException iioe) { - Thread.interrupted(); - isInterrupted = true; - } - if (cc < 0) { - if (len != Integer.MAX_VALUE) { - throw new EOFException("Detect premature EOF"); - } else { - if (b.length != pos) { - b = Arrays.copyOf(b, pos); - } - break; - } - } - pos += cc; - } - } finally { - try { - in.close(); - } catch (InterruptedIOException iioe) { - isInterrupted = true; - } catch (IOException ignore) { - } - - if (isInterrupted) { - Thread.currentThread().interrupt(); - } - } - return b; - } - - /** - * Returns the Resource data as a ByteBuffer, but only if the input stream was - * implemented on top of a ByteBuffer. Return null otherwise. - */ - public ByteBuffer getByteBuffer() throws IOException { - InputStream in = cachedInputStream(); - if (in instanceof ByteBuffered) { - return ((ByteBuffered) in).getByteBuffer(); - } - return null; - } - - /** - * Returns the Manifest for the Resource, or null if none. - */ - public Manifest getManifest() throws IOException { - return null; - } - - /** - * Returns theCertificates for the Resource, or null if none. - */ - public java.security.cert.Certificate[] getCertificates() { - return null; - } - - /** - * Returns the code signers for the Resource, or null if none. - */ - public CodeSigner[] getCodeSigners() { - return null; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java deleted file mode 100644 index 07a7af7e3e..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.util.jar.JarFile; -import java.io.Console; -import java.io.File; -import java.io.FileDescriptor; -import java.security.ProtectionDomain; - -import java.security.AccessController; - -/** - * A repository of "shared secrets", which are a mechanism for calling - * implementation-private methods in another package without using reflection. A - * package-private class implements a public interface and provides the ability - * to call package-private methods within that package; the object implementing - * that interface is provided through a third package to which access is - * restricted. This framework avoids the primary disadvantage of using - * reflection for this purpose, namely the loss of compile-time checking. - */ - -public class SharedSecrets { - private static final Unsafe unsafe = Unsafe.getUnsafe(); - - private static JavaUtilJarAccess javaUtilJarAccess; - - private static JavaLangAccess javaLangAccess; - - private static JavaIOAccess javaIOAccess; - - private static JavaIODeleteOnExitAccess javaIODeleteOnExitAccess; - - private static JavaNetAccess javaNetAccess; - - private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess; - - private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess; - - private static JavaSecurityAccess javaSecurityAccess; - - public static JavaUtilJarAccess javaUtilJarAccess() { - if (javaUtilJarAccess == null) { - // Ensure JarFile is initialized; we know that that class - // provides the shared secret - unsafe.ensureClassInitialized(JarFile.class); - } - return javaUtilJarAccess; - } - - public static void setJavaUtilJarAccess(JavaUtilJarAccess access) { - javaUtilJarAccess = access; - } - - public static void setJavaLangAccess(JavaLangAccess jla) { - javaLangAccess = jla; - } - - public static JavaLangAccess getJavaLangAccess() { - return javaLangAccess; - } - - public static void setJavaNetAccess(JavaNetAccess jna) { - javaNetAccess = jna; - } - - public static JavaNetAccess getJavaNetAccess() { - return javaNetAccess; - } - - public static void setJavaIOAccess(JavaIOAccess jia) { - javaIOAccess = jia; - } - - public static JavaIOAccess getJavaIOAccess() { - if (javaIOAccess == null) { - unsafe.ensureClassInitialized(Console.class); - } - return javaIOAccess; - } - - public static void setJavaIODeleteOnExitAccess( - JavaIODeleteOnExitAccess jida) { - javaIODeleteOnExitAccess = jida; - } - - public static JavaIODeleteOnExitAccess getJavaIODeleteOnExitAccess() { - if (javaIODeleteOnExitAccess == null) { - unsafe.ensureClassInitialized(File.class); - } - return javaIODeleteOnExitAccess; - } - - public static void setJavaIOFileDescriptorAccess( - JavaIOFileDescriptorAccess jiofda) { - javaIOFileDescriptorAccess = jiofda; - } - - public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() { - if (javaIOFileDescriptorAccess == null) - unsafe.ensureClassInitialized(FileDescriptor.class); - - return javaIOFileDescriptorAccess; - } - - public static void setJavaSecurityProtectionDomainAccess( - JavaSecurityProtectionDomainAccess jspda) { - javaSecurityProtectionDomainAccess = jspda; - } - - public static JavaSecurityProtectionDomainAccess getJavaSecurityProtectionDomainAccess() { - if (javaSecurityProtectionDomainAccess == null) - unsafe.ensureClassInitialized(ProtectionDomain.class); - - return javaSecurityProtectionDomainAccess; - } - - public static void setJavaSecurityAccess(JavaSecurityAccess jsa) { - javaSecurityAccess = jsa; - } - - public static JavaSecurityAccess getJavaSecurityAccess() { - if (javaSecurityAccess == null) { - unsafe.ensureClassInitialized(AccessController.class); - } - return javaSecurityAccess; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java deleted file mode 100644 index eb07ea201c..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java +++ /dev/null @@ -1,997 +0,0 @@ -/* - * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.util.Enumeration; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.Hashtable; -import java.util.NoSuchElementException; -import java.util.Stack; -import java.util.Set; -import java.util.HashSet; -import java.util.StringTokenizer; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.jar.JarFile; -import com.sun.ts.lib.util.sec.misc.JarIndex; -import com.sun.ts.lib.util.sec.misc.InvalidJarIndexException; -import com.sun.ts.lib.util.sec.net.www.ParseUtil; -import java.util.zip.ZipEntry; -import java.util.jar.JarEntry; -import java.util.jar.Manifest; -import java.util.jar.Attributes; -import java.util.jar.Attributes.Name; -import java.net.JarURLConnection; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLConnection; -import java.net.HttpURLConnection; -import java.net.URLStreamHandler; -import java.net.URLStreamHandlerFactory; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.security.AccessController; -import java.security.AccessControlException; -import java.security.CodeSigner; -import java.security.Permission; -import java.security.PrivilegedAction; -import java.security.PrivilegedExceptionAction; -import java.security.cert.Certificate; -import com.sun.ts.lib.util.sec.misc.FileURLMapper; - -/** - * This class is used to maintain a search path of URLs for loading classes and - * resources from both JAR files and directories. - * - * @author David Connelly - */ -public class URLClassPath { - final static String USER_AGENT_JAVA_VERSION = "UA-Java-Version"; - - final static String JAVA_VERSION; - - private static final boolean DEBUG; - - static { - JAVA_VERSION = java.security.AccessController.doPrivileged( - new com.sun.ts.lib.util.sec.security.action.GetPropertyAction( - "java.version")); - DEBUG = (java.security.AccessController.doPrivileged( - new com.sun.ts.lib.util.sec.security.action.GetPropertyAction( - "sun.misc.URLClassPath.debug")) != null); - } - - /* The original search path of URLs. */ - private ArrayList path = new ArrayList(); - - /* The stack of unopened URLs */ - Stack urls = new Stack(); - - /* The resulting search path of Loaders */ - ArrayList loaders = new ArrayList(); - - /* Map of each URL opened to its corresponding Loader */ - HashMap lmap = new HashMap(); - - /* The jar protocol handler to use when creating new URLs */ - private URLStreamHandler jarHandler; - - /** - * Creates a new URLClassPath for the given URLs. The URLs will be searched in - * the order specified for classes and resources. A URL ending with a '/' is - * assumed to refer to a directory. Otherwise, the URL is assumed to refer to - * a JAR file. - * - * @param urls - * the directory and JAR file URLs to search for classes and - * resources - * @param factory - * the URLStreamHandlerFactory to use when creating new URLs - */ - public URLClassPath(URL[] urls, URLStreamHandlerFactory factory) { - for (int i = 0; i < urls.length; i++) { - path.add(urls[i]); - } - push(urls); - if (factory != null) { - jarHandler = factory.createURLStreamHandler("jar"); - } - } - - public URLClassPath(URL[] urls) { - this(urls, null); - } - - /** - * Appends the specified URL to the search path of directory and JAR file URLs - * from which to load classes and resources. - */ - public void addURL(URL url) { - synchronized (urls) { - if (path.contains(url)) - return; - - urls.add(0, url); - path.add(url); - } - } - - /** - * Returns the original search path of URLs. - */ - public URL[] getURLs() { - synchronized (urls) { - return (URL[]) path.toArray(new URL[path.size()]); - } - } - - /** - * Finds the resource with the specified name on the URL search path or null - * if not found or security check fails. - * - * @param name - * the name of the resource - * @param check - * whether to perform a security check - * @return a URL for the resource, or null if the - * resource could not be found. - */ - public URL findResource(String name, boolean check) { - Loader loader; - for (int i = 0; (loader = getLoader(i)) != null; i++) { - URL url = loader.findResource(name, check); - if (url != null) { - return url; - } - } - return null; - } - - /** - * Finds the first Resource on the URL search path which has the specified - * name. Returns null if no Resource could be found. - * - * @param name - * the name of the Resource - * @param check - * whether to perform a security check - * @return the Resource, or null if not found - */ - public Resource getResource(String name, boolean check) { - if (DEBUG) { - System.err.println("URLClassPath.getResource(\"" + name + "\")"); - } - - Loader loader; - for (int i = 0; (loader = getLoader(i)) != null; i++) { - Resource res = loader.getResource(name, check); - if (res != null) { - return res; - } - } - return null; - } - - /** - * Finds all resources on the URL search path with the given name. Returns an - * enumeration of the URL objects. - * - * @param name - * the resource name - * @return an Enumeration of all the urls having the specified name - */ - public Enumeration findResources(final String name, final boolean check) { - return new Enumeration() { - private int index = 0; - - private URL url = null; - - private boolean next() { - if (url != null) { - return true; - } else { - Loader loader; - while ((loader = getLoader(index++)) != null) { - url = loader.findResource(name, check); - if (url != null) { - return true; - } - } - return false; - } - } - - public boolean hasMoreElements() { - return next(); - } - - public Object nextElement() { - if (!next()) { - throw new NoSuchElementException(); - } - URL u = url; - url = null; - return u; - } - }; - } - - public Resource getResource(String name) { - return getResource(name, true); - } - - /** - * Finds all resources on the URL search path with the given name. Returns an - * enumeration of the Resource objects. - * - * @param name - * the resource name - * @return an Enumeration of all the resources having the specified name - */ - public Enumeration getResources(final String name, final boolean check) { - return new Enumeration() { - private int index = 0; - - private Resource res = null; - - private boolean next() { - if (res != null) { - return true; - } else { - Loader loader; - while ((loader = getLoader(index++)) != null) { - res = loader.getResource(name, check); - if (res != null) { - return true; - } - } - return false; - } - } - - public boolean hasMoreElements() { - return next(); - } - - public Object nextElement() { - if (!next()) { - throw new NoSuchElementException(); - } - Resource r = res; - res = null; - return r; - } - }; - } - - public Enumeration getResources(final String name) { - return getResources(name, true); - } - - /* - * Returns the Loader at the specified position in the URL search path. The - * URLs are opened and expanded as needed. Returns null if the specified index - * is out of range. - */ - private synchronized Loader getLoader(int index) { - // Expand URL search path until the request can be satisfied - // or the URL stack is empty. - while (loaders.size() < index + 1) { - // Pop the next URL from the URL stack - URL url; - synchronized (urls) { - if (urls.empty()) { - return null; - } else { - url = (URL) urls.pop(); - } - } - // Skip this URL if it already has a Loader. (Loader - // may be null in the case where URL has not been opened - // but is referenced by a JAR index.) - if (lmap.containsKey(url)) { - continue; - } - // Otherwise, create a new Loader for the URL. - Loader loader; - try { - loader = getLoader(url); - // If the loader defines a local class path then add the - // URLs to the list of URLs to be opened. - URL[] urls = loader.getClassPath(); - if (urls != null) { - push(urls); - } - } catch (IOException e) { - // Silently ignore for now... - continue; - } - // Finally, add the Loader to the search path. - loaders.add(loader); - lmap.put(url, loader); - } - return (Loader) loaders.get(index); - } - - /* - * Returns the Loader for the specified base URL. - */ - private Loader getLoader(final URL url) throws IOException { - try { - return (Loader) java.security.AccessController - .doPrivileged(new java.security.PrivilegedExceptionAction() { - public Object run() throws IOException { - String file = url.getFile(); - if (file != null && file.endsWith("/")) { - if ("file".equals(url.getProtocol())) { - return new FileLoader(url); - } else { - return new Loader(url); - } - } else { - return new JarLoader(url, jarHandler, lmap); - } - } - }); - } catch (java.security.PrivilegedActionException pae) { - throw (IOException) pae.getException(); - } - } - - /* - * Pushes the specified URLs onto the list of unopened URLs. - */ - private void push(URL[] us) { - synchronized (urls) { - for (int i = us.length - 1; i >= 0; --i) { - urls.push(us[i]); - } - } - } - - /** - * Convert class path specification into an array of file URLs. - * - * The path of the file is encoded before conversion into URL form so that - * reserved characters can safely appear in the path. - */ - public static URL[] pathToURLs(String path) { - StringTokenizer st = new StringTokenizer(path, File.pathSeparator); - URL[] urls = new URL[st.countTokens()]; - int count = 0; - while (st.hasMoreTokens()) { - File f = new File(st.nextToken()); - try { - f = new File(f.getCanonicalPath()); - } catch (IOException x) { - // use the non-canonicalized filename - } - try { - urls[count++] = ParseUtil.fileToEncodedURL(f); - } catch (IOException x) { - } - } - - if (urls.length != count) { - URL[] tmp = new URL[count]; - System.arraycopy(urls, 0, tmp, 0, count); - urls = tmp; - } - return urls; - } - - /* - * Check whether the resource URL should be returned. Return null on security - * check failure. Called by java.net.URLClassLoader. - */ - public URL checkURL(URL url) { - - return url; - } - - /** - * Inner class used to represent a loader of resources and classes from a base - * URL. - */ - private static class Loader { - private final URL base; - - /* - * Creates a new Loader for the specified URL. - */ - Loader(URL url) { - base = url; - } - - /* - * Returns the base URL for this Loader. - */ - URL getBaseURL() { - return base; - } - - URL findResource(final String name, boolean check) { - URL url; - try { - url = new URL(base, ParseUtil.encodePath(name, false)); - } catch (MalformedURLException e) { - throw new IllegalArgumentException("name"); - } - - try { - - /* - * For a HTTP connection we use the HEAD method to check if the resource - * exists. - */ - URLConnection uc = url.openConnection(); - if (uc instanceof HttpURLConnection) { - HttpURLConnection hconn = (HttpURLConnection) uc; - hconn.setRequestMethod("HEAD"); - if (hconn.getResponseCode() >= HttpURLConnection.HTTP_BAD_REQUEST) { - return null; - } - } else { - // our best guess for the other cases - InputStream is = url.openStream(); - is.close(); - } - return url; - } catch (Exception e) { - return null; - } - } - - Resource getResource(final String name, boolean check) { - final URL url; - try { - url = new URL(base, ParseUtil.encodePath(name, false)); - } catch (MalformedURLException e) { - throw new IllegalArgumentException("name"); - } - final URLConnection uc; - try { - uc = url.openConnection(); - InputStream in = uc.getInputStream(); - } catch (Exception e) { - return null; - } - return new Resource() { - public String getName() { - return name; - } - - public URL getURL() { - return url; - } - - public URL getCodeSourceURL() { - return base; - } - - public InputStream getInputStream() throws IOException { - return uc.getInputStream(); - } - - public int getContentLength() throws IOException { - return uc.getContentLength(); - } - }; - } - - /* - * Returns the Resource for the specified name, or null if not found or the - * caller does not have the permission to get the resource. - */ - Resource getResource(final String name) { - return getResource(name, true); - } - - /* - * Returns the local class path for this loader, or null if none. - */ - URL[] getClassPath() throws IOException { - return null; - } - } - - /* - * Inner class used to represent a Loader of resources from a JAR URL. - */ - static class JarLoader extends Loader { - private JarFile jar; - - private URL csu; - - private JarIndex index; - - private MetaIndex metaIndex; - - private URLStreamHandler handler; - - private HashMap lmap; - - /* - * Creates a new JarLoader for the specified URL referring to a JAR file. - */ - JarLoader(URL url, URLStreamHandler jarHandler, HashMap loaderMap) - throws IOException { - super(new URL("jar", "", -1, url + "!/", jarHandler)); - csu = url; - handler = jarHandler; - lmap = loaderMap; - - if (!isOptimizable(url)) { - ensureOpen(); - } else { - String fileName = url.getFile(); - if (fileName != null) { - fileName = ParseUtil.decode(fileName); - File f = new File(fileName); - metaIndex = MetaIndex.forJar(f); - // If the meta index is found but the file is not - // installed, set metaIndex to null. A typical - // senario is charsets.jar which won't be installed - // when the user is running in certain locale environment. - // The side effect of null metaIndex will cause - // ensureOpen get called so that IOException is thrown. - if (metaIndex != null && !f.exists()) { - metaIndex = null; - } - } - - // metaIndex is null when either there is no such jar file - // entry recorded in meta-index file or such jar file is - // missing in JRE. See bug 6340399. - if (metaIndex == null) { - ensureOpen(); - } - } - } - - JarFile getJarFile() { - return jar; - } - - private boolean isOptimizable(URL url) { - return "file".equals(url.getProtocol()); - } - - private void ensureOpen() throws IOException { - if (jar == null) { - try { - java.security.AccessController - .doPrivileged(new java.security.PrivilegedExceptionAction() { - public Object run() throws IOException { - if (DEBUG) { - System.err.println("Opening " + csu); - Thread.dumpStack(); - } - - jar = getJarFile(csu); - index = JarIndex.getJarIndex(jar, metaIndex); - if (index != null) { - String[] jarfiles = index.getJarFiles(); - // Add all the dependent URLs to the lmap so that loaders - // will not be created for them by - // URLClassPath.getLoader(int) - // if the same URL occurs later on the main class path. We - // set - // Loader to null here to avoid creating a Loader for each - // URL until we actually need to try to load something from - // them. - for (int i = 0; i < jarfiles.length; i++) { - try { - URL jarURL = new URL(csu, jarfiles[i]); - // If a non-null loader already exists, leave it alone. - if (!lmap.containsKey(jarURL)) { - lmap.put(jarURL, null); - } - } catch (MalformedURLException e) { - continue; - } - } - } - return null; - } - }); - } catch (java.security.PrivilegedActionException pae) { - throw (IOException) pae.getException(); - } - } - } - - private JarFile getJarFile(URL url) throws IOException { - // Optimize case where url refers to a local jar file - if (isOptimizable(url)) { - FileURLMapper p = new FileURLMapper(url); - if (!p.exists()) { - throw new FileNotFoundException(p.getPath()); - } - return new JarFile(p.getPath()); - } - URLConnection uc = getBaseURL().openConnection(); - uc.setRequestProperty(USER_AGENT_JAVA_VERSION, JAVA_VERSION); - return ((JarURLConnection) uc).getJarFile(); - } - - /* - * Returns the index of this JarLoader if it exists. - */ - JarIndex getIndex() { - try { - ensureOpen(); - } catch (IOException e) { - throw (InternalError) new InternalError().initCause(e); - } - return index; - } - - /* - * Creates the resource and if the check flag is set to true, checks if is - * its okay to return the resource. - */ - Resource checkResource(final String name, boolean check, - final JarEntry entry) { - - final URL url; - try { - url = new URL(getBaseURL(), ParseUtil.encodePath(name, false)); - } catch (MalformedURLException e) { - return null; - // throw new IllegalArgumentException("name"); - } catch (IOException e) { - return null; - } - - return new Resource() { - public String getName() { - return name; - } - - public URL getURL() { - return url; - } - - public URL getCodeSourceURL() { - return csu; - } - - public InputStream getInputStream() throws IOException { - return jar.getInputStream(entry); - } - - public int getContentLength() { - return (int) entry.getSize(); - } - - public Manifest getManifest() throws IOException { - return jar.getManifest(); - }; - - public Certificate[] getCertificates() { - return entry.getCertificates(); - }; - - public CodeSigner[] getCodeSigners() { - return entry.getCodeSigners(); - }; - }; - } - - /* - * Returns true iff atleast one resource in the jar file has the same - * package name as that of the specified resource name. - */ - boolean validIndex(final String name) { - String packageName = name; - int pos; - if ((pos = name.lastIndexOf("/")) != -1) { - packageName = name.substring(0, pos); - } - - String entryName; - ZipEntry entry; - Enumeration enum_ = jar.entries(); - while (enum_.hasMoreElements()) { - entry = (ZipEntry) enum_.nextElement(); - entryName = entry.getName(); - if ((pos = entryName.lastIndexOf("/")) != -1) - entryName = entryName.substring(0, pos); - if (entryName.equals(packageName)) { - return true; - } - } - return false; - } - - /* - * Returns the URL for a resource with the specified name - */ - URL findResource(final String name, boolean check) { - Resource rsc = getResource(name, check); - if (rsc != null) { - return rsc.getURL(); - } - return null; - } - - /* - * Returns the JAR Resource for the specified name. - */ - Resource getResource(final String name, boolean check) { - if (metaIndex != null) { - if (!metaIndex.mayContain(name)) { - return null; - } - } - - try { - ensureOpen(); - } catch (IOException e) { - throw (InternalError) new InternalError().initCause(e); - } - final JarEntry entry = jar.getJarEntry(name); - if (entry != null) - return checkResource(name, check, entry); - - if (index == null) - return null; - - HashSet visited = new HashSet(); - return getResource(name, check, visited); - } - - /* - * Version of getResource() that tracks the jar files that have been visited - * by linking through the index files. This helper method uses a HashSet to - * store the URLs of jar files that have been searched and uses it to avoid - * going into an infinite loop, looking for a non-existent resource - */ - Resource getResource(final String name, boolean check, Set visited) { - - Resource res; - Object[] jarFiles; - boolean done = false; - int count = 0; - LinkedList jarFilesList = null; - - /* - * If there no jar files in the index that can potential contain this - * resource then return immediately. - */ - if ((jarFilesList = index.get(name)) == null) - return null; - - do { - jarFiles = jarFilesList.toArray(); - int size = jarFilesList.size(); - /* loop through the mapped jar file list */ - while (count < size) { - String jarName = (String) jarFiles[count++]; - JarLoader newLoader; - final URL url; - - try { - url = new URL(csu, jarName); - if ((newLoader = (JarLoader) lmap.get(url)) == null) { - /* - * no loader has been set up for this jar file before - */ - newLoader = (JarLoader) AccessController - .doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws IOException { - return new JarLoader(url, handler, lmap); - } - }); - - /* - * this newly opened jar file has its own index, merge it into the - * parent's index, taking into account the relative path. - */ - JarIndex newIndex = newLoader.getIndex(); - if (newIndex != null) { - int pos = jarName.lastIndexOf("/"); - newIndex.merge(this.index, - (pos == -1 ? null : jarName.substring(0, pos + 1))); - } - - /* put it in the global hashtable */ - lmap.put(url, newLoader); - } - } catch (java.security.PrivilegedActionException pae) { - continue; - } catch (MalformedURLException e) { - continue; - } - - /* - * Note that the addition of the url to the list of visited jars - * incorporates a check for presence in the hashmap - */ - boolean visitedURL = !visited.add(url); - if (!visitedURL) { - try { - newLoader.ensureOpen(); - } catch (IOException e) { - throw (InternalError) new InternalError().initCause(e); - } - final JarEntry entry = newLoader.jar.getJarEntry(name); - if (entry != null) { - return newLoader.checkResource(name, check, entry); - } - - /* - * Verify that at least one other resource with the same package - * name as the lookedup resource is present in the new jar - */ - if (!newLoader.validIndex(name)) { - /* the mapping is wrong */ - throw new InvalidJarIndexException("Invalid index"); - } - } - - /* - * If newLoader is the current loader or if it is a loader that has - * already been searched or if the new loader does not have an index - * then skip it and move on to the next loader. - */ - if (visitedURL || newLoader == this || newLoader.getIndex() == null) { - continue; - } - - /* - * Process the index of the new loader - */ - if ((res = newLoader.getResource(name, check, visited)) != null) { - return res; - } - } - // Get the list of jar files again as the list could have grown - // due to merging of index files. - jarFilesList = index.get(name); - - // If the count is unchanged, we are done. - } while (count < jarFilesList.size()); - return null; - } - - /* - * Returns the JAR file local class path, or null if none. - */ - URL[] getClassPath() throws IOException { - if (index != null) { - return null; - } - - if (metaIndex != null) { - return null; - } - - ensureOpen(); - if (SharedSecrets.javaUtilJarAccess().jarFileHasClassPathAttribute(jar)) { // Only - // get - // manifest - // when - // necessary - Manifest man = jar.getManifest(); - if (man != null) { - Attributes attr = man.getMainAttributes(); - if (attr != null) { - String value = attr.getValue(Name.CLASS_PATH); - if (value != null) { - return parseClassPath(csu, value); - } - } - } - } - return null; - } - - /* - * Parses value of the Class-Path manifest attribute and returns an array of - * URLs relative to the specified base URL. - */ - private URL[] parseClassPath(URL base, String value) - throws MalformedURLException { - StringTokenizer st = new StringTokenizer(value); - URL[] urls = new URL[st.countTokens()]; - int i = 0; - while (st.hasMoreTokens()) { - String path = st.nextToken(); - urls[i] = new URL(base, path); - i++; - } - return urls; - } - } - - /* - * Inner class used to represent a loader of classes and resources from a file - * URL that refers to a directory. - */ - private static class FileLoader extends Loader { - private File dir; - - FileLoader(URL url) throws IOException { - super(url); - if (!"file".equals(url.getProtocol())) { - throw new IllegalArgumentException("url"); - } - String path = url.getFile().replace('/', File.separatorChar); - path = ParseUtil.decode(path); - dir = new File(path); - } - - /* - * Returns the URL for a resource with the specified name - */ - URL findResource(final String name, boolean check) { - Resource rsc = getResource(name, check); - if (rsc != null) { - return rsc.getURL(); - } - return null; - } - - Resource getResource(final String name, boolean check) { - final URL url; - try { - URL normalizedBase = new URL(getBaseURL(), "."); - url = new URL(getBaseURL(), ParseUtil.encodePath(name, false)); - - if (url.getFile().startsWith(normalizedBase.getFile()) == false) { - // requested resource had ../..'s in path - return null; - } - - final File file = new File(dir, name.replace('/', File.separatorChar)); - if (file.exists()) { - return new Resource() { - public String getName() { - return name; - }; - - public URL getURL() { - return url; - }; - - public URL getCodeSourceURL() { - return getBaseURL(); - }; - - public InputStream getInputStream() throws IOException { - return new FileInputStream(file); - }; - - public int getContentLength() throws IOException { - return (int) file.length(); - }; - }; - } - } catch (Exception e) { - return null; - } - return null; - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java deleted file mode 100644 index 780bcae5bb..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java +++ /dev/null @@ -1,889 +0,0 @@ -/* - * Copyright (c) 2000, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.misc; - -import java.security.*; -import java.lang.reflect.*; - -/** - * A collection of methods for performing low-level, unsafe operations. Although - * the class and all methods are public, use of this class is limited because - * only trusted code can obtain instances of it. - * - * @author John R. Rose - * @see #getUnsafe - */ - -public final class Unsafe { - - private static native void registerNatives(); - - static { - registerNatives(); - com.sun.ts.lib.util.sec.reflect.Reflection - .registerMethodsToFilter(Unsafe.class, "getUnsafe"); - } - - private Unsafe() { - } - - private static final Unsafe theUnsafe = new Unsafe(); - - /** - * Provides the caller with the capability of performing unsafe operations. - * - *

- * The returned Unsafe object should be carefully guarded by the - * caller, since it can be used to read and write data at arbitrary memory - * addresses. It must never be passed to untrusted code. - * - *

- * Most methods in this class are very low-level, and correspond to a small - * number of hardware instructions (on typical machines). Compilers are - * encouraged to optimize these methods accordingly. - * - *

- * Here is a suggested idiom for using unsafe operations: - * - *

- * - *
-   * class MyTrustedClass {
-   *   private static final Unsafe unsafe = Unsafe.getUnsafe();
-   *   ...
-   *   private long myCountAddress = ...;
-   *   public int getCount() { return unsafe.getByte(myCountAddress); }
-   * }
-   * 
- * - *
- * - * (It may assist compilers to make the local variable be final.) - * - * @exception SecurityException - * if a security manager exists and its - * checkPropertiesAccess method doesn't allow access - * to the system properties. - */ - public static Unsafe getUnsafe() { - Class cc = com.sun.ts.lib.util.sec.reflect.Reflection.getCallerClass(2); - if (cc.getClassLoader() != null) - throw new SecurityException("Unsafe"); - return theUnsafe; - } - - /// peek and poke operations - /// (compilers should optimize these to memory ops) - - // These work on object fields in the Java heap. - // They will not work on elements of packed arrays. - - /** - * Fetches a value from a given Java variable. More specifically, fetches a - * field or array element within the given object o at the given - * offset, or (if o is null) from the memory address whose - * numerical value is the given offset. - *

- * The results are undefined unless one of the following cases is true: - *

    - *
  • The offset was obtained from {@link #objectFieldOffset} on the - * {@link java.lang.reflect.Field} of some Java field and the object referred - * to by o is of a class compatible with that field's class. - * - *
  • The offset and object reference o (either null or - * non-null) were both obtained via {@link #staticFieldOffset} and - * {@link #staticFieldBase} (respectively) from the reflective {@link Field} - * representation of some Java field. - * - *
  • The object referred to by o is an array, and the offset is - * an integer of the form B+N*S, where N is a valid - * index into the array, and B and S are the values - * obtained by {@link #arrayBaseOffset} and {@link #arrayIndexScale} - * (respectively) from the array's class. The value referred to is the - * Nth element of the array. - * - *
- *

- * If one of the above cases is true, the call references a specific Java - * variable (field or array element). However, the results are undefined if - * that variable is not in fact of the type returned by this method. - *

- * This method refers to a variable by means of two parameters, and so it - * provides (in effect) a double-register addressing mode for Java - * variables. When the object reference is null, this method uses its offset - * as an absolute address. This is similar in operation to methods such as - * {@link #getInt(long)}, which provide (in effect) a single-register - * addressing mode for non-Java variables. However, because Java variables may - * have a different layout in memory from non-Java variables, programmers - * should not assume that these two addressing modes are ever equivalent. - * Also, programmers should remember that offsets from the double-register - * addressing mode cannot be portably confused with longs used in the - * single-register addressing mode. - * - * @param o - * Java heap object in which the variable resides, if any, else null - * @param offset - * indication of where the variable resides in a Java heap object, if - * any, else a memory address locating the variable statically - * @return the value fetched from the indicated Java variable - * @throws RuntimeException - * No defined exceptions are thrown, not even - * {@link NullPointerException} - */ - public native int getInt(Object o, long offset); - - /** - * Stores a value into a given Java variable. - *

- * The first two parameters are interpreted exactly as with - * {@link #getInt(Object, long)} to refer to a specific Java variable (field - * or array element). The given value is stored into that variable. - *

- * The variable must be of the same type as the method parameter - * x. - * - * @param o - * Java heap object in which the variable resides, if any, else null - * @param offset - * indication of where the variable resides in a Java heap object, if - * any, else a memory address locating the variable statically - * @param x - * the value to store into the indicated Java variable - * @throws RuntimeException - * No defined exceptions are thrown, not even - * {@link NullPointerException} - */ - public native void putInt(Object o, long offset, int x); - - /** - * Fetches a reference value from a given Java variable. - * - * @see #getInt(Object, long) - */ - public native Object getObject(Object o, long offset); - - /** - * Stores a reference value into a given Java variable. - *

- * Unless the reference x being stored is either null or matches - * the field type, the results are undefined. If the reference o - * is non-null, car marks or other store barriers for that object (if the VM - * requires them) are updated. - * - * @see #putInt(Object, int, int) - */ - public native void putObject(Object o, long offset, Object x); - - /** @see #getInt(Object, long) */ - public native boolean getBoolean(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putBoolean(Object o, long offset, boolean x); - - /** @see #getInt(Object, long) */ - public native byte getByte(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putByte(Object o, long offset, byte x); - - /** @see #getInt(Object, long) */ - public native short getShort(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putShort(Object o, long offset, short x); - - /** @see #getInt(Object, long) */ - public native char getChar(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putChar(Object o, long offset, char x); - - /** @see #getInt(Object, long) */ - public native long getLong(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putLong(Object o, long offset, long x); - - /** @see #getInt(Object, long) */ - public native float getFloat(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putFloat(Object o, long offset, float x); - - /** @see #getInt(Object, long) */ - public native double getDouble(Object o, long offset); - - /** @see #putInt(Object, int, int) */ - public native void putDouble(Object o, long offset, double x); - - /** - * This method, like all others with 32-bit offsets, was native in a previous - * release but is now a wrapper which simply casts the offset to a long value. - * It provides backward compatibility with bytecodes compiled against 1.4. - * - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public int getInt(Object o, int offset) { - return getInt(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putInt(Object o, int offset, int x) { - putInt(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public Object getObject(Object o, int offset) { - return getObject(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putObject(Object o, int offset, Object x) { - putObject(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public boolean getBoolean(Object o, int offset) { - return getBoolean(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putBoolean(Object o, int offset, boolean x) { - putBoolean(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public byte getByte(Object o, int offset) { - return getByte(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putByte(Object o, int offset, byte x) { - putByte(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public short getShort(Object o, int offset) { - return getShort(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putShort(Object o, int offset, short x) { - putShort(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public char getChar(Object o, int offset) { - return getChar(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putChar(Object o, int offset, char x) { - putChar(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public long getLong(Object o, int offset) { - return getLong(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putLong(Object o, int offset, long x) { - putLong(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public float getFloat(Object o, int offset) { - return getFloat(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putFloat(Object o, int offset, float x) { - putFloat(o, (long) offset, x); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public double getDouble(Object o, int offset) { - return getDouble(o, (long) offset); - } - - /** - * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See - * {@link #staticFieldOffset}. - */ - @Deprecated - public void putDouble(Object o, int offset, double x) { - putDouble(o, (long) offset, x); - } - - // These work on values in the C heap. - - /** - * Fetches a value from a given memory address. If the address is zero, or - * does not point into a block obtained from {@link #allocateMemory}, the - * results are undefined. - * - * @see #allocateMemory - */ - public native byte getByte(long address); - - /** - * Stores a value into a given memory address. If the address is zero, or does - * not point into a block obtained from {@link #allocateMemory}, the results - * are undefined. - * - * @see #getByte(long) - */ - public native void putByte(long address, byte x); - - /** @see #getByte(long) */ - public native short getShort(long address); - - /** @see #putByte(long, byte) */ - public native void putShort(long address, short x); - - /** @see #getByte(long) */ - public native char getChar(long address); - - /** @see #putByte(long, byte) */ - public native void putChar(long address, char x); - - /** @see #getByte(long) */ - public native int getInt(long address); - - /** @see #putByte(long, byte) */ - public native void putInt(long address, int x); - - /** @see #getByte(long) */ - public native long getLong(long address); - - /** @see #putByte(long, byte) */ - public native void putLong(long address, long x); - - /** @see #getByte(long) */ - public native float getFloat(long address); - - /** @see #putByte(long, byte) */ - public native void putFloat(long address, float x); - - /** @see #getByte(long) */ - public native double getDouble(long address); - - /** @see #putByte(long, byte) */ - public native void putDouble(long address, double x); - - /** - * Fetches a native pointer from a given memory address. If the address is - * zero, or does not point into a block obtained from {@link #allocateMemory}, - * the results are undefined. - * - *

- * If the native pointer is less than 64 bits wide, it is extended as an - * unsigned number to a Java long. The pointer may be indexed by any given - * byte offset, simply by adding that offset (as a simple integer) to the long - * representing the pointer. The number of bytes actually read from the target - * address maybe determined by consulting {@link #addressSize}. - * - * @see #allocateMemory - */ - public native long getAddress(long address); - - /** - * Stores a native pointer into a given memory address. If the address is - * zero, or does not point into a block obtained from {@link #allocateMemory}, - * the results are undefined. - * - *

- * The number of bytes actually written at the target address maybe determined - * by consulting {@link #addressSize}. - * - * @see #getAddress(long) - */ - public native void putAddress(long address, long x); - - /// wrappers for malloc, realloc, free: - - /** - * Allocates a new block of native memory, of the given size in bytes. The - * contents of the memory are uninitialized; they will generally be garbage. - * The resulting native pointer will never be zero, and will be aligned for - * all value types. Dispose of this memory by calling {@link #freeMemory}, or - * resize it with {@link #reallocateMemory}. - * - * @throws IllegalArgumentException - * if the size is negative or too large for the native size_t type - * - * @throws OutOfMemoryError - * if the allocation is refused by the system - * - * @see #getByte(long) - * @see #putByte(long, byte) - */ - public native long allocateMemory(long bytes); - - /** - * Resizes a new block of native memory, to the given size in bytes. The - * contents of the new block past the size of the old block are uninitialized; - * they will generally be garbage. The resulting native pointer will be zero - * if and only if the requested size is zero. The resulting native pointer - * will be aligned for all value types. Dispose of this memory by calling - * {@link #freeMemory}, or resize it with {@link #reallocateMemory}. The - * address passed to this method may be null, in which case an allocation will - * be performed. - * - * @throws IllegalArgumentException - * if the size is negative or too large for the native size_t type - * - * @throws OutOfMemoryError - * if the allocation is refused by the system - * - * @see #allocateMemory - */ - public native long reallocateMemory(long address, long bytes); - - /** - * Sets all bytes in a given block of memory to a fixed value (usually zero). - */ - public native void setMemory(long address, long bytes, byte value); - - /** - * Sets all bytes in a given block of memory to a copy of another block. - */ - public native void copyMemory(long srcAddress, long destAddress, long bytes); - - /** - * Disposes of a block of native memory, as obtained from - * {@link #allocateMemory} or {@link #reallocateMemory}. The address passed to - * this method may be null, in which case no action is taken. - * - * @see #allocateMemory - */ - public native void freeMemory(long address); - - /// random queries - - /** - * This constant differs from all results that will ever be returned from - * {@link #staticFieldOffset}, {@link #objectFieldOffset}, or - * {@link #arrayBaseOffset}. - */ - public static final int INVALID_FIELD_OFFSET = -1; - - /** - * Returns the offset of a field, truncated to 32 bits. This method is - * implemented as follows:

- * - *
-   * public int fieldOffset(Field f) {
-   *   if (Modifier.isStatic(f.getModifiers()))
-   *     return (int) staticFieldOffset(f);
-   *   else
-   *     return (int) objectFieldOffset(f);
-   * }
-   * 
- * - *
- * - * @deprecated As of 1.4.1, use {@link #staticFieldOffset} for static fields - * and {@link #objectFieldOffset} for non-static fields. - */ - @Deprecated - public int fieldOffset(Field f) { - if (Modifier.isStatic(f.getModifiers())) - return (int) staticFieldOffset(f); - else - return (int) objectFieldOffset(f); - } - - /** - * Returns the base address for accessing some static field in the given - * class. This method is implemented as follows:
- * - *
-   * public Object staticFieldBase(Class c) {
-   *   Field[] fields = c.getDeclaredFields();
-   *   for (int i = 0; i < fields.length; i++) {
-   *     if (Modifier.isStatic(fields[i].getModifiers())) {
-   *       return staticFieldBase(fields[i]);
-   *     }
-   *   }
-   *   return null;
-   * }
-   * 
- * - *
- * - * @deprecated As of 1.4.1, use {@link #staticFieldBase(Field)} to obtain the - * base pertaining to a specific {@link Field}. This method works - * only for JVMs which store all statics for a given class in one - * place. - */ - @Deprecated - public Object staticFieldBase(Class c) { - Field[] fields = c.getDeclaredFields(); - for (int i = 0; i < fields.length; i++) { - if (Modifier.isStatic(fields[i].getModifiers())) { - return staticFieldBase(fields[i]); - } - } - return null; - } - - /** - * Report the location of a given field in the storage allocation of its - * class. Do not expect to perform any sort of arithmetic on this offset; it - * is just a cookie which is passed to the unsafe heap memory accessors. - * - *

- * Any given field will always have the same offset and base, and no two - * distinct fields of the same class will ever have the same offset and base. - * - *

- * As of 1.4.1, offsets for fields are represented as long values, although - * the Sun JVM does not use the most significant 32 bits. However, JVM - * implementations which store static fields at absolute addresses can use - * long offsets and null base pointers to express the field locations in a - * form usable by {@link #getInt(Object,long)}. Therefore, code which will be - * ported to such JVMs on 64-bit platforms must preserve all bits of static - * field offsets. - * - * @see #getInt(Object, long) - */ - public native long staticFieldOffset(Field f); - - /** - * Report the location of a given static field, in conjunction with - * {@link #staticFieldBase}. - *

- * Do not expect to perform any sort of arithmetic on this offset; it is just - * a cookie which is passed to the unsafe heap memory accessors. - * - *

- * Any given field will always have the same offset, and no two distinct - * fields of the same class will ever have the same offset. - * - *

- * As of 1.4.1, offsets for fields are represented as long values, although - * the Sun JVM does not use the most significant 32 bits. It is hard to - * imagine a JVM technology which needs more than a few bits to encode an - * offset within a non-array object, However, for consistency with other - * methods in this class, this method reports its result as a long value. - * - * @see #getInt(Object, long) - */ - public native long objectFieldOffset(Field f); - - /** - * Report the location of a given static field, in conjunction with - * {@link #staticFieldOffset}. - *

- * Fetch the base "Object", if any, with which static fields of the given - * class can be accessed via methods like {@link #getInt(Object, long)}. This - * value may be null. This value may refer to an object which is a "cookie", - * not guaranteed to be a real Object, and it should not be used in any way - * except as argument to the get and put routines in this class. - */ - public native Object staticFieldBase(Field f); - - /** - * Ensure the given class has been initialized. This is often needed in - * conjunction with obtaining the static field base of a class. - */ - public native void ensureClassInitialized(Class c); - - /** - * Report the offset of the first element in the storage allocation of a given - * array class. If {@link #arrayIndexScale} returns a non-zero value for the - * same class, you may use that scale factor, together with this base offset, - * to form new offsets to access elements of arrays of the given class. - * - * @see #getInt(Object, long) - * @see #putInt(Object, long, int) - */ - public native int arrayBaseOffset(Class arrayClass); - - /** - * Report the scale factor for addressing elements in the storage allocation - * of a given array class. However, arrays of "narrow" types will generally - * not work properly with accessors like {@link #getByte(Object, int)}, so the - * scale factor for such classes is reported as zero. - * - * @see #arrayBaseOffset - * @see #getInt(Object, long) - * @see #putInt(Object, long, int) - */ - public native int arrayIndexScale(Class arrayClass); - - /** - * Report the size in bytes of a native pointer, as stored via - * {@link #putAddress}. This value will be either 4 or 8. Note that the sizes - * of other primitive types (as stored in native memory blocks) is determined - * fully by their information content. - */ - public native int addressSize(); - - /** - * Report the size in bytes of a native memory page (whatever that is). This - * value will always be a power of two. - */ - public native int pageSize(); - - /// random trusted operations from JNI: - - /** - * Tell the VM to define a class, without security checks. By default, the - * class loader and protection domain come from the caller's class. - */ - public native Class defineClass(String name, byte[] b, int off, int len, - ClassLoader loader, ProtectionDomain protectionDomain); - - public native Class defineClass(String name, byte[] b, int off, int len); - - /** - * Allocate an instance but do not run any constructor. Initializes the class - * if it has not yet been. - */ - public native Object allocateInstance(Class cls) - throws InstantiationException; - - /** Lock the object. It must get unlocked via {@link #monitorExit}. */ - public native void monitorEnter(Object o); - - /** - * Unlock the object. It must have been locked via {@link #monitorEnter}. - */ - public native void monitorExit(Object o); - - /** - * Tries to lock the object. Returns true or false to indicate whether the - * lock succeeded. If it did, the object must be unlocked via - * {@link #monitorExit}. - */ - public native boolean tryMonitorEnter(Object o); - - /** Throw the exception without telling the verifier. */ - public native void throwException(Throwable ee); - - /** - * Atomically update Java variable to x if it is currently holding - * expected. - * - * @return true if successful - */ - public final native boolean compareAndSwapObject(Object o, long offset, - Object expected, Object x); - - /** - * Atomically update Java variable to x if it is currently holding - * expected. - * - * @return true if successful - */ - public final native boolean compareAndSwapInt(Object o, long offset, - int expected, int x); - - /** - * Atomically update Java variable to x if it is currently holding - * expected. - * - * @return true if successful - */ - public final native boolean compareAndSwapLong(Object o, long offset, - long expected, long x); - - /** - * Fetches a reference value from a given Java variable, with volatile load - * semantics. Otherwise identical to {@link #getObject(Object, long)} - */ - public native Object getObjectVolatile(Object o, long offset); - - /** - * Stores a reference value into a given Java variable, with volatile store - * semantics. Otherwise identical to {@link #putObject(Object, long, Object)} - */ - public native void putObjectVolatile(Object o, long offset, Object x); - - /** Volatile version of {@link #getInt(Object, long)} */ - public native int getIntVolatile(Object o, long offset); - - /** Volatile version of {@link #putInt(Object, long, int)} */ - public native void putIntVolatile(Object o, long offset, int x); - - /** Volatile version of {@link #getBoolean(Object, long)} */ - public native boolean getBooleanVolatile(Object o, long offset); - - /** Volatile version of {@link #putBoolean(Object, long, boolean)} */ - public native void putBooleanVolatile(Object o, long offset, boolean x); - - /** Volatile version of {@link #getByte(Object, long)} */ - public native byte getByteVolatile(Object o, long offset); - - /** Volatile version of {@link #putByte(Object, long, byte)} */ - public native void putByteVolatile(Object o, long offset, byte x); - - /** Volatile version of {@link #getShort(Object, long)} */ - public native short getShortVolatile(Object o, long offset); - - /** Volatile version of {@link #putShort(Object, long, short)} */ - public native void putShortVolatile(Object o, long offset, short x); - - /** Volatile version of {@link #getChar(Object, long)} */ - public native char getCharVolatile(Object o, long offset); - - /** Volatile version of {@link #putChar(Object, long, char)} */ - public native void putCharVolatile(Object o, long offset, char x); - - /** Volatile version of {@link #getLong(Object, long)} */ - public native long getLongVolatile(Object o, long offset); - - /** Volatile version of {@link #putLong(Object, long, long)} */ - public native void putLongVolatile(Object o, long offset, long x); - - /** Volatile version of {@link #getFloat(Object, long)} */ - public native float getFloatVolatile(Object o, long offset); - - /** Volatile version of {@link #putFloat(Object, long, float)} */ - public native void putFloatVolatile(Object o, long offset, float x); - - /** Volatile version of {@link #getDouble(Object, long)} */ - public native double getDoubleVolatile(Object o, long offset); - - /** Volatile version of {@link #putDouble(Object, long, double)} */ - public native void putDoubleVolatile(Object o, long offset, double x); - - /** - * Version of {@link #putObjectVolatile(Object, long, Object)} that does not - * guarantee immediate visibility of the store to other threads. This method - * is generally only useful if the underlying field is a Java volatile (or if - * an array cell, one that is otherwise only accessed using volatile - * accesses). - */ - public native void putOrderedObject(Object o, long offset, Object x); - - /** Ordered/Lazy version of {@link #putIntVolatile(Object, long, int)} */ - public native void putOrderedInt(Object o, long offset, int x); - - /** Ordered/Lazy version of {@link #putLongVolatile(Object, long, long)} */ - public native void putOrderedLong(Object o, long offset, long x); - - /** - * Unblock the given thread blocked on park, or, if it is not - * blocked, cause the subsequent call to park not to block. Note: - * this operation is "unsafe" solely because the caller must somehow ensure - * that the thread has not been destroyed. Nothing special is usually required - * to ensure this when called from Java (in which there will ordinarily be a - * live reference to the thread) but this is not nearly-automatically so when - * calling from native code. - * - * @param thread - * the thread to unpark. - * - */ - public native void unpark(Object thread); - - /** - * Block current thread, returning when a balancing unpark occurs, or - * a balancing unpark has already occurred, or the thread is - * interrupted, or, if not absolute and time is not zero, the given time - * nanoseconds have elapsed, or if absolute, the given deadline in - * milliseconds since Epoch has passed, or spuriously (i.e., returning for no - * "reason"). Note: This operation is in the Unsafe class only because - * unpark is, so it would be strange to place it elsewhere. - */ - public native void park(boolean isAbsolute, long time); - - /** - * Gets the load average in the system run queue assigned to the available - * processors averaged over various periods of time. This method retrieves the - * given nelem samples and assigns to the elements of the given - * loadavg array. The system imposes a maximum of 3 samples, - * representing averages over the last 1, 5, and 15 minutes, respectively. - * - * @params loadavg an array of double of size nelems - * @params nelems the number of samples to be retrieved and must be 1 to 3. - * - * @return the number of samples actually retrieved; or -1 if the load average - * is unobtainable. - */ - public native int getLoadAverage(double[] loadavg, int nelems); -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java deleted file mode 100644 index 7fc8141f37..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java +++ /dev/null @@ -1,653 +0,0 @@ -/* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.net.www; - -import java.util.BitSet; -import java.io.UnsupportedEncodingException; -import java.io.File; -import java.net.URL; -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.nio.ByteBuffer; -import java.nio.CharBuffer; -import java.nio.charset.CharacterCodingException; -import com.sun.ts.lib.util.sec.nio.cs.ThreadLocalCoders; -import java.nio.charset.CharsetDecoder; -import java.nio.charset.CoderResult; -import java.nio.charset.CodingErrorAction; - -/** - * A class that contains useful routines common to sun.net.www - * - * @author Mike McCloskey - */ - -public class ParseUtil { - static BitSet encodedInPath; - - static { - encodedInPath = new BitSet(256); - - // Set the bits corresponding to characters that are encoded in the - // path component of a URI. - - // These characters are reserved in the path segment as described in - // RFC2396 section 3.3. - encodedInPath.set('='); - encodedInPath.set(';'); - encodedInPath.set('?'); - encodedInPath.set('/'); - - // These characters are defined as excluded in RFC2396 section 2.4.3 - // and must be escaped if they occur in the data part of a URI. - encodedInPath.set('#'); - encodedInPath.set(' '); - encodedInPath.set('<'); - encodedInPath.set('>'); - encodedInPath.set('%'); - encodedInPath.set('"'); - encodedInPath.set('{'); - encodedInPath.set('}'); - encodedInPath.set('|'); - encodedInPath.set('\\'); - encodedInPath.set('^'); - encodedInPath.set('['); - encodedInPath.set(']'); - encodedInPath.set('`'); - - // US ASCII control characters 00-1F and 7F. - for (int i = 0; i < 32; i++) - encodedInPath.set(i); - encodedInPath.set(127); - } - - /** - * Constructs an encoded version of the specified path string suitable for use - * in the construction of a URL. - * - * A path separator is replaced by a forward slash. The string is UTF8 - * encoded. The % escape sequence is used for characters that are above 0x7F - * or those defined in RFC2396 as reserved or excluded in the path component - * of a URL. - */ - public static String encodePath(String path) { - return encodePath(path, true); - } - - /* - * flag indicates whether path uses platform dependent File.separatorChar or - * not. True indicates path uses platform dependent File.separatorChar. - */ - public static String encodePath(String path, boolean flag) { - char[] retCC = new char[path.length() * 2 + 16]; - int retLen = 0; - char[] pathCC = path.toCharArray(); - - int n = path.length(); - for (int i = 0; i < n; i++) { - char c = pathCC[i]; - if ((!flag && c == '/') || (flag && c == File.separatorChar)) - retCC[retLen++] = '/'; - else { - if (c <= 0x007F) { - if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' - || c >= '0' && c <= '9') { - retCC[retLen++] = c; - } else if (encodedInPath.get(c)) - retLen = escape(retCC, c, retLen); - else - retCC[retLen++] = c; - } else if (c > 0x07FF) { - retLen = escape(retCC, (char) (0xE0 | ((c >> 12) & 0x0F)), retLen); - retLen = escape(retCC, (char) (0x80 | ((c >> 6) & 0x3F)), retLen); - retLen = escape(retCC, (char) (0x80 | ((c >> 0) & 0x3F)), retLen); - } else { - retLen = escape(retCC, (char) (0xC0 | ((c >> 6) & 0x1F)), retLen); - retLen = escape(retCC, (char) (0x80 | ((c >> 0) & 0x3F)), retLen); - } - } - // worst case scenario for character [0x7ff-] every single - // character will be encoded into 9 characters. - if (retLen + 9 > retCC.length) { - int newLen = retCC.length * 2 + 16; - if (newLen < 0) { - newLen = Integer.MAX_VALUE; - } - char[] buf = new char[newLen]; - System.arraycopy(retCC, 0, buf, 0, retLen); - retCC = buf; - } - } - return new String(retCC, 0, retLen); - } - - /** - * Appends the URL escape sequence for the specified char to the specified - * StringBuffer. - */ - private static int escape(char[] cc, char c, int index) { - cc[index++] = '%'; - cc[index++] = Character.forDigit((c >> 4) & 0xF, 16); - cc[index++] = Character.forDigit(c & 0xF, 16); - return index; - } - - /** - * Un-escape and return the character at position i in string s. - */ - private static byte unescape(String s, int i) { - return (byte) Integer.parseInt(s.substring(i + 1, i + 3), 16); - } - - /** - * Returns a new String constructed from the specified String by replacing the - * URL escape sequences and UTF8 encoding with the characters they represent. - */ - public static String decode(String s) { - int n = s.length(); - if ((n == 0) || (s.indexOf('%') < 0)) - return s; - - StringBuilder sb = new StringBuilder(n); - ByteBuffer bb = ByteBuffer.allocate(n); - CharBuffer cb = CharBuffer.allocate(n); - CharsetDecoder dec = ThreadLocalCoders.decoderFor("UTF-8") - .onMalformedInput(CodingErrorAction.REPORT) - .onUnmappableCharacter(CodingErrorAction.REPORT); - - char c = s.charAt(0); - for (int i = 0; i < n;) { - assert c == s.charAt(i); - if (c != '%') { - sb.append(c); - if (++i >= n) - break; - c = s.charAt(i); - continue; - } - bb.clear(); - int ui = i; - for (;;) { - assert (n - i >= 2); - try { - bb.put(unescape(s, i)); - } catch (NumberFormatException e) { - throw new IllegalArgumentException(); - } - i += 3; - if (i >= n) - break; - c = s.charAt(i); - if (c != '%') - break; - } - bb.flip(); - cb.clear(); - dec.reset(); - CoderResult cr = dec.decode(bb, cb, true); - if (cr.isError()) - throw new IllegalArgumentException( - "Error decoding percent encoded characters"); - cr = dec.flush(cb); - if (cr.isError()) - throw new IllegalArgumentException( - "Error decoding percent encoded characters"); - sb.append(cb.flip().toString()); - } - - return sb.toString(); - } - - /** - * Returns a canonical version of the specified string. - */ - public String canonizeString(String file) { - int i = 0; - int lim = file.length(); - - // Remove embedded /../ - while ((i = file.indexOf("/../")) >= 0) { - if ((lim = file.lastIndexOf('/', i - 1)) >= 0) { - file = file.substring(0, lim) + file.substring(i + 3); - } else { - file = file.substring(i + 3); - } - } - // Remove embedded /./ - while ((i = file.indexOf("/./")) >= 0) { - file = file.substring(0, i) + file.substring(i + 2); - } - // Remove trailing .. - while (file.endsWith("/..")) { - i = file.indexOf("/.."); - if ((lim = file.lastIndexOf('/', i - 1)) >= 0) { - file = file.substring(0, lim + 1); - } else { - file = file.substring(0, i); - } - } - // Remove trailing . - if (file.endsWith("/.")) - file = file.substring(0, file.length() - 1); - - return file; - } - - public static URL fileToEncodedURL(File file) throws MalformedURLException { - String path = file.getAbsolutePath(); - path = ParseUtil.encodePath(path); - if (!path.startsWith("/")) { - path = "/" + path; - } - if (!path.endsWith("/") && file.isDirectory()) { - path = path + "/"; - } - return new URL("file", "", path); - } - - public static java.net.URI toURI(URL url) { - String protocol = url.getProtocol(); - String auth = url.getAuthority(); - String path = url.getPath(); - String query = url.getQuery(); - String ref = url.getRef(); - if (path != null && !(path.startsWith("/"))) - path = "/" + path; - - // - // In java.net.URI class, a port number of -1 implies the default - // port number. So get it stripped off before creating URI instance. - // - if (auth != null && auth.endsWith(":-1")) - auth = auth.substring(0, auth.length() - 3); - - java.net.URI uri; - try { - uri = createURI(protocol, auth, path, query, ref); - } catch (java.net.URISyntaxException e) { - uri = null; - } - return uri; - } - - // - // createURI() and its auxiliary code are cloned from java.net.URI. - // Most of the code are just copy and paste, except that quote() - // has been modified to avoid double-escape. - // - // Usually it is unacceptable, but we're forced to do it because - // otherwise we need to change public API, namely java.net.URI's - // multi-argument constructors. It turns out that the changes cause - // incompatibilities so can't be done. - // - private static URI createURI(String scheme, String authority, String path, - String query, String fragment) throws URISyntaxException { - String s = toString(scheme, null, authority, null, null, -1, path, query, - fragment); - checkPath(s, scheme, path); - return new URI(s); - } - - private static String toString(String scheme, String opaquePart, - String authority, String userInfo, String host, int port, String path, - String query, String fragment) { - StringBuffer sb = new StringBuffer(); - if (scheme != null) { - sb.append(scheme); - sb.append(':'); - } - appendSchemeSpecificPart(sb, opaquePart, authority, userInfo, host, port, - path, query); - appendFragment(sb, fragment); - return sb.toString(); - } - - private static void appendSchemeSpecificPart(StringBuffer sb, - String opaquePart, String authority, String userInfo, String host, - int port, String path, String query) { - if (opaquePart != null) { - /* - * check if SSP begins with an IPv6 address because we must not quote a - * literal IPv6 address - */ - if (opaquePart.startsWith("//[")) { - int end = opaquePart.indexOf("]"); - if (end != -1 && opaquePart.indexOf(":") != -1) { - String doquote, dontquote; - if (end == opaquePart.length()) { - dontquote = opaquePart; - doquote = ""; - } else { - dontquote = opaquePart.substring(0, end + 1); - doquote = opaquePart.substring(end + 1); - } - sb.append(dontquote); - sb.append(quote(doquote, L_URIC, H_URIC)); - } - } else { - sb.append(quote(opaquePart, L_URIC, H_URIC)); - } - } else { - appendAuthority(sb, authority, userInfo, host, port); - if (path != null) - sb.append(quote(path, L_PATH, H_PATH)); - if (query != null) { - sb.append('?'); - sb.append(quote(query, L_URIC, H_URIC)); - } - } - } - - private static void appendAuthority(StringBuffer sb, String authority, - String userInfo, String host, int port) { - if (host != null) { - sb.append("//"); - if (userInfo != null) { - sb.append(quote(userInfo, L_USERINFO, H_USERINFO)); - sb.append('@'); - } - boolean needBrackets = ((host.indexOf(':') >= 0) && !host.startsWith("[") - && !host.endsWith("]")); - if (needBrackets) - sb.append('['); - sb.append(host); - if (needBrackets) - sb.append(']'); - if (port != -1) { - sb.append(':'); - sb.append(port); - } - } else if (authority != null) { - sb.append("//"); - if (authority.startsWith("[")) { - int end = authority.indexOf("]"); - if (end != -1 && authority.indexOf(":") != -1) { - String doquote, dontquote; - if (end == authority.length()) { - dontquote = authority; - doquote = ""; - } else { - dontquote = authority.substring(0, end + 1); - doquote = authority.substring(end + 1); - } - sb.append(dontquote); - sb.append( - quote(doquote, L_REG_NAME | L_SERVER, H_REG_NAME | H_SERVER)); - } - } else { - sb.append( - quote(authority, L_REG_NAME | L_SERVER, H_REG_NAME | H_SERVER)); - } - } - } - - private static void appendFragment(StringBuffer sb, String fragment) { - if (fragment != null) { - sb.append('#'); - sb.append(quote(fragment, L_URIC, H_URIC)); - } - } - - // Quote any characters in s that are not permitted - // by the given mask pair - // - private static String quote(String s, long lowMask, long highMask) { - int n = s.length(); - StringBuffer sb = null; - boolean allowNonASCII = ((lowMask & L_ESCAPED) != 0); - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (c < '\u0080') { - if (!match(c, lowMask, highMask) && !isEscaped(s, i)) { - if (sb == null) { - sb = new StringBuffer(); - sb.append(s.substring(0, i)); - } - appendEscape(sb, (byte) c); - } else { - if (sb != null) - sb.append(c); - } - } else if (allowNonASCII - && (Character.isSpaceChar(c) || Character.isISOControl(c))) { - if (sb == null) { - sb = new StringBuffer(); - sb.append(s.substring(0, i)); - } - appendEncoded(sb, c); - } else { - if (sb != null) - sb.append(c); - } - } - return (sb == null) ? s : sb.toString(); - } - - // - // To check if the given string has an escaped triplet - // at the given position - // - private static boolean isEscaped(String s, int pos) { - if (s == null || (s.length() <= (pos + 2))) - return false; - - return s.charAt(pos) == '%' && match(s.charAt(pos + 1), L_HEX, H_HEX) - && match(s.charAt(pos + 2), L_HEX, H_HEX); - } - - private static void appendEncoded(StringBuffer sb, char c) { - ByteBuffer bb = null; - try { - bb = ThreadLocalCoders.encoderFor("UTF-8") - .encode(CharBuffer.wrap("" + c)); - } catch (CharacterCodingException x) { - assert false; - } - while (bb.hasRemaining()) { - int b = bb.get() & 0xff; - if (b >= 0x80) - appendEscape(sb, (byte) b); - else - sb.append((char) b); - } - } - - private final static char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', - '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; - - private static void appendEscape(StringBuffer sb, byte b) { - sb.append('%'); - sb.append(hexDigits[(b >> 4) & 0x0f]); - sb.append(hexDigits[(b >> 0) & 0x0f]); - } - - // Tell whether the given character is permitted by the given mask pair - private static boolean match(char c, long lowMask, long highMask) { - if (c < 64) - return ((1L << c) & lowMask) != 0; - if (c < 128) - return ((1L << (c - 64)) & highMask) != 0; - return false; - } - - // If a scheme is given then the path, if given, must be absolute - // - private static void checkPath(String s, String scheme, String path) - throws URISyntaxException { - if (scheme != null) { - if ((path != null) && ((path.length() > 0) && (path.charAt(0) != '/'))) - throw new URISyntaxException(s, "Relative path in absolute URI"); - } - } - - // -- Character classes for parsing -- - - // Compute a low-order mask for the characters - // between first and last, inclusive - private static long lowMask(char first, char last) { - long m = 0; - int f = Math.max(Math.min(first, 63), 0); - int l = Math.max(Math.min(last, 63), 0); - for (int i = f; i <= l; i++) - m |= 1L << i; - return m; - } - - // Compute the low-order mask for the characters in the given string - private static long lowMask(String chars) { - int n = chars.length(); - long m = 0; - for (int i = 0; i < n; i++) { - char c = chars.charAt(i); - if (c < 64) - m |= (1L << c); - } - return m; - } - - // Compute a high-order mask for the characters - // between first and last, inclusive - private static long highMask(char first, char last) { - long m = 0; - int f = Math.max(Math.min(first, 127), 64) - 64; - int l = Math.max(Math.min(last, 127), 64) - 64; - for (int i = f; i <= l; i++) - m |= 1L << i; - return m; - } - - // Compute the high-order mask for the characters in the given string - private static long highMask(String chars) { - int n = chars.length(); - long m = 0; - for (int i = 0; i < n; i++) { - char c = chars.charAt(i); - if ((c >= 64) && (c < 128)) - m |= (1L << (c - 64)); - } - return m; - } - - // Character-class masks - - // digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | - // "8" | "9" - private static final long L_DIGIT = lowMask('0', '9'); - - private static final long H_DIGIT = 0L; - - // hex = digit | "A" | "B" | "C" | "D" | "E" | "F" | - // "a" | "b" | "c" | "d" | "e" | "f" - private static final long L_HEX = L_DIGIT; - - private static final long H_HEX = highMask('A', 'F') | highMask('a', 'f'); - - // upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | - // "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | - // "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" - private static final long L_UPALPHA = 0L; - - private static final long H_UPALPHA = highMask('A', 'Z'); - - // lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | - // "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | - // "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" - private static final long L_LOWALPHA = 0L; - - private static final long H_LOWALPHA = highMask('a', 'z'); - - // alpha = lowalpha | upalpha - private static final long L_ALPHA = L_LOWALPHA | L_UPALPHA; - - private static final long H_ALPHA = H_LOWALPHA | H_UPALPHA; - - // alphanum = alpha | digit - private static final long L_ALPHANUM = L_DIGIT | L_ALPHA; - - private static final long H_ALPHANUM = H_DIGIT | H_ALPHA; - - // mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | - // "(" | ")" - private static final long L_MARK = lowMask("-_.!~*'()"); - - private static final long H_MARK = highMask("-_.!~*'()"); - - // unreserved = alphanum | mark - private static final long L_UNRESERVED = L_ALPHANUM | L_MARK; - - private static final long H_UNRESERVED = H_ALPHANUM | H_MARK; - - // reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | - // "$" | "," | "[" | "]" - // Added per RFC2732: "[", "]" - private static final long L_RESERVED = lowMask(";/?:@&=+$,[]"); - - private static final long H_RESERVED = highMask(";/?:@&=+$,[]"); - - // The zero'th bit is used to indicate that escape pairs and non-US-ASCII - // characters are allowed; this is handled by the scanEscape method below. - private static final long L_ESCAPED = 1L; - - private static final long H_ESCAPED = 0L; - - // Dash, for use in domainlabel and toplabel - private static final long L_DASH = lowMask("-"); - - private static final long H_DASH = highMask("-"); - - // uric = reserved | unreserved | escaped - private static final long L_URIC = L_RESERVED | L_UNRESERVED | L_ESCAPED; - - private static final long H_URIC = H_RESERVED | H_UNRESERVED | H_ESCAPED; - - // pchar = unreserved | escaped | - // ":" | "@" | "&" | "=" | "+" | "$" | "," - private static final long L_PCHAR = L_UNRESERVED | L_ESCAPED - | lowMask(":@&=+$,"); - - private static final long H_PCHAR = H_UNRESERVED | H_ESCAPED - | highMask(":@&=+$,"); - - // All valid path characters - private static final long L_PATH = L_PCHAR | lowMask(";/"); - - private static final long H_PATH = H_PCHAR | highMask(";/"); - - // userinfo = *( unreserved | escaped | - // ";" | ":" | "&" | "=" | "+" | "$" | "," ) - private static final long L_USERINFO = L_UNRESERVED | L_ESCAPED - | lowMask(";:&=+$,"); - - private static final long H_USERINFO = H_UNRESERVED | H_ESCAPED - | highMask(";:&=+$,"); - - // reg_name = 1*( unreserved | escaped | "$" | "," | - // ";" | ":" | "@" | "&" | "=" | "+" ) - private static final long L_REG_NAME = L_UNRESERVED | L_ESCAPED - | lowMask("$,;:@&=+"); - - private static final long H_REG_NAME = H_UNRESERVED | H_ESCAPED - | highMask("$,;:@&=+"); - - // All valid characters for server-based authorities - private static final long L_SERVER = L_USERINFO | L_ALPHANUM | L_DASH - | lowMask(".:@[]"); - - private static final long H_SERVER = H_USERINFO | H_ALPHANUM | H_DASH - | highMask(".:@[]"); -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java deleted file mode 100644 index 7471969f13..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.nio.cs; - -import java.nio.*; -import java.nio.charset.*; - -/** - * Utility class for caching per-thread decoders and encoders. - */ - -public class ThreadLocalCoders { - - private static final int CACHE_SIZE = 3; - - private static abstract class Cache { - - // Thread-local reference to array of cached objects, in LRU order - private ThreadLocal cache = new ThreadLocal(); - - private final int size; - - Cache(int size) { - this.size = size; - } - - abstract Object create(Object name); - - private void moveToFront(Object[] oa, int i) { - Object ob = oa[i]; - for (int j = i; j > 0; j--) - oa[j] = oa[j - 1]; - oa[0] = ob; - } - - abstract boolean hasName(Object ob, Object name); - - Object forName(Object name) { - Object[] oa = (Object[]) cache.get(); - if (oa == null) { - oa = new Object[size]; - cache.set(oa); - } else { - for (int i = 0; i < oa.length; i++) { - Object ob = oa[i]; - if (ob == null) - continue; - if (hasName(ob, name)) { - if (i > 0) - moveToFront(oa, i); - return ob; - } - } - } - - // Create a new object - Object ob = create(name); - oa[oa.length - 1] = ob; - moveToFront(oa, oa.length - 1); - return ob; - } - - } - - private static Cache decoderCache = new Cache(CACHE_SIZE) { - boolean hasName(Object ob, Object name) { - if (name instanceof String) - return (((CharsetDecoder) ob).charset().name().equals(name)); - if (name instanceof Charset) - return ((CharsetDecoder) ob).charset().equals(name); - return false; - } - - Object create(Object name) { - if (name instanceof String) - return Charset.forName((String) name).newDecoder(); - if (name instanceof Charset) - return ((Charset) name).newDecoder(); - assert false; - return null; - } - }; - - public static CharsetDecoder decoderFor(Object name) { - CharsetDecoder cd = (CharsetDecoder) decoderCache.forName(name); - cd.reset(); - return cd; - } - - private static Cache encoderCache = new Cache(CACHE_SIZE) { - boolean hasName(Object ob, Object name) { - if (name instanceof String) - return (((CharsetEncoder) ob).charset().name().equals(name)); - if (name instanceof Charset) - return ((CharsetEncoder) ob).charset().equals(name); - return false; - } - - Object create(Object name) { - if (name instanceof String) - return Charset.forName((String) name).newEncoder(); - if (name instanceof Charset) - return ((Charset) name).newEncoder(); - assert false; - return null; - } - }; - - public static CharsetEncoder encoderFor(Object name) { - CharsetEncoder ce = (CharsetEncoder) encoderCache.forName(name); - ce.reset(); - return ce; - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java deleted file mode 100644 index 4eb31225bc..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.reflect; - -import java.lang.reflect.*; - -/** - * Provides reflective access to the constant pools of classes. Currently this - * is needed to provide reflective access to annotations but may be used by - * other internal subsystems in the future. - */ - -public class ConstantPool { - // Number of entries in this constant pool (= maximum valid constant pool - // index) - public int getSize() { - return getSize0(constantPoolOop); - } - - public Class getClassAt(int index) { - return getClassAt0(constantPoolOop, index); - } - - public Class getClassAtIfLoaded(int index) { - return getClassAtIfLoaded0(constantPoolOop, index); - } - - // Returns either a Method or Constructor. - // Static initializers are returned as Method objects. - public Member getMethodAt(int index) { - return getMethodAt0(constantPoolOop, index); - } - - public Member getMethodAtIfLoaded(int index) { - return getMethodAtIfLoaded0(constantPoolOop, index); - } - - public Field getFieldAt(int index) { - return getFieldAt0(constantPoolOop, index); - } - - public Field getFieldAtIfLoaded(int index) { - return getFieldAtIfLoaded0(constantPoolOop, index); - } - - // Fetches the class name, member (field, method or interface - // method) name, and type descriptor as an array of three Strings - public String[] getMemberRefInfoAt(int index) { - return getMemberRefInfoAt0(constantPoolOop, index); - } - - public int getIntAt(int index) { - return getIntAt0(constantPoolOop, index); - } - - public long getLongAt(int index) { - return getLongAt0(constantPoolOop, index); - } - - public float getFloatAt(int index) { - return getFloatAt0(constantPoolOop, index); - } - - public double getDoubleAt(int index) { - return getDoubleAt0(constantPoolOop, index); - } - - public String getStringAt(int index) { - return getStringAt0(constantPoolOop, index); - } - - public String getUTF8At(int index) { - return getUTF8At0(constantPoolOop, index); - } - - // --------------------------------------------------------------------------- - // Internals only below this point - // - - static { - Reflection.registerFieldsToFilter(ConstantPool.class, - new String[] { "constantPoolOop" }); - } - - // HotSpot-internal constant pool object (set by the VM, name known to the VM) - private Object constantPoolOop; - - private native int getSize0(Object constantPoolOop); - - private native Class getClassAt0(Object constantPoolOop, int index); - - private native Class getClassAtIfLoaded0(Object constantPoolOop, int index); - - private native Member getMethodAt0(Object constantPoolOop, int index); - - private native Member getMethodAtIfLoaded0(Object constantPoolOop, int index); - - private native Field getFieldAt0(Object constantPoolOop, int index); - - private native Field getFieldAtIfLoaded0(Object constantPoolOop, int index); - - private native String[] getMemberRefInfoAt0(Object constantPoolOop, - int index); - - private native int getIntAt0(Object constantPoolOop, int index); - - private native long getLongAt0(Object constantPoolOop, int index); - - private native float getFloatAt0(Object constantPoolOop, int index); - - private native double getDoubleAt0(Object constantPoolOop, int index); - - private native String getStringAt0(Object constantPoolOop, int index); - - private native String getUTF8At0(Object constantPoolOop, int index); -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java deleted file mode 100644 index cfcf69e5e6..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java +++ /dev/null @@ -1,309 +0,0 @@ -/* - * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.reflect; - -import java.lang.reflect.*; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -/** - * Common utility routines used by both java.lang and java.lang.reflect - */ - -public class Reflection { - - /** - * Used to filter out fields and methods from certain classes from public - * view, where they are sensitive or they may contain VM-internal objects. - * These Maps are updated very rarely. Rather than synchronize on each access, - * we use copy-on-write - */ - private static volatile Map fieldFilterMap; - - private static volatile Map methodFilterMap; - - static { - Map map = new HashMap(); - map.put(Reflection.class, - new String[] { "fieldFilterMap", "methodFilterMap" }); - map.put(System.class, new String[] { "security" }); - fieldFilterMap = map; - - methodFilterMap = new HashMap(); - } - - /** - * Returns the class of the method realFramesToSkip frames up the - * stack (zero-based), ignoring frames associated with - * java.lang.reflect.Method.invoke() and its implementation. The first frame - * is that associated with this method, so getCallerClass(0) - * returns the Class object for sun.reflect.Reflection. Frames associated with - * java.lang.reflect.Method.invoke() and its implementation are completely - * ignored and do not count toward the number of "real" frames skipped. - */ - public static native Class getCallerClass(int realFramesToSkip); - - /** - * Retrieves the access flags written to the class file. For inner classes - * these flags may differ from those returned by Class.getModifiers(), which - * searches the InnerClasses attribute to find the source-level access flags. - * This is used instead of Class.getModifiers() for run-time access checks due - * to compatibility reasons; see 4471811. Only the values of the low 13 bits - * (i.e., a mask of 0x1FFF) are guaranteed to be valid. - */ - private static native int getClassAccessFlags(Class c); - - /** - * A quick "fast-path" check to try to avoid getCallerClass() calls. - */ - public static boolean quickCheckMemberAccess(Class memberClass, - int modifiers) { - return Modifier.isPublic(getClassAccessFlags(memberClass) & modifiers); - } - - public static void ensureMemberAccess(Class currentClass, Class memberClass, - Object target, int modifiers) throws IllegalAccessException { - if (currentClass == null || memberClass == null) { - throw new InternalError(); - } - - if (!verifyMemberAccess(currentClass, memberClass, target, modifiers)) { - throw new IllegalAccessException("Class " + currentClass.getName() - + " can not access a member of class " + memberClass.getName() - + " with modifiers \"" + Modifier.toString(modifiers) + "\""); - } - } - - public static boolean verifyMemberAccess(Class currentClass, - // Declaring class of field - // or method - Class memberClass, - // May be NULL in case of statics - Object target, int modifiers) { - // Verify that currentClass can access a field, method, or - // constructor of memberClass, where that member's access bits are - // "modifiers". - - boolean gotIsSameClassPackage = false; - boolean isSameClassPackage = false; - - if (currentClass == memberClass) { - // Always succeeds - return true; - } - - if (!Modifier.isPublic(getClassAccessFlags(memberClass))) { - isSameClassPackage = isSameClassPackage(currentClass, memberClass); - gotIsSameClassPackage = true; - if (!isSameClassPackage) { - return false; - } - } - - // At this point we know that currentClass can access memberClass. - - if (Modifier.isPublic(modifiers)) { - return true; - } - - boolean successSoFar = false; - - if (Modifier.isProtected(modifiers)) { - // See if currentClass is a subclass of memberClass - if (isSubclassOf(currentClass, memberClass)) { - successSoFar = true; - } - } - - if (!successSoFar && !Modifier.isPrivate(modifiers)) { - if (!gotIsSameClassPackage) { - isSameClassPackage = isSameClassPackage(currentClass, memberClass); - gotIsSameClassPackage = true; - } - - if (isSameClassPackage) { - successSoFar = true; - } - } - - if (!successSoFar) { - return false; - } - - if (Modifier.isProtected(modifiers)) { - // Additional test for protected members: JLS 6.6.2 - Class targetClass = (target == null ? memberClass : target.getClass()); - if (targetClass != currentClass) { - if (!gotIsSameClassPackage) { - isSameClassPackage = isSameClassPackage(currentClass, memberClass); - gotIsSameClassPackage = true; - } - if (!isSameClassPackage) { - if (!isSubclassOf(targetClass, currentClass)) { - return false; - } - } - } - } - - return true; - } - - private static boolean isSameClassPackage(Class c1, Class c2) { - return isSameClassPackage(c1.getClassLoader(), c1.getName(), - c2.getClassLoader(), c2.getName()); - } - - /** - * Returns true if two classes are in the same package; classloader and - * classname information is enough to determine a class's package - */ - private static boolean isSameClassPackage(ClassLoader loader1, String name1, - ClassLoader loader2, String name2) { - if (loader1 != loader2) { - return false; - } else { - int lastDot1 = name1.lastIndexOf('.'); - int lastDot2 = name2.lastIndexOf('.'); - if ((lastDot1 == -1) || (lastDot2 == -1)) { - // One of the two doesn't have a package. Only return true - // if the other one also doesn't have a package. - return (lastDot1 == lastDot2); - } else { - int idx1 = 0; - int idx2 = 0; - - // Skip over '['s - if (name1.charAt(idx1) == '[') { - do { - idx1++; - } while (name1.charAt(idx1) == '['); - if (name1.charAt(idx1) != 'L') { - // Something is terribly wrong. Shouldn't be here. - throw new InternalError("Illegal class name " + name1); - } - } - if (name2.charAt(idx2) == '[') { - do { - idx2++; - } while (name2.charAt(idx2) == '['); - if (name2.charAt(idx2) != 'L') { - // Something is terribly wrong. Shouldn't be here. - throw new InternalError("Illegal class name " + name2); - } - } - - // Check that package part is identical - int length1 = lastDot1 - idx1; - int length2 = lastDot2 - idx2; - - if (length1 != length2) { - return false; - } - return name1.regionMatches(false, idx1, name2, idx2, length1); - } - } - } - - static boolean isSubclassOf(Class queryClass, Class ofClass) { - while (queryClass != null) { - if (queryClass == ofClass) { - return true; - } - queryClass = queryClass.getSuperclass(); - } - return false; - } - - // fieldNames must contain only interned Strings - public static synchronized void registerFieldsToFilter(Class containingClass, - String... fieldNames) { - fieldFilterMap = registerFilter(fieldFilterMap, containingClass, - fieldNames); - } - - // methodNames must contain only interned Strings - public static synchronized void registerMethodsToFilter(Class containingClass, - String... methodNames) { - methodFilterMap = registerFilter(methodFilterMap, containingClass, - methodNames); - } - - private static Map registerFilter(Map map, - Class containingClass, String... names) { - if (map.get(containingClass) != null) { - throw new IllegalArgumentException( - "Filter already registered: " + containingClass); - } - map = new HashMap(map); - map.put(containingClass, names); - return map; - } - - public static Field[] filterFields(Class containingClass, Field[] fields) { - if (fieldFilterMap == null) { - // Bootstrapping - return fields; - } - return (Field[]) filter(fields, fieldFilterMap.get(containingClass)); - } - - public static Method[] filterMethods(Class containingClass, - Method[] methods) { - if (methodFilterMap == null) { - // Bootstrapping - return methods; - } - return (Method[]) filter(methods, methodFilterMap.get(containingClass)); - } - - private static Member[] filter(Member[] members, String[] filteredNames) { - if ((filteredNames == null) || (members.length == 0)) { - return members; - } - int numNewMembers = 0; - for (Member member : members) { - boolean shouldSkip = false; - for (String filteredName : filteredNames) { - if (member.getName() == filteredName) { - shouldSkip = true; - break; - } - } - if (!shouldSkip) { - ++numNewMembers; - } - } - Member[] newMembers = (Member[]) Array.newInstance(members[0].getClass(), - numNewMembers); - int destIdx = 0; - for (Member member : members) { - boolean shouldSkip = false; - for (String filteredName : filteredNames) { - if (member.getName() == filteredName) { - shouldSkip = true; - break; - } - } - if (!shouldSkip) { - newMembers[destIdx++] = member; - } - } - return newMembers; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java deleted file mode 100644 index dedc937e57..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.reflect.annotation; - -import java.lang.annotation.*; -import java.lang.reflect.*; -import java.util.*; -import java.security.AccessController; -import java.security.PrivilegedAction; - -/** - * Represents an annotation type at run time. Used to type-check annotations and - * apply member defaults. - * - * @author Josh Bloch - * @since 1.5 - */ -public class AnnotationType { - /** - * Member name -> type mapping. Note that primitive types are represented by - * the class objects for the corresponding wrapper types. This matches the - * return value that must be used for a dynamic proxy, allowing for a simple - * isInstance test. - */ - private final Map memberTypes = new HashMap(); - - /** - * Member name -> default value mapping. - */ - private final Map memberDefaults = new HashMap(); - - /** - * Member name -> Method object mapping. This (and its assoicated accessor) - * are used only to generate AnnotationTypeMismatchExceptions. - */ - private final Map members = new HashMap(); - - /** - * The retention policy for this annotation type. - */ - private RetentionPolicy retention = RetentionPolicy.RUNTIME;; - - /** - * Whether this annotation type is inherited. - */ - private boolean inherited = false; - - /** - * Returns an AnnotationType instance for the specified annotation type. - * - * @throw IllegalArgumentException if the specified class object for does not - * represent a valid annotation type - */ - public static synchronized AnnotationType getInstance(Class annotationClass) { - AnnotationType result = com.sun.ts.lib.util.sec.misc.SharedSecrets - .getJavaLangAccess().getAnnotationType(annotationClass); - if (result == null) - result = new AnnotationType((Class) annotationClass); - - return result; - } - - /** - * Sole constructor. - * - * @param annotationClass - * the class object for the annotation type - * @throw IllegalArgumentException if the specified class object for does not - * represent a valid annotation type - */ - private AnnotationType(final Class annotationClass) { - if (!annotationClass.isAnnotation()) - throw new IllegalArgumentException("Not an annotation type"); - - Method[] methods = AccessController - .doPrivileged(new PrivilegedAction() { - public Method[] run() { - // Initialize memberTypes and defaultValues - return annotationClass.getDeclaredMethods(); - } - }); - - for (Method method : methods) { - if (method.getParameterTypes().length != 0) - throw new IllegalArgumentException(method + " has params"); - String name = method.getName(); - Class type = method.getReturnType(); - memberTypes.put(name, invocationHandlerReturnType(type)); - members.put(name, method); - - Object defaultValue = method.getDefaultValue(); - if (defaultValue != null) - memberDefaults.put(name, defaultValue); - - members.put(name, method); - } - - com.sun.ts.lib.util.sec.misc.SharedSecrets.getJavaLangAccess() - .setAnnotationType(annotationClass, this); - - // Initialize retention, & inherited fields. Special treatment - // of the corresponding annotation types breaks infinite recursion. - if (annotationClass != Retention.class - && annotationClass != Inherited.class) { - Retention ret = annotationClass.getAnnotation(Retention.class); - retention = (ret == null ? RetentionPolicy.CLASS : ret.value()); - inherited = annotationClass.isAnnotationPresent(Inherited.class); - } - } - - /** - * Returns the type that must be returned by the invocation handler of a - * dynamic proxy in order to have the dynamic proxy return the specified type - * (which is assumed to be a legal member type for an annotation). - */ - public static Class invocationHandlerReturnType(Class type) { - // Translate primitives to wrappers - if (type == byte.class) - return Byte.class; - if (type == char.class) - return Character.class; - if (type == double.class) - return Double.class; - if (type == float.class) - return Float.class; - if (type == int.class) - return Integer.class; - if (type == long.class) - return Long.class; - if (type == short.class) - return Short.class; - if (type == boolean.class) - return Boolean.class; - - // Otherwise, just return declared type - return type; - } - - /** - * Returns member types for this annotation type (member name -> type - * mapping). - */ - public Map memberTypes() { - return memberTypes; - } - - /** - * Returns members of this annotation type (member name -> associated Method - * object mapping). - */ - public Map members() { - return members; - } - - /** - * Returns the default values for this annotation type (Member name -> default - * value mapping). - */ - public Map memberDefaults() { - return memberDefaults; - } - - /** - * Returns the retention policy for this annotation type. - */ - public RetentionPolicy retention() { - return retention; - } - - /** - * Returns true if this this annotation type is inherited. - */ - public boolean isInherited() { - return inherited; - } - - /** - * For debugging. - */ - public String toString() { - StringBuffer s = new StringBuffer("Annotation Type:" + "\n"); - s.append(" Member types: " + memberTypes + "\n"); - s.append(" Member defaults: " + memberDefaults + "\n"); - s.append(" Retention policy: " + retention + "\n"); - s.append(" Inherited: " + inherited); - return s.toString(); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java deleted file mode 100644 index 6ac78ee469..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.action; - -/** - * A convenience class for retrieving the string value of a system property as a - * privileged action. - * - *

- * An instance of this class can be used as the argument of - * AccessController.doPrivileged. - * - *

- * The following code retrieves the value of the system property named - * "prop" as a privileged action: - *

- * - *

- * String s = java.security.AccessController
- *     .doPrivileged(new GetPropertyAction("prop"));
- * 
- * - * @author Roland Schemers - * @see java.security.PrivilegedAction - * @see java.security.AccessController - * @since 1.2 - */ - -public class GetPropertyAction - implements java.security.PrivilegedAction { - private String theProp; - - private String defaultVal; - - /** - * Constructor that takes the name of the system property whose string value - * needs to be determined. - * - * @param theProp - * the name of the system property. - */ - public GetPropertyAction(String theProp) { - this.theProp = theProp; - } - - /** - * Constructor that takes the name of the system property and the default - * value of that property. - * - * @param theProp - * the name of the system property. - * @param defaulVal - * the default value. - */ - public GetPropertyAction(String theProp, String defaultVal) { - this.theProp = theProp; - this.defaultVal = defaultVal; - } - - /** - * Determines the string value of the system property whose name was specified - * in the constructor. - * - * @return the string value of the system property, or the default value if - * there is no property with that key. - */ - public String run() { - String value = System.getProperty(theProp); - return (value == null) ? defaultVal : value; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java deleted file mode 100644 index 33c1fa2131..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.provider; - -import java.io.*; -import java.util.*; -import java.security.*; - -/** - * An implementation of IdentityScope as a persistent identity database. - * - * @see Identity - * @see Key - * - * @author Benjamin Renaud - */ -public class IdentityDatabase extends IdentityScope implements Serializable { - - /** use serialVersionUID from JDK 1.1. for interoperability */ - private static final long serialVersionUID = 4923799573357658384L; - - /* Are we debugging? */ - private static final boolean debug = false; - - /* Are we printing out error messages? */ - private static final boolean error = true; - - /* The source file, if any, for this database. */ - File sourceFile; - - /* The private representation of the database. */ - Hashtable identities; - - IdentityDatabase() throws InvalidParameterException { - this("restoring..."); - } - - /** - * Construct a new, empty database with a specified source file. - * - * @param file - * the source file. - */ - public IdentityDatabase(File file) throws InvalidParameterException { - this(file.getName()); - sourceFile = file; - } - - /** - * Construct a new, empty database. - */ - public IdentityDatabase(String name) throws InvalidParameterException { - super(name); - identities = new Hashtable(); - } - - /** - * Initialize an identity database from a stream. The stream should contain - * data to initialized a serialized IdentityDatabase object. - * - * @param is - * the input stream from which to restore the database. - * - * @exception IOException - * if a stream IO exception occurs - */ - public static IdentityDatabase fromStream(InputStream is) throws IOException { - IdentityDatabase db = null; - try { - ObjectInputStream ois = new ObjectInputStream(is); - db = (IdentityDatabase) ois.readObject(); - } catch (ClassNotFoundException e) { - // this can't happen. - debug("This should not be happening.", e); - error("The version of the database is obsolete. Cannot initialize."); - - } catch (InvalidClassException e) { - // this may happen in developers workspaces happen. - debug("This should not be happening.", e); - error("Unable to initialize system identity scope: " - + " InvalidClassException. \nThis is most likely due to " - + "a serialization versioning problem: a class used in " - + "key management was obsoleted"); - - } catch (StreamCorruptedException e) { - debug("The serialization stream is corrupted. Unable to load.", e); - error("Unable to initialize system identity scope." - + " StreamCorruptedException."); - } - - if (db == null) { - db = new IdentityDatabase("uninitialized"); - } - - return db; - } - - /** - * Initialize an IdentityDatabase from file. - * - * @param f - * the filename where the identity database is stored. - * - * @exception IOException - * a file-related exception occurs (e.g. the directory of the - * file passed does not exists, etc. - * - * @IOException if a file IO exception occurs. - */ - public static IdentityDatabase fromFile(File f) throws IOException { - FileInputStream fis = new FileInputStream(f); - IdentityDatabase edb = fromStream(fis); - edb.sourceFile = f; - return edb; - } - - /** - * @return the number of identities in the database. - */ - public int size() { - return identities.size(); - } - - /** - * @param name - * the name of the identity to be retrieved. - * - * @return the identity named name, or null if there are no identities named - * name in the database. - */ - public Identity getIdentity(String name) { - Identity id = identities.get(name); - if (id instanceof Signer) { - localCheck("get.signer"); - } - return id; - } - - /** - * Get an identity by key. - * - * @param name - * the key of the identity to be retrieved. - * - * @return the identity with a given key, or null if there are no identities - * with that key in the database. - */ - public Identity getIdentity(PublicKey key) { - if (key == null) { - return null; - } - Enumeration e = identities(); - while (e.hasMoreElements()) { - Identity i = e.nextElement(); - PublicKey k = i.getPublicKey(); - if (k != null && keyEqual(k, key)) { - if (i instanceof Signer) { - localCheck("get.signer"); - } - return i; - } - } - return null; - } - - private boolean keyEqual(Key key1, Key key2) { - if (key1 == key2) { - return true; - } else { - return MessageDigest.isEqual(key1.getEncoded(), key2.getEncoded()); - } - } - - /** - * Adds an identity to the database. - * - * @param identity - * the identity to be added. - * - * @exception KeyManagementException - * if a name or key clash occurs, or if another exception occurs. - */ - public void addIdentity(Identity identity) throws KeyManagementException { - localCheck("add.identity"); - Identity byName = getIdentity(identity.getName()); - Identity byKey = getIdentity(identity.getPublicKey()); - String msg = null; - - if (byName != null) { - msg = "name conflict"; - } - if (byKey != null) { - msg = "key conflict"; - } - if (msg != null) { - throw new KeyManagementException(msg); - } - identities.put(identity.getName(), identity); - } - - /** - * Removes an identity to the database. - */ - public void removeIdentity(Identity identity) throws KeyManagementException { - localCheck("remove.identity"); - String name = identity.getName(); - if (identities.get(name) == null) { - throw new KeyManagementException( - "there is no identity named " + name + " in " + this); - } - identities.remove(name); - } - - /** - * @return an enumeration of all identities in the database. - */ - public Enumeration identities() { - return identities.elements(); - } - - /** - * Set the source file for this database. - */ - void setSourceFile(File f) { - sourceFile = f; - } - - /** - * @return the source file for this database. - */ - File getSourceFile() { - return sourceFile; - } - - /** - * Save the database in its current state to an output stream. - * - * @param os - * the output stream to which the database should be serialized. - * - * @exception IOException - * if an IO exception is raised by stream operations. - */ - public void save(OutputStream os) throws IOException { - try { - ObjectOutputStream oos = new ObjectOutputStream(os); - oos.writeObject(this); - oos.flush(); - } catch (InvalidClassException e) { - debug("This should not be happening.", e); - return; - } - } - - /** - * Save the database to a file. - * - * @exception IOException - * if an IO exception is raised by stream operations. - */ - void save(File f) throws IOException { - setSourceFile(f); - FileOutputStream fos = new FileOutputStream(f); - save(fos); - } - - /** - * Saves the database to the default source file. - * - * @exception KeyManagementException - * when there is no default source file specified for this - * database. - */ - public void save() throws IOException { - if (sourceFile == null) { - throw new IOException("this database has no source file"); - } - save(sourceFile); - } - - /** - * This method returns the file from which to initialize the system database. - */ - private static File systemDatabaseFile() { - - // First figure out where the identity database is hiding, if anywhere. - String dbPath = Security.getProperty("identity.database"); - // if nowhere, it's the canonical place. - if (dbPath == null) { - dbPath = System.getProperty("user.home") + File.separatorChar - + "identitydb.obj"; - } - return new File(dbPath); - } - - /* This block initializes the system database, if there is one. */ - static { - java.security.AccessController - .doPrivileged(new java.security.PrivilegedAction() { - public Void run() { - initializeSystem(); - return null; - } - }); - } - - /** - * This method initializes the system's identity database. The canonical - * location is /identitydatabase.obj. This is settable through the - * identity.database property. - */ - private static void initializeSystem() { - - IdentityDatabase systemDatabase; - File dbFile = systemDatabaseFile(); - - // Second figure out if it's there, and if it isn't, create one. - try { - if (dbFile.exists()) { - debug("loading system database from file: " + dbFile); - systemDatabase = fromFile(dbFile); - } else { - systemDatabase = new IdentityDatabase(dbFile); - } - IdentityScope.setSystemScope(systemDatabase); - debug("System database initialized: " + systemDatabase); - } catch (IOException e) { - debug("Error initializing identity database: " + dbFile, e); - return; - } catch (InvalidParameterException e) { - debug("Error trying to instantiate a system identities db in " + dbFile, - e); - return; - } - } - - /* - * private static File securityPropFile(String filename) { // maybe check for - * a system property which will specify where to // look. String sep = - * File.separator; return new File(System.getProperty("java.home") + sep + - * "lib" + sep + "security" + sep + filename); } - */ - - public String toString() { - return "sun.security.provider.IdentityDatabase, source file: " + sourceFile; - } - - private static void debug(String s) { - if (debug) { - System.err.println(s); - } - } - - private static void debug(String s, Throwable t) { - if (debug) { - t.printStackTrace(); - System.err.println(s); - } - } - - private static void error(String s) { - if (error) { - System.err.println(s); - } - } - - void localCheck(String directive) { - } - - /** - * Returns a parsable name for identity: identityName.scopeName - */ - String localFullName() { - String parsable = getName(); - if (getScope() != null) { - parsable += "." + getScope().getName(); - } - return parsable; - } - - /** - * Serialization write. - */ - private synchronized void writeObject(java.io.ObjectOutputStream stream) - throws IOException { - localCheck("serialize.identity.database"); - stream.writeObject(identities); - stream.writeObject(sourceFile); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java deleted file mode 100644 index b5d1e4001d..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java +++ /dev/null @@ -1,2407 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.provider; - -import java.io.*; -import java.lang.RuntimePermission; -import java.lang.reflect.*; -import java.lang.ref.*; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URI; -import java.util.*; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.StringTokenizer; -import java.util.PropertyPermission; -import java.util.ArrayList; -import java.util.ListIterator; -import java.util.WeakHashMap; -import java.text.MessageFormat; -//import com.sun.security.auth.PrincipalComparator; -import com.sun.ts.lib.util.sec.security.auth.PrincipalComparator; -import java.security.*; -import java.security.cert.Certificate; -import java.security.cert.X509Certificate; -import javax.security.auth.PrivateCredentialPermission; -import javax.security.auth.Subject; -import javax.security.auth.x500.X500Principal; -import java.io.FilePermission; -import java.net.SocketPermission; -import java.net.NetPermission; -import java.util.PropertyPermission; -import java.util.concurrent.atomic.AtomicReference; -import java.awt.AWTPermission; -/* -import javax.security.auth.AuthPermission; -import javax.security.auth.kerberos.ServicePermission; -import javax.security.auth.kerberos.DelegationPermission; -import java.io.SerializablePermission; -import java.util.logging.LoggingPermission; -import java.sql.SQLPermission; -import java.lang.reflect.ReflectPermission; -import javax.sound.sampled.AudioPermission; -import javax.net.ssl.SSLPermission; -*/ -import com.sun.ts.lib.util.sec.misc.JavaSecurityProtectionDomainAccess; -import static com.sun.ts.lib.util.sec.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache; -import com.sun.ts.lib.util.sec.misc.SharedSecrets; -import com.sun.ts.lib.util.sec.security.util.Password; -import com.sun.ts.lib.util.sec.security.util.PolicyUtil; -import com.sun.ts.lib.util.sec.security.util.PropertyExpander; -import com.sun.ts.lib.util.sec.security.util.Debug; -import com.sun.ts.lib.util.sec.security.util.ResourcesMgr; -import com.sun.ts.lib.util.sec.security.util.SecurityConstants; -import com.sun.ts.lib.util.sec.net.www.ParseUtil; - -/** - * This class represents a default implementation for - * java.security.Policy. - * - * Note: For backward compatibility with JAAS 1.0 it loads both java.auth.policy - * and java.policy. However it is recommended that java.auth.policy be not used - * and the java.policy contain all grant entries including that contain - * principal-based entries. - * - * - *

- * This object stores the policy for entire Java runtime, and is the - * amalgamation of multiple static policy configurations that resides in files. - * The algorithm for locating the policy file(s) and reading their information - * into this Policy object is: - * - *

    - *
  1. Loop through the java.security.Security properties, - * policy.url.1, policy.url.2, ..., policy.url.X" and - * auth.policy.url.1, auth.policy.url.2, ..., - * auth.policy.url.X". These properties are set in the Java security - * properties file, which is located in the file named - * <JAVA_HOME>/lib/security/java.security. <JAVA_HOME> refers to the - * value of the java.home system property, and specifies the directory where the - * JRE is installed. Each property value specifies a URL pointing - * to a policy file to be loaded. Read in and load each policy. - * - * auth.policy.url is supported only for backward compatibility. - * - *
  2. The java.lang.System property java.security.policy - * may also be set to a URL pointing to another policy file (which - * is the case when a user uses the -D switch at runtime). If this property is - * defined, and its use is allowed by the security property file (the Security - * property, policy.allowSystemProperty is set to true), also load - * that policy. - * - *
  3. The java.lang.System property - * java.security.auth.policy may also be set to a URL - * pointing to another policy file (which is the case when a user uses the -D - * switch at runtime). If this property is defined, and its use is allowed by - * the security property file (the Security property, - * policy.allowSystemProperty is set to true), also load that - * policy. - * - * java.security.auth.policy is supported only for backward - * compatibility. - * - * If the java.security.policy or java.security.auth.policy - * property is defined using "==" (rather than "="), then ignore all other - * specified policies and only load this policy. - *
- * - * Each policy file consists of one or more grant entries, each of which - * consists of a number of permission entries. - * - *
- *   grant signedBy "alias", codeBase "URL",
- *         principal principalClass "principalName",
- *         principal principalClass "principalName",
- *         ... {
- *
- *     permission Type "name "action",
- *         signedBy "alias";
- *     permission Type "name "action",
- *         signedBy "alias";
- *     ....
- *   };
- * 
- * - * All non-bold items above must appear as is (although case doesn't matter and - * some are optional, as noted below). principal entries are optional and need - * not be present. Italicized items represent variable values. - * - *

- * A grant entry must begin with the word grant. The - * signedBy,codeBase and principal - * name/value pairs are optional. If they are not present, then any signer - * (including unsigned code) will match, and any codeBase will match. Note that - * the principalClass may be set to the wildcard value, *, which allows - * it to match any Principal class. In addition, the - * principalName may also be set to the wildcard value, *, allowing it to - * match any Principal name. When setting the principalName - * to the *, do not surround the * with quotes. - * - *

- * A permission entry must begin with the word permission. The word - * Type in the template above is a specific permission type, - * such as java.io.FilePermission or - * java.lang.RuntimePermission. - * - *

- * The "action" is required for many permission types, such as - * java.io.FilePermission (where it specifies what type of file - * access that is permitted). It is not required for categories such as - * java.lang.RuntimePermission where it is not necessary - you - * either have the permission specified by the "name" value - * following the type name or you don't. - * - *

- * The signedBy name/value pair for a permission entry is optional. - * If present, it indicates a signed permission. That is, the permission class - * itself must be signed by the given alias in order for it to be granted. For - * example, suppose you have the following grant entry: - * - *

- *   grant principal foo.com.Principal "Duke" {
- *     permission Foo "foobar", signedBy "FooSoft";
- *   }
- * 
- * - *

- * Then this permission of type Foo is granted if the - * Foo.class permission has been signed by the "FooSoft" alias, or - * if XXX Foo.class is a system class (i.e., is found on the - * CLASSPATH). - * - * - *

- * Items that appear in an entry must appear in the specified order - * (permission, Type, "name", and "action"). - * An entry is terminated with a semicolon. - * - *

- * Case is unimportant for the identifiers (permission, - * signedBy, codeBase, etc.) but is significant for - * the Type or for any string that is passed in as a value. - *

- * - *

- * An example of two entries in a policy configuration file is - * - *

- *   // if the code is comes from "foo.com" and is running as "Duke",
- *   // grant it read/write to all files in /tmp.
- *
- *   grant codeBase "foo.com", principal foo.com.Principal "Duke" {
- *              permission java.io.FilePermission "/tmp/*", "read,write";
- *   };
- *
- *   // grant any code running as "Duke" permission to read
- *   // the "java.vendor" Property.
- *
- *   grant principal foo.com.Principal "Duke" {
- *         permission java.util.PropertyPermission "java.vendor";
- *
- *
- * 
- * - * This Policy implementation supports special handling of any permission that - * contains the string, "${{self}}", as part of its target name. When - * such a permission is evaluated (such as during a security check), - * ${{self}} is replaced with one or more Principal class/name pairs. The - * exact replacement performed depends upon the contents of the grant clause to - * which the permission belongs. - *

- * - * If the grant clause does not contain any principal information, the - * permission will be ignored (permissions containing ${{self}} in their - * target names are only valid in the context of a principal-based grant - * clause). For example, BarPermission will always be ignored in the following - * grant clause: - * - *

- *    grant codebase "www.foo.com", signedby "duke" {
- *      permission BarPermission "... ${{self}} ...";
- *    };
- * 
- * - * If the grant clause contains principal information, ${{self}} will be - * replaced with that same principal information. For example, ${{self}} - * in BarPermission will be replaced by - * javax.security.auth.x500.X500Principal "cn=Duke" in the following - * grant clause: - * - *
- *    grant principal javax.security.auth.x500.X500Principal "cn=Duke" {
- *      permission BarPermission "... ${{self}} ...";
- *    };
- * 
- * - * If there is a comma-separated list of principals in the grant clause, then - * ${{self}} will be replaced by the same comma-separated list or - * principals. In the case where both the principal class and name are - * wildcarded in the grant clause, ${{self}} is replaced with all the - * principals associated with the Subject in the current - * AccessControlContext. - * - * - *

- * For PrivateCredentialPermissions, you can also use "self" instead of - * "${{self}}". However the use of "self" is deprecated in favour - * of "${{self}}". - * - * @see java.security.CodeSource - * @see java.security.Permissions - * @see java.security.ProtectionDomain - */ -public class PolicyFile extends java.security.Policy { - - private static final Debug debug = Debug.getInstance("policy"); - - private static final String NONE = "NONE"; - - private static final String P11KEYSTORE = "PKCS11"; - - private static final String SELF = "${{self}}"; - - private static final String X500PRINCIPAL = "javax.security.auth.x500.X500Principal"; - - private static final String POLICY = "java.security.policy"; - - private static final String SECURITY_MANAGER = "java.security.manager"; - - private static final String POLICY_URL = "policy.url."; - - private static final String AUTH_POLICY = "java.security.auth.policy"; - - private static final String AUTH_POLICY_URL = "auth.policy.url."; - - private static final int DEFAULT_CACHE_SIZE = 1; - - /** the scope to check */ - private static IdentityScope scope = null; - - // contains the policy grant entries, PD cache, and alias mapping - private AtomicReference policyInfo = new AtomicReference(); - - private boolean constructed = false; - - private boolean expandProperties = true; - - private boolean ignoreIdentityScope = false; - - private boolean allowSystemProperties = true; - - private boolean notUtf8 = false; - - private URL url; - - // for use with the reflection API - - private static final Class[] PARAMS0 = {}; - - private static final Class[] PARAMS1 = { String.class }; - - private static final Class[] PARAMS2 = { String.class, String.class }; - - /** - * Initializes the Policy object and reads the default policy configuration - * file(s) into the Policy object. - */ - public PolicyFile() { - init((URL) null); - } - - /** - * Initializes the Policy object and reads the default policy from the - * specified URL only. - */ - public PolicyFile(URL url) { - this.url = url; - init(url); - } - - /** - * Initializes the Policy object and reads the default policy configuration - * file(s) into the Policy object. - * - * The algorithm for locating the policy file(s) and reading their information - * into the Policy object is: - * - *

-   *   loop through the Security Properties named "policy.url.1",
-   *  ""policy.url.2", "auth.policy.url.1",  "auth.policy.url.2" etc, until
-   *   you don't find one. Each of these specify a policy file.
-   *
-   *   if none of these could be loaded, use a builtin static policy
-   *      equivalent to the default lib/security/java.policy file.
-   *
-   *   if the system property "java.policy" or "java.auth.policy" is defined
-   * (which is the
-   *      case when the user uses the -D switch at runtime), and
-   *     its use is allowed by the security property file,
-   *     also load it.
-   * 
- * - * Each policy file consists of one or more grant entries, each of which - * consists of a number of permission entries. - * - *
-   *   grant signedBy "alias", codeBase "URL" {
-   *     permission Type "name", "action",
-   *         signedBy "alias";
-   *     ....
-   *     permission Type "name", "action",
-   *         signedBy "alias";
-   *   };
-   *
-   * 
- * - * All non-italicized items above must appear as is (although case doesn't - * matter and some are optional, as noted below). Italicized items represent - * variable values. - * - *

- * A grant entry must begin with the word grant. The - * signedBy and codeBase name/value pairs are - * optional. If they are not present, then any signer (including unsigned - * code) will match, and any codeBase will match. - * - *

- * A permission entry must begin with the word permission. The - * word Type in the template above would actually be a - * specific permission type, such as java.io.FilePermission or - * java.lang.RuntimePermission. - * - *

- * The "action" is required for many permission types, such as - * java.io.FilePermission (where it specifies what type of file - * access is permitted). It is not required for categories such as - * java.lang.RuntimePermission where it is not necessary - you - * either have the permission specified by the "name" - * value following the type name or you don't. - * - *

- * The signedBy name/value pair for a permission entry is - * optional. If present, it indicates a signed permission. That is, the - * permission class itself must be signed by the given alias in order for it - * to be granted. For example, suppose you have the following grant entry: - * - *

-   *   grant {
-   *     permission Foo "foobar", signedBy "FooSoft";
-   *   }
-   * 
- * - *

- * Then this permission of type Foo is granted if the - * Foo.class permission has been signed by the "FooSoft" alias, - * or if Foo.class is a system class (i.e., is found on the - * CLASSPATH). - * - *

- * Items that appear in an entry must appear in the specified order - * (permission, Type, "name", and "action"). - * An entry is terminated with a semicolon. - * - *

- * Case is unimportant for the identifiers (permission, - * signedBy, codeBase, etc.) but is significant for - * the Type or for any string that is passed in as a value. - *

- * - *

- * An example of two entries in a policy configuration file is - * - *

-   *   //  if the code is signed by "Duke", grant it read/write to all
-   *   // files in /tmp.
-   *
-   *   grant signedBy "Duke" {
-   *          permission java.io.FilePermission "/tmp/*", "read,write";
-   *   };
-   * 

- * // grant everyone the following permission - * - * grant { - * permission java.util.PropertyPermission "java.vendor"; - * }; - *

- */ - private void init(URL url) { - // Properties are set once for each init(); ignore changes between - // between diff invocations of initPolicyFile(policy, url, info). - String numCacheStr = AccessController - .doPrivileged(new PrivilegedAction() { - public String run() { - expandProperties = "true".equalsIgnoreCase( - Security.getProperty("policy.expandProperties")); - ignoreIdentityScope = "true".equalsIgnoreCase( - Security.getProperty("policy.ignoreIdentityScope")); - allowSystemProperties = "true".equalsIgnoreCase( - Security.getProperty("policy.allowSystemProperty")); - notUtf8 = "false".equalsIgnoreCase( - System.getProperty("sun.security.policy.utf8")); - return System.getProperty("sun.security.policy.numcaches"); - } - }); - - int numCaches; - if (numCacheStr != null) { - try { - numCaches = Integer.parseInt(numCacheStr); - } catch (NumberFormatException e) { - numCaches = DEFAULT_CACHE_SIZE; - } - } else { - numCaches = DEFAULT_CACHE_SIZE; - } - // System.out.println("number caches=" + numCaches); - PolicyInfo newInfo = new PolicyInfo(numCaches); - initPolicyFile(newInfo, url); - policyInfo.set(newInfo); - } - - private void initPolicyFile(final PolicyInfo newInfo, final URL url) { - - if (url != null) { - - /** - * If the caller specified a URL via Policy.getInstance, we only read from - * that URL - */ - - if (debug != null) { - debug.println("reading " + url); - } - AccessController.doPrivileged(new PrivilegedAction() { - public Void run() { - if (init(url, newInfo) == false) { - // use static policy if all else fails - initStaticPolicy(newInfo); - } - return null; - } - }); - - } else { - - /** - * Caller did not specify URL via Policy.getInstance. Read from URLs - * listed in the java.security properties file. - * - * We call initPolicyFile with POLICY , POLICY_URL and then call it with - * AUTH_POLICY and AUTH_POLICY_URL So first we will process the JAVA - * standard policy and then process the JAVA AUTH Policy. This is for - * backward compatibility as well as to handle cases where the user has a - * single unified policyfile with both java policy entries and auth - * entries - */ - - boolean loaded_one = initPolicyFile(POLICY, POLICY_URL, newInfo); - // To maintain strict backward compatibility - // we load the static policy only if POLICY load failed - if (!loaded_one) { - // use static policy if all else fails - initStaticPolicy(newInfo); - } - - initPolicyFile(AUTH_POLICY, AUTH_POLICY_URL, newInfo); - } - } - - private boolean initPolicyFile(final String propname, final String urlname, - final PolicyInfo newInfo) { - Boolean loadedPolicy = AccessController - .doPrivileged(new PrivilegedAction() { - public Boolean run() { - boolean loaded_policy = false; - - if (allowSystemProperties) { - String extra_policy = System.getProperty(propname); - if (extra_policy != null) { - boolean overrideAll = false; - if (extra_policy.startsWith("=")) { - overrideAll = true; - extra_policy = extra_policy.substring(1); - } - try { - extra_policy = PropertyExpander.expand(extra_policy); - URL policyURL; - - File policyFile = new File(extra_policy); - if (policyFile.exists()) { - policyURL = ParseUtil.fileToEncodedURL( - new File(policyFile.getCanonicalPath())); - } else { - policyURL = new URL(extra_policy); - } - if (debug != null) - debug.println("reading " + policyURL); - if (init(policyURL, newInfo)) - loaded_policy = true; - } catch (Exception e) { - // ignore. - if (debug != null) { - debug.println("caught exception: " + e); - } - } - if (overrideAll) { - if (debug != null) { - debug.println("overriding other policies!"); - } - return Boolean.valueOf(loaded_policy); - } - } - } - - int n = 1; - String policy_uri; - - while ((policy_uri = Security.getProperty(urlname + n)) != null) { - try { - URL policy_url = null; - String expanded_uri = PropertyExpander.expand(policy_uri) - .replace(File.separatorChar, '/'); - - if (policy_uri.startsWith("file:${java.home}/") - || policy_uri.startsWith("file:${user.home}/")) { - - // this special case accommodates - // the situation java.home/user.home - // expand to a single slash, resulting in - // a file://foo URI - policy_url = new File(expanded_uri.substring(5)).toURI() - .toURL(); - } else { - policy_url = new URI(expanded_uri).toURL(); - } - - if (debug != null) - debug.println("reading " + policy_url); - if (init(policy_url, newInfo)) - loaded_policy = true; - } catch (Exception e) { - if (debug != null) { - debug.println("error reading policy " + e); - e.printStackTrace(); - } - // ignore that policy - } - n++; - } - return Boolean.valueOf(loaded_policy); - } - }); - - return loadedPolicy.booleanValue(); - } - - /** - * Reads a policy configuration into the Policy object using a Reader object. - * - * @param policyFile - * the policy Reader object. - */ - private boolean init(URL policy, PolicyInfo newInfo) { - boolean success = false; - PolicyParser pp = new PolicyParser(expandProperties); - InputStreamReader isr = null; - try { - - // read in policy using UTF-8 by default - // - // check non-standard system property to see if - // the default encoding should be used instead - - if (notUtf8) { - isr = new InputStreamReader(PolicyUtil.getInputStream(policy)); - } else { - isr = new InputStreamReader(PolicyUtil.getInputStream(policy), "UTF-8"); - } - - pp.read(isr); - - KeyStore keyStore = null; - try { - keyStore = PolicyUtil.getKeyStore(policy, pp.getKeyStoreUrl(), - pp.getKeyStoreType(), pp.getKeyStoreProvider(), - pp.getStorePassURL(), debug); - } catch (Exception e) { - // ignore, treat it like we have no keystore - if (debug != null) { - e.printStackTrace(); - } - } - - Enumeration enum_ = pp.grantElements(); - while (enum_.hasMoreElements()) { - PolicyParser.GrantEntry ge = enum_.nextElement(); - addGrantEntry(ge, keyStore, newInfo); - } - } catch (PolicyParser.ParsingException pe) { - MessageFormat form = new MessageFormat(ResourcesMgr - .getString(POLICY + ": error parsing policy:\n\tmessage")); - Object[] source = { policy, pe.getLocalizedMessage() }; - System.err.println(form.format(source)); - if (debug != null) - pe.printStackTrace(); - - } catch (Exception e) { - if (debug != null) { - debug.println("error parsing " + policy); - debug.println(e.toString()); - e.printStackTrace(); - } - } finally { - if (isr != null) { - try { - isr.close(); - success = true; - } catch (IOException e) { - // ignore the exception - } - } else { - success = true; - } - } - - return success; - } - - private void initStaticPolicy(final PolicyInfo newInfo) { - AccessController.doPrivileged(new PrivilegedAction() { - public Void run() { - PolicyEntry pe = new PolicyEntry( - new CodeSource(null, (Certificate[]) null)); - pe.add(SecurityConstants.LOCAL_LISTEN_PERMISSION); - pe.add(new PropertyPermission("java.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vendor", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vendor.url", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.class.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("os.name", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("os.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("os.arch", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("file.separator", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("path.separator", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("line.separator", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.specification.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.specification.vendor", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.specification.name", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.specification.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.specification.vendor", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.specification.name", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.version", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.vendor", - SecurityConstants.PROPERTY_READ_ACTION)); - pe.add(new PropertyPermission("java.vm.name", - SecurityConstants.PROPERTY_READ_ACTION)); - - // No need to sync because noone has access to newInfo yet - newInfo.policyEntries.add(pe); - - return null; - } - }); - } - - /** - * Given a GrantEntry, create a codeSource. - * - * @return null if signedBy alias is not recognized - */ - private CodeSource getCodeSource(PolicyParser.GrantEntry ge, - KeyStore keyStore, PolicyInfo newInfo) - throws java.net.MalformedURLException { - Certificate[] certs = null; - if (ge.signedBy != null) { - certs = getCertificates(keyStore, ge.signedBy, newInfo); - if (certs == null) { - // we don't have a key for this alias, - // just return - if (debug != null) { - debug.println( - " -- No certs for alias '" + ge.signedBy + "' - ignoring entry"); - } - return null; - } - } - - URL location; - - if (ge.codeBase != null) - location = new URL(ge.codeBase); - else - location = null; - - return (canonicalizeCodebase(new CodeSource(location, certs), false)); - } - - /** - * Add one policy entry to the list. - */ - private void addGrantEntry(PolicyParser.GrantEntry ge, KeyStore keyStore, - PolicyInfo newInfo) { - - if (debug != null) { - debug.println("Adding policy entry: "); - debug.println(" signedBy " + ge.signedBy); - debug.println(" codeBase " + ge.codeBase); - if (ge.principals != null && ge.principals.size() > 0) { - ListIterator li = ge.principals - .listIterator(); - while (li.hasNext()) { - PolicyParser.PrincipalEntry pppe = li.next(); - debug.println(" " + pppe.toString()); - } - } - } - - try { - CodeSource codesource = getCodeSource(ge, keyStore, newInfo); - // skip if signedBy alias was unknown... - if (codesource == null) - return; - - // perform keystore alias principal replacement. - // for example, if alias resolves to X509 certificate, - // replace principal with: - // -- skip if alias is unknown - if (replacePrincipals(ge.principals, keyStore) == false) - return; - PolicyEntry entry = new PolicyEntry(codesource, ge.principals); - Enumeration enum_ = ge.permissionElements(); - while (enum_.hasMoreElements()) { - PolicyParser.PermissionEntry pe = enum_.nextElement(); - - try { - // perform ${{ ... }} expansions within permission name - expandPermissionName(pe, keyStore); - - // XXX special case PrivateCredentialPermission-SELF - Permission perm; - if (pe.permission - .equals("javax.security.auth.PrivateCredentialPermission") - && pe.name.endsWith(" self")) { - pe.name = pe.name.substring(0, pe.name.indexOf("self")) + SELF; - } - // check for self - if (pe.name != null && pe.name.indexOf(SELF) != -1) { - // Create a "SelfPermission" , it could be an - // an unresolved permission which will be resolved - // when implies is called - // Add it to entry - Certificate certs[]; - if (pe.signedBy != null) { - certs = getCertificates(keyStore, pe.signedBy, newInfo); - } else { - certs = null; - } - perm = new SelfPermission(pe.permission, pe.name, pe.action, certs); - } else { - perm = getInstance(pe.permission, pe.name, pe.action); - } - entry.add(perm); - if (debug != null) { - debug.println(" " + perm); - } - } catch (ClassNotFoundException cnfe) { - Certificate certs[]; - if (pe.signedBy != null) { - certs = getCertificates(keyStore, pe.signedBy, newInfo); - } else { - certs = null; - } - - // only add if we had no signer or we had a - // a signer and found the keys for it. - if (certs != null || pe.signedBy == null) { - Permission perm = new UnresolvedPermission(pe.permission, pe.name, - pe.action, certs); - entry.add(perm); - if (debug != null) { - debug.println(" " + perm); - } - } - } catch (java.lang.reflect.InvocationTargetException ite) { - MessageFormat form = new MessageFormat(ResourcesMgr.getString( - POLICY + ": error adding Permission, perm:\n\tmessage")); - Object[] source = { pe.permission, - ite.getTargetException().toString() }; - System.err.println(form.format(source)); - } catch (Exception e) { - MessageFormat form = new MessageFormat(ResourcesMgr.getString( - POLICY + ": error adding Permission, perm:\n\tmessage")); - Object[] source = { pe.permission, e.toString() }; - System.err.println(form.format(source)); - } - } - - // No need to sync because noone has access to newInfo yet - newInfo.policyEntries.add(entry); - } catch (Exception e) { - MessageFormat form = new MessageFormat( - ResourcesMgr.getString(POLICY + ": error adding Entry:\n\tmessage")); - Object[] source = { e.toString() }; - System.err.println(form.format(source)); - } - if (debug != null) - debug.println(); - } - - /** - * Returns a new Permission object of the given Type. The Permission is - * created by getting the Class object using the Class.forName - * method, and using the reflection API to invoke the (String name, String - * actions) constructor on the object. - * - * @param type - * the type of Permission being created. - * @param name - * the name of the Permission being created. - * @param actions - * the actions of the Permission being created. - * - * @exception ClassNotFoundException - * if the particular Permission class could not be found. - * - * @exception IllegalAccessException - * if the class or initializer is not accessible. - * - * @exception InstantiationException - * if getInstance tries to instantiate an abstract class or an - * interface, or if the instantiation fails for some other - * reason. - * - * @exception NoSuchMethodException - * if the (String, String) constructor is not found. - * - * @exception InvocationTargetException - * if the underlying Permission constructor throws an exception. - * - */ - - private static final Permission getInstance(String type, String name, - String actions) throws ClassNotFoundException, InstantiationException, - IllegalAccessException, NoSuchMethodException, InvocationTargetException { - // XXX we might want to keep a hash of created factories... - Class pc = Class.forName(type); - Permission answer = getKnownInstance(pc, name, actions); - if (answer != null) { - return answer; - } - - if (name == null && actions == null) { - try { - Constructor c = pc.getConstructor(PARAMS0); - return (Permission) c.newInstance(new Object[] {}); - } catch (NoSuchMethodException ne) { - try { - Constructor c = pc.getConstructor(PARAMS1); - return (Permission) c.newInstance(new Object[] { name }); - } catch (NoSuchMethodException ne1) { - Constructor c = pc.getConstructor(PARAMS2); - return (Permission) c.newInstance(new Object[] { name, actions }); - } - } - } else { - if (name != null && actions == null) { - try { - Constructor c = pc.getConstructor(PARAMS1); - return (Permission) c.newInstance(new Object[] { name }); - } catch (NoSuchMethodException ne) { - Constructor c = pc.getConstructor(PARAMS2); - return (Permission) c.newInstance(new Object[] { name, actions }); - } - } else { - Constructor c = pc.getConstructor(PARAMS2); - return (Permission) c.newInstance(new Object[] { name, actions }); - } - } - } - - /** - * Creates one of the well-known permissions directly instead of via - * reflection. Keep list short to not penalize non-JDK-defined permissions. - */ - private static final Permission getKnownInstance(Class claz, String name, - String actions) { - // XXX shorten list to most popular ones? - if (claz.equals(FilePermission.class)) { - return new FilePermission(name, actions); - } else if (claz.equals(SocketPermission.class)) { - return new SocketPermission(name, actions); - } else if (claz.equals(RuntimePermission.class)) { - return new RuntimePermission(name, actions); - } else if (claz.equals(PropertyPermission.class)) { - return new PropertyPermission(name, actions); - } else if (claz.equals(NetPermission.class)) { - return new NetPermission(name, actions); - } else if (claz.equals(AllPermission.class)) { - return SecurityConstants.ALL_PERMISSION; - } else if (claz.equals(AWTPermission.class)) { - return new AWTPermission(name, actions); - /* - * } else if (claz.equals(ReflectPermission.class)) { return new - * ReflectPermission(name, actions); } else if - * (claz.equals(SecurityPermission.class)) { return new - * SecurityPermission(name, actions); } else if - * (claz.equals(PrivateCredentialPermission.class)) { return new - * PrivateCredentialPermission(name, actions); } else if - * (claz.equals(AuthPermission.class)) { return new AuthPermission(name, - * actions); } else if (claz.equals(ServicePermission.class)) { return new - * ServicePermission(name, actions); } else if - * (claz.equals(DelegationPermission.class)) { return new - * DelegationPermission(name, actions); } else if - * (claz.equals(SerializablePermission.class)) { return new - * SerializablePermission(name, actions); } else if - * (claz.equals(AudioPermission.class)) { return new AudioPermission(name, - * actions); } else if (claz.equals(SSLPermission.class)) { return new - * SSLPermission(name, actions); } else if - * (claz.equals(LoggingPermission.class)) { return new - * LoggingPermission(name, actions); } else if - * (claz.equals(SQLPermission.class)) { return new SQLPermission(name, - * actions); - */ - } else { - return null; - } - } - - /** - * Fetch all certs associated with this alias. - */ - private Certificate[] getCertificates(KeyStore keyStore, String aliases, - PolicyInfo newInfo) { - - List vcerts = null; - - StringTokenizer st = new StringTokenizer(aliases, ","); - int n = 0; - - while (st.hasMoreTokens()) { - String alias = st.nextToken().trim(); - n++; - Certificate cert = null; - // See if this alias's cert has already been cached - synchronized (newInfo.aliasMapping) { - cert = (Certificate) newInfo.aliasMapping.get(alias); - - if (cert == null && keyStore != null) { - - try { - cert = keyStore.getCertificate(alias); - } catch (KeyStoreException kse) { - // never happens, because keystore has already been loaded - // when we call this - } - if (cert != null) { - newInfo.aliasMapping.put(alias, cert); - newInfo.aliasMapping.put(cert, alias); - } - } - } - - if (cert != null) { - if (vcerts == null) - vcerts = new ArrayList(); - vcerts.add(cert); - } - } - - // make sure n == vcerts.size, since we are doing a logical *and* - if (vcerts != null && n == vcerts.size()) { - Certificate[] certs = new Certificate[vcerts.size()]; - vcerts.toArray(certs); - return certs; - } else { - return null; - } - } - - /** - * Refreshes the policy object by re-reading all the policy files. - */ - @Override - public void refresh() { - init(url); - } - - /** - * Evaluates the the global policy for the permissions granted to the - * ProtectionDomain and tests whether the permission is granted. - * - * @param domain - * the ProtectionDomain to test - * @param permission - * the Permission object to be tested for implication. - * - * @return true if "permission" is a proper subset of a permission granted to - * this ProtectionDomain. - * - * @see java.security.ProtectionDomain - */ - @Override - public boolean implies(ProtectionDomain pd, Permission p) { - PolicyInfo pi = policyInfo.get(); - ProtectionDomainCache pdMap = pi.getPdMapping(); - - PermissionCollection pc = pdMap.get(pd); - - if (pc != null) { - return pc.implies(p); - } - - pc = getPermissions(pd); - if (pc == null) { - return false; - } - - // cache mapping of protection domain to its PermissionCollection - pdMap.put(pd, pc); - return pc.implies(p); - } - - /** - * Examines this Policy and returns the permissions granted to - * the specified ProtectionDomain. This includes the permissions - * currently associated with the domain as well as the policy permissions - * granted to the domain's CodeSource, ClassLoader, and Principals. - * - *

- * Note that this Policy implementation has special handling for - * PrivateCredentialPermissions. When this method encounters a - * PrivateCredentialPermission which specifies "self" as the - * Principal class and name, it does not add that - * Permission to the returned PermissionCollection. - * Instead, it builds a new PrivateCredentialPermission for each - * Principal associated with the provided Subject. - * Each new PrivateCredentialPermission contains the same - * Credential class as specified in the originally granted permission, as well - * as the Class and name for the respective Principal. - * - *

- * - * @param domain - * the Permissions granted to this ProtectionDomain are - * returned. - * - * @return the Permissions granted to the provided - * ProtectionDomain. - */ - @Override - public PermissionCollection getPermissions(ProtectionDomain domain) { - Permissions perms = new Permissions(); - - if (domain == null) - return perms; - - // first get policy perms - getPermissions(perms, domain); - - // add static perms - // - adding static perms after policy perms is necessary - // to avoid a regression for 4301064 - PermissionCollection pc = domain.getPermissions(); - if (pc != null) { - synchronized (pc) { - Enumeration e = pc.elements(); - while (e.hasMoreElements()) { - perms.add(e.nextElement()); - } - } - } - - return perms; - } - - /** - * Examines this Policy and creates a PermissionCollection object with the set - * of permissions for the specified CodeSource. - * - * @param CodeSource - * the codesource associated with the caller. This encapsulates the - * original location of the code (where the code came from) and the - * public key(s) of its signer. - * - * @return the set of permissions according to the policy. - */ - @Override - public PermissionCollection getPermissions(CodeSource codesource) { - return getPermissions(new Permissions(), codesource); - } - - /** - * Examines the global policy and returns the provided Permissions object with - * additional permissions granted to the specified ProtectionDomain. - * - * @param perm - * the Permissions to populate - * @param pd - * the ProtectionDomain associated with the caller. - * - * @return the set of Permissions according to the policy. - */ - private PermissionCollection getPermissions(Permissions perms, - ProtectionDomain pd) { - if (debug != null) { - debug.println("getPermissions:\n\t" + printPD(pd)); - } - - final CodeSource cs = pd.getCodeSource(); - if (cs == null) - return perms; - - CodeSource canonCodeSource = AccessController - .doPrivileged(new java.security.PrivilegedAction() { - public CodeSource run() { - return canonicalizeCodebase(cs, true); - } - }); - return getPermissions(perms, canonCodeSource, pd.getPrincipals()); - } - - /** - * Examines the global policy and returns the provided Permissions object with - * additional permissions granted to the specified CodeSource. - * - * @param permissions - * the permissions to populate - * @param codesource - * the codesource associated with the caller. This encapsulates the - * original location of the code (where the code came from) and the - * public key(s) of its signer. - * - * @return the set of permissions according to the policy. - */ - private PermissionCollection getPermissions(Permissions perms, - final CodeSource cs) { - - CodeSource canonCodeSource = AccessController - .doPrivileged(new java.security.PrivilegedAction() { - public CodeSource run() { - return canonicalizeCodebase(cs, true); - } - }); - - return getPermissions(perms, canonCodeSource, null); - } - - private Permissions getPermissions(Permissions perms, final CodeSource cs, - Principal[] principals) { - PolicyInfo pi = policyInfo.get(); - - for (PolicyEntry entry : pi.policyEntries) { - addPermissions(perms, cs, principals, entry); - } - - // Go through policyEntries gotten from identity db; sync required - // because checkForTrustedIdentity (below) might update list - synchronized (pi.identityPolicyEntries) { - for (PolicyEntry entry : pi.identityPolicyEntries) { - addPermissions(perms, cs, principals, entry); - } - } - - // now see if any of the keys are trusted ids. - if (!ignoreIdentityScope) { - Certificate certs[] = cs.getCertificates(); - if (certs != null) { - for (int k = 0; k < certs.length; k++) { - Object idMap = pi.aliasMapping.get(certs[k]); - if (idMap == null && checkForTrustedIdentity(certs[k], pi)) { - // checkForTrustedIdentity added it - // to the policy for us. next time - // around we'll find it. This time - // around we need to add it. - perms.add(SecurityConstants.ALL_PERMISSION); - } - } - } - } - return perms; - } - - private void addPermissions(Permissions perms, final CodeSource cs, - Principal[] principals, final PolicyEntry entry) { - - if (debug != null) { - debug.println("evaluate codesources:\n" + "\tPolicy CodeSource: " - + entry.getCodeSource() + "\n" + "\tActive CodeSource: " + cs); - } - - // check to see if the CodeSource implies - Boolean imp = AccessController - .doPrivileged(new PrivilegedAction() { - public Boolean run() { - return new Boolean(entry.getCodeSource().implies(cs)); - } - }); - if (!imp.booleanValue()) { - if (debug != null) { - debug.println("evaluation (codesource) failed"); - } - - // CodeSource does not imply - return and try next policy entry - return; - } - - // check to see if the Principals imply - - List entryPs = entry.getPrincipals(); - if (debug != null) { - ArrayList accPs = new ArrayList(); - if (principals != null) { - for (int i = 0; i < principals.length; i++) { - accPs.add(new PolicyParser.PrincipalEntry( - principals[i].getClass().getName(), principals[i].getName())); - } - } - debug.println("evaluate principals:\n" + "\tPolicy Principals: " + entryPs - + "\n" + "\tActive Principals: " + accPs); - } - - if (entryPs == null || entryPs.size() == 0) { - - // policy entry has no principals - - // add perms regardless of principals in current ACC - - addPerms(perms, principals, entry); - if (debug != null) { - debug.println("evaluation (codesource/principals) passed"); - } - return; - - } else if (principals == null || principals.length == 0) { - - // current thread has no principals but this policy entry - // has principals - perms are not added - - if (debug != null) { - debug.println("evaluation (principals) failed"); - } - return; - } - - // current thread has principals and this policy entry - // has principals. see if policy entry principals match - // principals in current ACC - - for (int i = 0; i < entryPs.size(); i++) { - PolicyParser.PrincipalEntry pppe = entryPs.get(i); - - // see if principal entry is a PrincipalComparator - - try { - Class pClass = Class.forName(pppe.principalClass, true, - Thread.currentThread().getContextClassLoader()); - - if (!PrincipalComparator.class.isAssignableFrom(pClass)) { - - // common case - dealing with regular Principal class. - // see if policy entry principal is in current ACC - - if (!checkEntryPs(principals, pppe)) { - if (debug != null) { - debug.println("evaluation (principals) failed"); - } - - // policy entry principal not in current ACC - - // immediately return and go to next policy entry - return; - } - - } else { - - // dealing with a PrincipalComparator - - Constructor c = pClass.getConstructor(PARAMS1); - PrincipalComparator pc = (PrincipalComparator) c - .newInstance(new Object[] { pppe.principalName }); - - if (debug != null) { - debug.println( - "found PrincipalComparator " + pc.getClass().getName()); - } - - // check if the PrincipalComparator - // implies the current thread's principals - - Set pSet = new HashSet(principals.length); - for (int j = 0; j < principals.length; j++) { - pSet.add(principals[j]); - } - Subject subject = new Subject(true, pSet, Collections.EMPTY_SET, - Collections.EMPTY_SET); - - if (!pc.implies(subject)) { - if (debug != null) { - debug.println("evaluation (principal comparator) failed"); - } - - // policy principal does not imply the current Subject - - // immediately return and go to next policy entry - return; - } - } - } catch (Exception e) { - // fall back to regular principal comparison. - // see if policy entry principal is in current ACC - - if (debug != null) { - e.printStackTrace(); - } - - if (!checkEntryPs(principals, pppe)) { - if (debug != null) { - debug.println("evaluation (principals) failed"); - } - - // policy entry principal not in current ACC - - // immediately return and go to next policy entry - return; - } - } - - // either the principal information matched, - // or the PrincipalComparator.implies succeeded. - // continue loop and test the next policy principal - } - - // all policy entry principals were found in the current ACC - - // grant the policy permissions - - if (debug != null) { - debug.println("evaluation (codesource/principals) passed"); - } - addPerms(perms, principals, entry); - } - - private void addPerms(Permissions perms, Principal[] accPs, - PolicyEntry entry) { - for (int i = 0; i < entry.permissions.size(); i++) { - Permission p = entry.permissions.get(i); - if (debug != null) { - debug.println(" granting " + p); - } - - if (p instanceof SelfPermission) { - // handle "SELF" permissions - expandSelf((SelfPermission) p, entry.getPrincipals(), accPs, perms); - } else { - perms.add(p); - } - } - } - - /** - * This method returns, true, if the principal in the policy entry, pppe, is - * part of the current thread's principal array, pList. This method also - * returns, true, if the policy entry's principal is appropriately wildcarded. - * - * Note that the provided pppe argument may have wildcards (*) for both - * the Principal class and name. - * - * @param pList - * an array of principals from the current thread's - * AccessControlContext. - * - * @param pppe - * a Principal specified in a policy grant entry. - * - * @return true if the current thread's pList "contains" the principal in the - * policy entry, pppe. This method also returns true if the policy - * entry's principal appropriately wildcarded. - */ - private boolean checkEntryPs(Principal[] pList, - PolicyParser.PrincipalEntry pppe) { - - for (int i = 0; i < pList.length; i++) { - - if (pppe.principalClass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) - || pppe.principalClass.equals(pList[i].getClass().getName())) { - - if (pppe.principalName.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME) - || pppe.principalName.equals(pList[i].getName())) { - - return true; - } - } - } - return false; - } - - /** - *

- * - * @param sp - * the SelfPermission that needs to be expanded - *

- * - * @param entryPs - * list of principals for the Policy entry. - * - * @param pdp - * Principal array from the current ProtectionDomain. - * - * @param perms - * the PermissionCollection where the individual Permissions will be - * added after expansion. - */ - - private void expandSelf(SelfPermission sp, - List entryPs, Principal[] pdp, - Permissions perms) { - - if (entryPs == null || entryPs.size() == 0) { - // No principals in the grant to substitute - if (debug != null) { - debug.println("Ignoring permission " + sp.getSelfType() - + " with target name (" + sp.getSelfName() + "). " - + "No Principal(s) specified " + "in the grant clause. " - + "SELF-based target names are " + "only valid in the context " - + "of a Principal-based grant entry."); - } - return; - } - int startIndex = 0; - int v; - StringBuilder sb = new StringBuilder(); - while ((v = sp.getSelfName().indexOf(SELF, startIndex)) != -1) { - - // add non-SELF string - sb.append(sp.getSelfName().substring(startIndex, v)); - - // expand SELF - ListIterator pli = entryPs.listIterator(); - while (pli.hasNext()) { - PolicyParser.PrincipalEntry pppe = pli.next(); - String[][] principalInfo = getPrincipalInfo(pppe, pdp); - for (int i = 0; i < principalInfo.length; i++) { - if (i != 0) { - sb.append(", "); - } - sb.append( - principalInfo[i][0] + " " + "\"" + principalInfo[i][1] + "\""); - } - if (pli.hasNext()) { - sb.append(", "); - } - } - startIndex = v + SELF.length(); - } - // add remaining string (might be the entire string) - sb.append(sp.getSelfName().substring(startIndex)); - - if (debug != null) { - debug.println(" expanded:\n\t" + sp.getSelfName() + "\n into:\n\t" - + sb.toString()); - } - try { - // first try to instantiate the permission - perms.add( - getInstance(sp.getSelfType(), sb.toString(), sp.getSelfActions())); - } catch (ClassNotFoundException cnfe) { - // ok, the permission is not in the bootclasspath. - // before we add an UnresolvedPermission, check to see - // whether this perm already belongs to the collection. - // if so, use that perm's ClassLoader to create a new - // one. - Class pc = null; - synchronized (perms) { - Enumeration e = perms.elements(); - while (e.hasMoreElements()) { - Permission pElement = e.nextElement(); - if (pElement.getClass().getName().equals(sp.getSelfType())) { - pc = pElement.getClass(); - break; - } - } - } - if (pc == null) { - // create an UnresolvedPermission - perms.add(new UnresolvedPermission(sp.getSelfType(), sb.toString(), - sp.getSelfActions(), sp.getCerts())); - } else { - try { - // we found an instantiated permission. - // use its class loader to instantiate a new permission. - Constructor c; - // name parameter can not be null - if (sp.getSelfActions() == null) { - try { - c = pc.getConstructor(PARAMS1); - perms.add( - (Permission) c.newInstance(new Object[] { sb.toString() })); - } catch (NoSuchMethodException ne) { - c = pc.getConstructor(PARAMS2); - perms.add((Permission) c.newInstance( - new Object[] { sb.toString(), sp.getSelfActions() })); - } - } else { - c = pc.getConstructor(PARAMS2); - perms.add((Permission) c.newInstance( - new Object[] { sb.toString(), sp.getSelfActions() })); - } - } catch (Exception nme) { - if (debug != null) { - debug.println("self entry expansion " + " instantiation failed: " - + nme.toString()); - } - } - } - } catch (Exception e) { - if (debug != null) { - debug.println(e.toString()); - } - } - } - - /** - * return the principal class/name pair in the 2D array. array[x][y]: x - * corresponds to the array length. if (y == 0), it's the principal class. if - * (y == 1), it's the principal name. - */ - private String[][] getPrincipalInfo(PolicyParser.PrincipalEntry pe, - Principal[] pdp) { - - // there are 3 possibilities: - // 1) the entry's Principal class and name are not wildcarded - // 2) the entry's Principal name is wildcarded only - // 3) the entry's Principal class and name are wildcarded - - if (!pe.principalClass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) - && !pe.principalName - .equals(PolicyParser.PrincipalEntry.WILDCARD_NAME)) { - - // build an info array for the principal - // from the Policy entry - String[][] info = new String[1][2]; - info[0][0] = pe.principalClass; - info[0][1] = pe.principalName; - return info; - - } else if (!pe.principalClass - .equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) - && pe.principalName.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME)) { - - // build an info array for every principal - // in the current domain which has a principal class - // that is equal to policy entry principal class name - List plist = new ArrayList(); - for (int i = 0; i < pdp.length; i++) { - if (pe.principalClass.equals(pdp[i].getClass().getName())) - plist.add(pdp[i]); - } - String[][] info = new String[plist.size()][2]; - int i = 0; - java.util.Iterator pIterator = plist.iterator(); - while (pIterator.hasNext()) { - Principal p = pIterator.next(); - info[i][0] = p.getClass().getName(); - info[i][1] = p.getName(); - i++; - } - return info; - - } else { - - // build an info array for every - // one of the current Domain's principals - - String[][] info = new String[pdp.length][2]; - - for (int i = 0; i < pdp.length; i++) { - info[i][0] = pdp[i].getClass().getName(); - info[i][1] = pdp[i].getName(); - } - return info; - } - } - - /* - * Returns the signer certificates from the list of certificates associated - * with the given code source. - * - * The signer certificates are those certificates that were used to - * verifysigned code originating from the codesource location. - * - * This method assumes that in the given code source, each signer certificate - * is followed by its supporting certificate chain (which may be empty), and - * that the signer certificate and its supporting certificate chain are - * ordered bottom-to-top (i.e., with the signer certificate first and the - * (root) certificate authority last). - */ - protected Certificate[] getSignerCertificates(CodeSource cs) { - Certificate[] certs = null; - if ((certs = cs.getCertificates()) == null) - return null; - for (int i = 0; i < certs.length; i++) { - if (!(certs[i] instanceof X509Certificate)) - return cs.getCertificates(); - } - - // Do we have to do anything? - int i = 0; - int count = 0; - while (i < certs.length) { - count++; - while (((i + 1) < certs.length) - && ((X509Certificate) certs[i]).getIssuerDN() - .equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { - i++; - } - i++; - } - if (count == certs.length) - // Done - return certs; - - ArrayList userCertList = new ArrayList(); - i = 0; - while (i < certs.length) { - userCertList.add(certs[i]); - while (((i + 1) < certs.length) - && ((X509Certificate) certs[i]).getIssuerDN() - .equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { - i++; - } - i++; - } - Certificate[] userCerts = new Certificate[userCertList.size()]; - userCertList.toArray(userCerts); - return userCerts; - } - - private CodeSource canonicalizeCodebase(CodeSource cs, - boolean extractSignerCerts) { - - String path = null; - - CodeSource canonCs = cs; - URL u = cs.getLocation(); - if (u != null && u.getProtocol().equals("file")) { - boolean isLocalFile = false; - String host = u.getHost(); - isLocalFile = (host == null || host.equals("") || host.equals("~") - || host.equalsIgnoreCase("localhost")); - - if (isLocalFile) { - path = u.getFile().replace('/', File.separatorChar); - path = ParseUtil.decode(path); - } - } - - if (path != null) { - try { - URL csUrl = null; - path = canonPath(path); - csUrl = ParseUtil.fileToEncodedURL(new File(path)); - - if (extractSignerCerts) { - canonCs = new CodeSource(csUrl, getSignerCertificates(cs)); - } else { - canonCs = new CodeSource(csUrl, cs.getCertificates()); - } - } catch (IOException ioe) { - // leave codesource as it is, unless we have to extract its - // signer certificates - if (extractSignerCerts) { - canonCs = new CodeSource(cs.getLocation(), getSignerCertificates(cs)); - } - } - } else { - if (extractSignerCerts) { - canonCs = new CodeSource(cs.getLocation(), getSignerCertificates(cs)); - } - } - return canonCs; - } - - // public for java.io.FilePermission - public static String canonPath(String path) throws IOException { - if (path.endsWith("*")) { - path = path.substring(0, path.length() - 1) + "-"; - path = new File(path).getCanonicalPath(); - return path.substring(0, path.length() - 1) + "*"; - } else { - return new File(path).getCanonicalPath(); - } - } - - private String printPD(ProtectionDomain pd) { - Principal[] principals = pd.getPrincipals(); - String pals = ""; - if (principals != null && principals.length > 0) { - StringBuilder palBuf = new StringBuilder("(principals "); - for (int i = 0; i < principals.length; i++) { - palBuf.append(principals[i].getClass().getName() + " \"" - + principals[i].getName() + "\""); - if (i < principals.length - 1) - palBuf.append(", "); - else - palBuf.append(")"); - } - pals = palBuf.toString(); - } - return "PD CodeSource: " + pd.getCodeSource() + "\n\t" + "PD ClassLoader: " - + pd.getClassLoader() + "\n\t" + "PD Principals: " + pals; - } - - /** - * return true if no replacement was performed, or if replacement succeeded. - */ - private boolean replacePrincipals( - List principals, KeyStore keystore) { - - if (principals == null || principals.size() == 0 || keystore == null) - return true; - - ListIterator i = principals.listIterator(); - while (i.hasNext()) { - PolicyParser.PrincipalEntry pppe = i.next(); - if (pppe.principalClass.equals(PolicyParser.REPLACE_NAME)) { - - // perform replacement - // (only X509 replacement is possible now) - String name; - if ((name = getDN(pppe.principalName, keystore)) == null) { - return false; - } - - if (debug != null) { - debug.println(" Replacing \"" + pppe.principalName + "\" with " - + X500PRINCIPAL + "/\"" + name + "\""); - } - - pppe.principalClass = X500PRINCIPAL; - pppe.principalName = name; - } - } - // return true if no replacement was performed, - // or if replacement succeeded - return true; - } - - private void expandPermissionName(PolicyParser.PermissionEntry pe, - KeyStore keystore) throws Exception { - // short cut the common case - if (pe.name == null || pe.name.indexOf("${{", 0) == -1) { - return; - } - - int startIndex = 0; - int b, e; - StringBuilder sb = new StringBuilder(); - while ((b = pe.name.indexOf("${{", startIndex)) != -1) { - e = pe.name.indexOf("}}", b); - if (e < 1) { - break; - } - sb.append(pe.name.substring(startIndex, b)); - - // get the value in ${{...}} - String value = pe.name.substring(b + 3, e); - - // parse up to the first ':' - int colonIndex; - String prefix = value; - String suffix; - if ((colonIndex = value.indexOf(":")) != -1) { - prefix = value.substring(0, colonIndex); - } - - // handle different prefix possibilities - if (prefix.equalsIgnoreCase("self")) { - // do nothing - handled later - sb.append(pe.name.substring(b, e + 2)); - startIndex = e + 2; - continue; - } else if (prefix.equalsIgnoreCase("alias")) { - // get the suffix and perform keystore alias replacement - if (colonIndex == -1) { - MessageFormat form = new MessageFormat( - ResourcesMgr.getString("alias name not provided (pe.name)")); - Object[] source = { pe.name }; - throw new Exception(form.format(source)); - } - suffix = value.substring(colonIndex + 1); - if ((suffix = getDN(suffix, keystore)) == null) { - MessageFormat form = new MessageFormat(ResourcesMgr - .getString("unable to perform substitution on alias, suffix")); - Object[] source = { value.substring(colonIndex + 1) }; - throw new Exception(form.format(source)); - } - - sb.append(X500PRINCIPAL + " \"" + suffix + "\""); - startIndex = e + 2; - } else { - MessageFormat form = new MessageFormat( - ResourcesMgr.getString("substitution value, prefix, unsupported")); - Object[] source = { prefix }; - throw new Exception(form.format(source)); - } - } - - // copy the rest of the value - sb.append(pe.name.substring(startIndex)); - - // replace the name with expanded value - if (debug != null) { - debug.println(" Permission name expanded from:\n\t" + pe.name - + "\nto\n\t" + sb.toString()); - } - pe.name = sb.toString(); - } - - private String getDN(String alias, KeyStore keystore) { - Certificate cert = null; - try { - cert = keystore.getCertificate(alias); - } catch (Exception e) { - if (debug != null) { - debug.println(" Error retrieving certificate for '" + alias + "': " - + e.toString()); - } - return null; - } - - if (cert == null || !(cert instanceof X509Certificate)) { - if (debug != null) { - debug.println( - " -- No certificate for '" + alias + "' - ignoring entry"); - } - return null; - } else { - X509Certificate x509Cert = (X509Certificate) cert; - - // 4702543: X500 names with an EmailAddress - // were encoded incorrectly. create new - // X500Principal name with correct encoding - - X500Principal p = new X500Principal( - x509Cert.getSubjectX500Principal().toString()); - return p.getName(); - } - } - - /** - * Checks public key. If it is marked as trusted in the identity database, add - * it to the policy with the AllPermission. - */ - private boolean checkForTrustedIdentity(final Certificate cert, - PolicyInfo myInfo) { - if (cert == null) - return false; - - // see if we are ignoring the identity scope or not - if (ignoreIdentityScope) - return false; - - // try to initialize scope - synchronized (PolicyFile.class) { - if (scope == null) { - IdentityScope is = IdentityScope.getSystemScope(); - - if (is instanceof com.sun.ts.lib.util.sec.security.provider.IdentityDatabase) { - scope = is; - } else { - // leave scope null - } - } - } - - if (scope == null) { - ignoreIdentityScope = true; - return false; - } - - // need privileged block for getIdentity in case we are trying - // to get a signer - final Identity id = AccessController - .doPrivileged(new java.security.PrivilegedAction() { - public Identity run() { - return scope.getIdentity(cert.getPublicKey()); - } - }); - - if (isTrusted(id)) { - if (debug != null) { - debug.println("Adding policy entry for trusted Identity: "); - // needed for identity toString! - AccessController - .doPrivileged(new java.security.PrivilegedAction() { - public Void run() { - debug.println(" identity = " + id); - return null; - } - }); - debug.println(""); - } - - // add it to the policy for future reference - Certificate certs[] = new Certificate[] { cert }; - PolicyEntry pe = new PolicyEntry(new CodeSource(null, certs)); - pe.add(SecurityConstants.ALL_PERMISSION); - - myInfo.identityPolicyEntries.add(pe); - - // add it to the mapping as well so - // we don't have to go through this again - myInfo.aliasMapping.put(cert, id.getName()); - - return true; - } - return false; - } - - private static boolean isTrusted(Identity id) { - if (id instanceof SystemIdentity) { - SystemIdentity sysid = (SystemIdentity) id; - if (sysid.isTrusted()) { - return true; - } - } else if (id instanceof SystemSigner) { - SystemSigner sysid = (SystemSigner) id; - if (sysid.isTrusted()) { - return true; - } - } - return false; - } - - /** - * Each entry in the policy configuration file is represented by a PolicyEntry - * object. - *

- * - * A PolicyEntry is a (CodeSource,Permission) pair. The CodeSource contains - * the (URL, PublicKey) that together identify where the Java bytecodes come - * from and who (if anyone) signed them. The URL could refer to localhost. The - * URL could also be null, meaning that this policy entry is given to all - * comers, as long as they match the signer field. The signer could be null, - * meaning the code is not signed. - *

- * - * The Permission contains the (Type, Name, Action) triplet. - *

- * - * For now, the Policy object retrieves the public key from the X.509 - * certificate on disk that corresponds to the signedBy alias specified in the - * Policy config file. For reasons of efficiency, the Policy object keeps a - * hashtable of certs already read in. This could be replaced by a secure - * internal key store. - * - *

- * For example, the entry - * - *

-   *          permission java.io.File "/tmp", "read,write",
-   *          signedBy "Duke";
-   * 
- * - * is represented internally - * - *
-   *
-   * FilePermission f = new FilePermission("/tmp", "read,write");
-   * PublicKey p = publickeys.get("Duke");
-   * URL u = InetAddress.getLocalHost();
-   * CodeBase c = new CodeBase(p, u);
-   * pe = new PolicyEntry(f, c);
-   * 
- * - * @author Marianne Mueller - * @author Roland Schemers - * @see java.security.CodeSource - * @see java.security.Policy - * @see java.security.Permissions - * @see java.security.ProtectionDomain - */ - private static class PolicyEntry { - - private final CodeSource codesource; - - final List permissions; - - private final List principals; - - /** - * Given a Permission and a CodeSource, create a policy entry. - * - * XXX Decide if/how to add validity fields and "purpose" fields to XXX - * policy entries - * - * @param cs - * the CodeSource, which encapsulates the URL and the public key - * attributes from the policy config file. Validity checks are - * performed on the public key before PolicyEntry is called. - * - */ - PolicyEntry(CodeSource cs, List principals) { - this.codesource = cs; - this.permissions = new ArrayList(); - this.principals = principals; // can be null - } - - PolicyEntry(CodeSource cs) { - this(cs, null); - } - - List getPrincipals() { - return principals; // can be null - } - - /** - * add a Permission object to this entry. No need to sync add op because - * perms are added to entry only while entry is being initialized - */ - void add(Permission p) { - permissions.add(p); - } - - /** - * Return the CodeSource for this policy entry - */ - CodeSource getCodeSource() { - return codesource; - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append(ResourcesMgr.getString("(")); - sb.append(getCodeSource()); - sb.append("\n"); - for (int j = 0; j < permissions.size(); j++) { - Permission p = permissions.get(j); - sb.append(ResourcesMgr.getString(" ")); - sb.append(ResourcesMgr.getString(" ")); - sb.append(p); - sb.append(ResourcesMgr.getString("\n")); - } - sb.append(ResourcesMgr.getString(")")); - sb.append(ResourcesMgr.getString("\n")); - return sb.toString(); - } - } - - private static class SelfPermission extends Permission { - - private static final long serialVersionUID = -8315562579967246806L; - - /** - * The class name of the Permission class that will be created when this - * self permission is expanded . - * - * @serial - */ - private String type; - - /** - * The permission name. - * - * @serial - */ - private String name; - - /** - * The actions of the permission. - * - * @serial - */ - private String actions; - - /** - * The certs of the permission. - * - * @serial - */ - private Certificate certs[]; - - /** - * Creates a new SelfPermission containing the permission information needed - * later to expand the self - * - * @param type - * the class name of the Permission class that will be created when - * this permission is expanded and if necessary resolved. - * @param name - * the name of the permission. - * @param actions - * the actions of the permission. - * @param certs - * the certificates the permission's class was signed with. This is - * a list of certificate chains, where each chain is composed of a - * signer certificate and optionally its supporting certificate - * chain. Each chain is ordered bottom-to-top (i.e., with the - * signer certificate first and the (root) certificate authority - * last). - */ - public SelfPermission(String type, String name, String actions, - Certificate certs[]) { - super(type); - if (type == null) { - throw new NullPointerException( - ResourcesMgr.getString("type can't be null")); - } - this.type = type; - this.name = name; - this.actions = actions; - if (certs != null) { - // Extract the signer certs from the list of certificates. - for (int i = 0; i < certs.length; i++) { - if (!(certs[i] instanceof X509Certificate)) { - // there is no concept of signer certs, so we store the - // entire cert array - this.certs = certs.clone(); - break; - } - } - - if (this.certs == null) { - // Go through the list of certs and see if all the certs are - // signer certs. - int i = 0; - int count = 0; - while (i < certs.length) { - count++; - while (((i + 1) < certs.length) - && ((X509Certificate) certs[i]).getIssuerDN() - .equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { - i++; - } - i++; - } - if (count == certs.length) { - // All the certs are signer certs, so we store the - // entire array - this.certs = certs.clone(); - } - - if (this.certs == null) { - // extract the signer certs - ArrayList signerCerts = new ArrayList(); - i = 0; - while (i < certs.length) { - signerCerts.add(certs[i]); - while (((i + 1) < certs.length) - && ((X509Certificate) certs[i]).getIssuerDN().equals( - ((X509Certificate) certs[i + 1]).getSubjectDN())) { - i++; - } - i++; - } - this.certs = new Certificate[signerCerts.size()]; - signerCerts.toArray(this.certs); - } - } - } - } - - /** - * This method always returns false for SelfPermission permissions. That is, - * an SelfPermission never considered to imply another permission. - * - * @param p - * the permission to check against. - * - * @return false. - */ - @Override - public boolean implies(Permission p) { - return false; - } - - /** - * Checks two SelfPermission objects for equality. - * - * Checks that obj is an SelfPermission, and has the same type - * (class) name, permission name, actions, and certificates as this object. - * - * @param obj - * the object we are testing for equality with this object. - * - * @return true if obj is an SelfPermission, and has the same type (class) - * name, permission name, actions, and certificates as this object. - */ - @Override - public boolean equals(Object obj) { - if (obj == this) - return true; - - if (!(obj instanceof SelfPermission)) - return false; - SelfPermission that = (SelfPermission) obj; - - if (!(this.type.equals(that.type) && this.name.equals(that.name) - && this.actions.equals(that.actions))) - return false; - - if (this.certs.length != that.certs.length) - return false; - - int i, j; - boolean match; - - for (i = 0; i < this.certs.length; i++) { - match = false; - for (j = 0; j < that.certs.length; j++) { - if (this.certs[i].equals(that.certs[j])) { - match = true; - break; - } - } - if (!match) - return false; - } - - for (i = 0; i < that.certs.length; i++) { - match = false; - for (j = 0; j < this.certs.length; j++) { - if (that.certs[i].equals(this.certs[j])) { - match = true; - break; - } - } - if (!match) - return false; - } - return true; - } - - /** - * Returns the hash code value for this object. - * - * @return a hash code value for this object. - */ - @Override - public int hashCode() { - int hash = type.hashCode(); - if (name != null) - hash ^= name.hashCode(); - if (actions != null) - hash ^= actions.hashCode(); - return hash; - } - - /** - * Returns the canonical string representation of the actions, which - * currently is the empty string "", since there are no actions for an - * SelfPermission. That is, the actions for the permission that will be - * created when this SelfPermission is resolved may be non-null, but an - * SelfPermission itself is never considered to have any actions. - * - * @return the empty string "". - */ - @Override - public String getActions() { - return ""; - } - - public String getSelfType() { - return type; - } - - public String getSelfName() { - return name; - } - - public String getSelfActions() { - return actions; - } - - public Certificate[] getCerts() { - return certs; - } - - /** - * Returns a string describing this SelfPermission. The convention is to - * specify the class name, the permission name, and the actions, in the - * following format: '(unresolved "ClassName" "name" "actions")'. - * - * @return information about this SelfPermission. - */ - @Override - public String toString() { - return "(SelfPermission " + type + " " + name + " " + actions + ")"; - } - } - - /** - * holds policy information that we need to synch on - */ - private static class PolicyInfo { - private static final boolean verbose = false; - - // Stores grant entries in the policy - final List policyEntries; - - // Stores grant entries gotten from identity database - // Use separate lists to avoid sync on policyEntries - final List identityPolicyEntries; - - // Maps aliases to certs - final Map aliasMapping; - - // Maps ProtectionDomain to PermissionCollection - private final ProtectionDomainCache[] pdMapping; - - private java.util.Random random; - - PolicyInfo(int numCaches) { - policyEntries = new ArrayList(); - identityPolicyEntries = Collections - .synchronizedList(new ArrayList(2)); - aliasMapping = Collections.synchronizedMap(new HashMap(11)); - - pdMapping = new ProtectionDomainCache[numCaches]; - JavaSecurityProtectionDomainAccess jspda = SharedSecrets - .getJavaSecurityProtectionDomainAccess(); - for (int i = 0; i < numCaches; i++) { - pdMapping[i] = jspda.getProtectionDomainCache(); - } - if (numCaches > 1) { - random = new java.util.Random(); - } - } - - ProtectionDomainCache getPdMapping() { - if (pdMapping.length == 1) { - return pdMapping[0]; - } else { - int i = java.lang.Math.abs(random.nextInt() % pdMapping.length); - return pdMapping[i]; - } - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java deleted file mode 100644 index e411438af2..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java +++ /dev/null @@ -1,1157 +0,0 @@ -/* - * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.provider; - -import java.io.*; -import java.lang.RuntimePermission; -import java.net.SocketPermission; -import java.net.URL; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.LinkedList; -import java.util.ListIterator; -import java.util.Vector; -import java.util.StringTokenizer; -import java.text.MessageFormat; -import javax.security.auth.x500.X500Principal; - -import java.security.GeneralSecurityException; -import com.sun.ts.lib.util.sec.security.util.Debug; -import com.sun.ts.lib.util.sec.security.util.PropertyExpander; -import com.sun.ts.lib.util.sec.security.util.ResourcesMgr; - -/** - * The policy for a Java runtime (specifying which permissions are available for - * code from various principals) is represented as a separate persistent - * configuration. The configuration may be stored as a flat ASCII file, as a - * serialized binary file of the Policy class, or as a database. - *

- * - *

- * The Java runtime creates one global Policy object, which is used to represent - * the static policy configuration file. It is consulted by a ProtectionDomain - * when the protection domain initializes its set of permissions. - *

- * - *

- * The Policy init method parses the policy configuration file, and - * then populates the Policy object. The Policy object is agnostic in that it is - * not involved in making policy decisions. It is merely the Java runtime - * representation of the persistent policy configuration file. - *

- * - *

- * When a protection domain needs to initialize its set of permissions, it - * executes code such as the following to ask the global Policy object to - * populate a Permissions object with the appropriate permissions: - * - *

- *  policy = Policy.getPolicy();
- *  Permissions perms = policy.getPermissions(protectiondomain)
- * 
- * - *

- * The protection domain contains CodeSource object, which encapsulates its - * codebase (URL) and public key attributes. It also contains the principals - * associated with the domain. The Policy object evaluates the global policy in - * light of who the principal is and what the code source is and returns an - * appropriate Permissions object. - * - * @author Roland Schemers - * @author Ram Marti - * - * @since 1.2 - */ - -public class PolicyParser { - - // needs to be public for PolicyTool - public static final String REPLACE_NAME = "PolicyParser.REPLACE_NAME"; - - private Vector grantEntries; - - // Convenience variables for parsing - private static final Debug debug = Debug.getInstance("parser", - "\t[Policy Parser]"); - - private StreamTokenizer st; - - private int lookahead; - - private boolean expandProp = false; - - private String keyStoreUrlString = null; // unexpanded - - private String keyStoreType = null; - - private String keyStoreProvider = null; - - private String storePassURL = null; - - private String expand(String value) throws PropertyExpander.ExpandException { - return expand(value, false); - } - - private String expand(String value, boolean encodeURL) - throws PropertyExpander.ExpandException { - if (!expandProp) { - return value; - } else { - return PropertyExpander.expand(value, encodeURL); - } - } - - /** - * Creates a PolicyParser object. - */ - - public PolicyParser() { - grantEntries = new Vector(); - } - - public PolicyParser(boolean expandProp) { - this(); - this.expandProp = expandProp; - } - - /** - * Reads a policy configuration into the Policy object using a Reader object. - *

- * - * @param policy - * the policy Reader object. - * - * @exception ParsingException - * if the policy configuration contains a syntax error. - * - * @exception IOException - * if an error occurs while reading the policy configuration. - */ - - public void read(Reader policy) throws ParsingException, IOException { - if (!(policy instanceof BufferedReader)) { - policy = new BufferedReader(policy); - } - - /** - * Configure the stream tokenizer: Recognize strings between "..." Don't - * convert words to lowercase Recognize both C-style and C++-style comments - * Treat end-of-line as white space, not as a token - */ - st = new StreamTokenizer(policy); - - st.resetSyntax(); - st.wordChars('a', 'z'); - st.wordChars('A', 'Z'); - st.wordChars('.', '.'); - st.wordChars('0', '9'); - st.wordChars('_', '_'); - st.wordChars('$', '$'); - st.wordChars(128 + 32, 255); - st.whitespaceChars(0, ' '); - st.commentChar('/'); - st.quoteChar('\''); - st.quoteChar('"'); - st.lowerCaseMode(false); - st.ordinaryChar('/'); - st.slashSlashComments(true); - st.slashStarComments(true); - - /** - * The main parsing loop. The loop is executed once for each entry in the - * config file. The entries are delimited by semicolons. Once we've read in - * the information for an entry, go ahead and try to add it to the policy - * vector. - * - */ - - lookahead = st.nextToken(); - while (lookahead != StreamTokenizer.TT_EOF) { - if (peek("grant")) { - GrantEntry ge = parseGrantEntry(); - // could be null if we couldn't expand a property - if (ge != null) - add(ge); - } else if (peek("keystore") && keyStoreUrlString == null) { - // only one keystore entry per policy file, others will be - // ignored - parseKeyStoreEntry(); - } else if (peek("keystorePasswordURL") && storePassURL == null) { - // only one keystore passwordURL per policy file, others will be - // ignored - parseStorePassURL(); - } else { - // error? - } - match(";"); - } - - if (keyStoreUrlString == null && storePassURL != null) { - throw new ParsingException(ResourcesMgr - .getString("keystorePasswordURL can not be specified without also " - + "specifying keystore")); - } - } - - public void add(GrantEntry ge) { - grantEntries.addElement(ge); - } - - public void replace(GrantEntry origGe, GrantEntry newGe) { - grantEntries.setElementAt(newGe, grantEntries.indexOf(origGe)); - } - - public boolean remove(GrantEntry ge) { - return grantEntries.removeElement(ge); - } - - /** - * Returns the (possibly expanded) keystore location, or null if the expansion - * fails. - */ - public String getKeyStoreUrl() { - try { - if (keyStoreUrlString != null && keyStoreUrlString.length() != 0) { - return expand(keyStoreUrlString, true).replace(File.separatorChar, '/'); - } - } catch (PropertyExpander.ExpandException peee) { - if (debug != null) { - debug.println(peee.toString()); - } - return null; - } - return null; - } - - public void setKeyStoreUrl(String url) { - keyStoreUrlString = url; - } - - public String getKeyStoreType() { - return keyStoreType; - } - - public void setKeyStoreType(String type) { - keyStoreType = type; - } - - public String getKeyStoreProvider() { - return keyStoreProvider; - } - - public void setKeyStoreProvider(String provider) { - keyStoreProvider = provider; - } - - public String getStorePassURL() { - try { - if (storePassURL != null && storePassURL.length() != 0) { - return expand(storePassURL, true).replace(File.separatorChar, '/'); - } - } catch (PropertyExpander.ExpandException peee) { - if (debug != null) { - debug.println(peee.toString()); - } - return null; - } - return null; - } - - public void setStorePassURL(String storePassURL) { - this.storePassURL = storePassURL; - } - - /** - * Enumerate all the entries in the global policy object. This method is used - * by policy admin tools. The tools should use the Enumeration methods on the - * returned object to fetch the elements sequentially. - */ - public Enumeration grantElements() { - return grantEntries.elements(); - } - - /** - * write out the policy - */ - - public void write(Writer policy) { - PrintWriter out = new PrintWriter(new BufferedWriter(policy)); - - Enumeration enum_ = grantElements(); - - out.println( - "/* AUTOMATICALLY GENERATED ON " + (new java.util.Date()) + "*/"); - out.println("/* DO NOT EDIT */"); - out.println(); - - // write the (unexpanded) keystore entry as the first entry of the - // policy file - if (keyStoreUrlString != null) { - writeKeyStoreEntry(out); - } - if (storePassURL != null) { - writeStorePassURL(out); - } - - // write "grant" entries - while (enum_.hasMoreElements()) { - GrantEntry ge = enum_.nextElement(); - ge.write(out); - out.println(); - } - out.flush(); - } - - /** - * parses a keystore entry - */ - private void parseKeyStoreEntry() throws ParsingException, IOException { - match("keystore"); - keyStoreUrlString = match("quoted string"); - - // parse keystore type - if (!peek(",")) { - return; // default type - } - match(","); - - if (peek("\"")) { - keyStoreType = match("quoted string"); - } else { - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("expected keystore type")); - } - - // parse keystore provider - if (!peek(",")) { - return; // provider optional - } - match(","); - - if (peek("\"")) { - keyStoreProvider = match("quoted string"); - } else { - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("expected keystore provider")); - } - } - - private void parseStorePassURL() throws ParsingException, IOException { - match("keyStorePasswordURL"); - storePassURL = match("quoted string"); - } - - /** - * writes the (unexpanded) keystore entry - */ - private void writeKeyStoreEntry(PrintWriter out) { - out.print("keystore \""); - out.print(keyStoreUrlString); - out.print('"'); - if (keyStoreType != null && keyStoreType.length() > 0) - out.print(", \"" + keyStoreType + "\""); - if (keyStoreProvider != null && keyStoreProvider.length() > 0) - out.print(", \"" + keyStoreProvider + "\""); - out.println(";"); - out.println(); - } - - private void writeStorePassURL(PrintWriter out) { - out.print("keystorePasswordURL \""); - out.print(storePassURL); - out.print('"'); - out.println(";"); - out.println(); - } - - /** - * parse a Grant entry - */ - private GrantEntry parseGrantEntry() throws ParsingException, IOException { - GrantEntry e = new GrantEntry(); - LinkedList principals = null; - boolean ignoreEntry = false; - - match("grant"); - - while (!peek("{")) { - - if (peekAndMatch("Codebase")) { - if (e.codeBase != null) - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("multiple Codebase expressions")); - e.codeBase = match("quoted string"); - peekAndMatch(","); - } else if (peekAndMatch("SignedBy")) { - if (e.signedBy != null) - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("multiple SignedBy expressions")); - e.signedBy = match("quoted string"); - - // verify syntax of the aliases - StringTokenizer aliases = new StringTokenizer(e.signedBy, ",", true); - int actr = 0; - int cctr = 0; - while (aliases.hasMoreTokens()) { - String alias = aliases.nextToken().trim(); - if (alias.equals(",")) - cctr++; - else if (alias.length() > 0) - actr++; - } - if (actr <= cctr) - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("SignedBy has empty alias")); - - peekAndMatch(","); - } else if (peekAndMatch("Principal")) { - if (principals == null) { - principals = new LinkedList(); - } - - String principalClass; - String principalName; - - if (peek("\"")) { - // both the principalClass and principalName - // will be replaced later - principalClass = REPLACE_NAME; - principalName = match("principal type"); - } else { - // check for principalClass wildcard - if (peek("*")) { - match("*"); - principalClass = PrincipalEntry.WILDCARD_CLASS; - } else { - principalClass = match("principal type"); - } - - // check for principalName wildcard - if (peek("*")) { - match("*"); - principalName = PrincipalEntry.WILDCARD_NAME; - } else { - principalName = match("quoted string"); - } - - // disallow WILDCARD_CLASS && actual name - if (principalClass.equals(PrincipalEntry.WILDCARD_CLASS) - && !principalName.equals(PrincipalEntry.WILDCARD_NAME)) { - if (debug != null) { - debug.println("disallowing principal that " - + "has WILDCARD class but no WILDCARD name"); - } - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("can not specify Principal with a " - + "wildcard class without a wildcard name")); - } - } - - try { - principalName = expand(principalName); - - if (principalClass.equals("javax.security.auth.x500.X500Principal") - && !principalName.equals(PrincipalEntry.WILDCARD_NAME)) { - - // 4702543: X500 names with an EmailAddress - // were encoded incorrectly. construct a new - // X500Principal with correct encoding. - - X500Principal p = new X500Principal( - (new X500Principal(principalName)).toString()); - principalName = p.getName(); - } - - principals.add(new PrincipalEntry(principalClass, principalName)); - } catch (PropertyExpander.ExpandException peee) { - // ignore the entire policy entry - // but continue parsing all the info - // so we can get to the next entry - if (debug != null) { - debug.println("principal name expansion failed: " + principalName); - } - ignoreEntry = true; - } - peekAndMatch(","); - - } else { - throw new ParsingException(st.lineno(), ResourcesMgr - .getString("expected codeBase or SignedBy or " + "Principal")); - } - } - - if (principals != null) - e.principals = principals; - match("{"); - - while (!peek("}")) { - if (peek("Permission")) { - try { - PermissionEntry pe = parsePermissionEntry(); - e.add(pe); - } catch (PropertyExpander.ExpandException peee) { - // ignore. The add never happened - if (debug != null) { - debug.println(peee.toString()); - } - skipEntry(); // BugId 4219343 - } - match(";"); - } else { - throw new ParsingException(st.lineno(), - ResourcesMgr.getString("expected permission entry")); - } - } - match("}"); - - try { - if (e.signedBy != null) - e.signedBy = expand(e.signedBy); - if (e.codeBase != null) { - - - e.codeBase = expand(e.codeBase, true).replace(File.separatorChar, - '/'); - } - } catch (PropertyExpander.ExpandException peee) { - if (debug != null) { - debug.println(peee.toString()); - } - return null; - } - - return (ignoreEntry == true) ? null : e; - } - - /** - * parse a Permission entry - */ - private PermissionEntry parsePermissionEntry() - throws ParsingException, IOException, PropertyExpander.ExpandException { - PermissionEntry e = new PermissionEntry(); - - // Permission - match("Permission"); - e.permission = match("permission type"); - - if (peek("\"")) { - // Permission name - e.name = expand(match("quoted string")); - } - - if (!peek(",")) { - return e; - } - match(","); - - if (peek("\"")) { - e.action = expand(match("quoted string")); - if (!peek(",")) { - return e; - } - match(","); - } - - if (peekAndMatch("SignedBy")) { - e.signedBy = expand(match("quoted string")); - } - return e; - } - - // package-private: used by PolicyFile for static policy - static String[] parseExtDirs(String codebase, int start) { - return null; - } - - private boolean peekAndMatch(String expect) - throws ParsingException, IOException { - if (peek(expect)) { - match(expect); - return true; - } else { - return false; - } - } - - private boolean peek(String expect) { - boolean found = false; - - switch (lookahead) { - - case StreamTokenizer.TT_WORD: - if (expect.equalsIgnoreCase(st.sval)) - found = true; - break; - case ',': - if (expect.equalsIgnoreCase(",")) - found = true; - break; - case '{': - if (expect.equalsIgnoreCase("{")) - found = true; - break; - case '}': - if (expect.equalsIgnoreCase("}")) - found = true; - break; - case '"': - if (expect.equalsIgnoreCase("\"")) - found = true; - break; - case '*': - if (expect.equalsIgnoreCase("*")) - found = true; - break; - default: - - } - return found; - } - - private String match(String expect) throws ParsingException, IOException { - String value = null; - - switch (lookahead) { - case StreamTokenizer.TT_NUMBER: - throw new ParsingException(st.lineno(), expect, - ResourcesMgr.getString("number ") + String.valueOf(st.nval)); - case StreamTokenizer.TT_EOF: - MessageFormat form = new MessageFormat( - ResourcesMgr.getString("expected [expect], read [end of file]")); - Object[] source = { expect }; - throw new ParsingException(form.format(source)); - case StreamTokenizer.TT_WORD: - if (expect.equalsIgnoreCase(st.sval)) { - lookahead = st.nextToken(); - } else if (expect.equalsIgnoreCase("permission type")) { - value = st.sval; - lookahead = st.nextToken(); - } else if (expect.equalsIgnoreCase("principal type")) { - value = st.sval; - lookahead = st.nextToken(); - } else { - throw new ParsingException(st.lineno(), expect, st.sval); - } - break; - case '"': - if (expect.equalsIgnoreCase("quoted string")) { - value = st.sval; - lookahead = st.nextToken(); - } else if (expect.equalsIgnoreCase("permission type")) { - value = st.sval; - lookahead = st.nextToken(); - } else if (expect.equalsIgnoreCase("principal type")) { - value = st.sval; - lookahead = st.nextToken(); - } else { - throw new ParsingException(st.lineno(), expect, st.sval); - } - break; - case ',': - if (expect.equalsIgnoreCase(",")) - lookahead = st.nextToken(); - else - throw new ParsingException(st.lineno(), expect, ","); - break; - case '{': - if (expect.equalsIgnoreCase("{")) - lookahead = st.nextToken(); - else - throw new ParsingException(st.lineno(), expect, "{"); - break; - case '}': - if (expect.equalsIgnoreCase("}")) - lookahead = st.nextToken(); - else - throw new ParsingException(st.lineno(), expect, "}"); - break; - case ';': - if (expect.equalsIgnoreCase(";")) - lookahead = st.nextToken(); - else - throw new ParsingException(st.lineno(), expect, ";"); - break; - case '*': - if (expect.equalsIgnoreCase("*")) - lookahead = st.nextToken(); - else - throw new ParsingException(st.lineno(), expect, "*"); - break; - default: - throw new ParsingException(st.lineno(), expect, - new String(new char[] { (char) lookahead })); - } - return value; - } - - /** - * skip all tokens for this entry leaving the delimiter ";" in the stream. - */ - private void skipEntry() throws ParsingException, IOException { - while (lookahead != ';') { - switch (lookahead) { - case StreamTokenizer.TT_NUMBER: - throw new ParsingException(st.lineno(), ";", - ResourcesMgr.getString("number ") + String.valueOf(st.nval)); - case StreamTokenizer.TT_EOF: - throw new ParsingException( - ResourcesMgr.getString("expected [;], read [end of file]")); - default: - lookahead = st.nextToken(); - } - } - } - - /** - * Each grant entry in the policy configuration file is represented by a - * GrantEntry object. - *

- * - *

- * For example, the entry - * - *

-   *      grant signedBy "Duke" {
-   *          permission java.io.FilePermission "/tmp", "read,write";
-   *      };
-   *
-   * 
- * - * is represented internally - * - *
-   *
-   * pe = new PermissionEntry("java.io.FilePermission", "/tmp", "read,write");
-   *
-   * ge = new GrantEntry("Duke", null);
-   *
-   * ge.add(pe);
-   *
-   * 
- * - * @author Roland Schemers - * - * version 1.19, 05/21/98 - */ - - public static class GrantEntry { - - public String signedBy; - - public String codeBase; - - public LinkedList principals; - - public Vector permissionEntries; - - public GrantEntry() { - principals = new LinkedList(); - permissionEntries = new Vector(); - } - - public GrantEntry(String signedBy, String codeBase) { - this.codeBase = codeBase; - this.signedBy = signedBy; - principals = new LinkedList(); - permissionEntries = new Vector(); - } - - public void add(PermissionEntry pe) { - permissionEntries.addElement(pe); - } - - public boolean remove(PrincipalEntry pe) { - return principals.remove(pe); - } - - public boolean remove(PermissionEntry pe) { - return permissionEntries.removeElement(pe); - } - - public boolean contains(PrincipalEntry pe) { - return principals.contains(pe); - } - - public boolean contains(PermissionEntry pe) { - return permissionEntries.contains(pe); - } - - /** - * Enumerate all the permission entries in this GrantEntry. - */ - public Enumeration permissionElements() { - return permissionEntries.elements(); - } - - public void write(PrintWriter out) { - out.print("grant"); - if (signedBy != null) { - out.print(" signedBy \""); - out.print(signedBy); - out.print('"'); - if (codeBase != null) - out.print(", "); - } - if (codeBase != null) { - out.print(" codeBase \""); - out.print(codeBase); - out.print('"'); - if (principals != null && principals.size() > 0) - out.print(",\n"); - } - if (principals != null && principals.size() > 0) { - ListIterator pli = principals.listIterator(); - while (pli.hasNext()) { - out.print(" "); - PrincipalEntry pe = pli.next(); - pe.write(out); - if (pli.hasNext()) - out.print(",\n"); - } - } - out.println(" {"); - Enumeration enum_ = permissionEntries.elements(); - while (enum_.hasMoreElements()) { - PermissionEntry pe = enum_.nextElement(); - out.write(" "); - pe.write(out); - } - out.println("};"); - } - - public Object clone() { - GrantEntry ge = new GrantEntry(); - ge.codeBase = this.codeBase; - ge.signedBy = this.signedBy; - ge.principals = new LinkedList(this.principals); - ge.permissionEntries = new Vector( - this.permissionEntries); - return ge; - } - } - - /** - * Principal info (class and name) in a grant entry - */ - public static class PrincipalEntry { - - public static final String WILDCARD_CLASS = "WILDCARD_PRINCIPAL_CLASS"; - - public static final String WILDCARD_NAME = "WILDCARD_PRINCIPAL_NAME"; - - String principalClass; - - String principalName; - - /** - * A PrincipalEntry consists of the Principal class and - * Principal name. - * - *

- * - * @param principalClass - * the Principal class. - *

- * - * @param principalName - * the Principal name. - *

- */ - public PrincipalEntry(String principalClass, String principalName) { - if (principalClass == null || principalName == null) - throw new NullPointerException( - ResourcesMgr.getString("null principalClass or principalName")); - this.principalClass = principalClass; - this.principalName = principalName; - } - - public String getPrincipalClass() { - return principalClass; - } - - public String getPrincipalName() { - return principalName; - } - - public String getDisplayClass() { - if (principalClass.equals(WILDCARD_CLASS)) { - return "*"; - } else if (principalClass.equals(REPLACE_NAME)) { - return ""; - } else - return principalClass; - } - - public String getDisplayName() { - return getDisplayName(false); - } - - public String getDisplayName(boolean addQuote) { - if (principalName.equals(WILDCARD_NAME)) { - return "*"; - } else { - if (addQuote) - return "\"" + principalName + "\""; - else - return principalName; - } - } - - public String toString() { - if (!principalClass.equals(REPLACE_NAME)) { - return getDisplayClass() + "/" + getDisplayName(); - } else { - return getDisplayName(); - } - } - - /** - * Test for equality between the specified object and this object. Two - * PrincipalEntries are equal if their PrincipalClass and PrincipalName - * values are equal. - * - *

- * - * @param obj - * the object to test for equality with this object. - * - * @return true if the objects are equal, false otherwise. - */ - public boolean equals(Object obj) { - if (this == obj) - return true; - - if (!(obj instanceof PrincipalEntry)) - return false; - - PrincipalEntry that = (PrincipalEntry) obj; - if (this.principalClass.equals(that.principalClass) - && this.principalName.equals(that.principalName)) { - return true; - } - - return false; - } - - /** - * Return a hashcode for this PrincipalEntry. - * - *

- * - * @return a hashcode for this PrincipalEntry. - */ - public int hashCode() { - return principalClass.hashCode(); - } - - public void write(PrintWriter out) { - out.print("principal " + getDisplayClass() + " " + getDisplayName(true)); - } - } - - /** - * Each permission entry in the policy configuration file is represented by a - * PermissionEntry object. - *

- * - *

- * For example, the entry - * - *

-   *          permission java.io.FilePermission "/tmp", "read,write";
-   * 
- * - * is represented internally - * - *
-   *
-   * pe = new PermissionEntry("java.io.FilePermission", "/tmp", "read,write");
-   * 
- * - * @author Roland Schemers - * - * version 1.19, 05/21/98 - */ - - public static class PermissionEntry { - - public String permission; - - public String name; - - public String action; - - public String signedBy; - - public PermissionEntry() { - } - - public PermissionEntry(String permission, String name, String action) { - this.permission = permission; - this.name = name; - this.action = action; - } - - /** - * Calculates a hash code value for the object. Objects which are equal will - * also have the same hashcode. - */ - public int hashCode() { - int retval = permission.hashCode(); - if (name != null) - retval ^= name.hashCode(); - if (action != null) - retval ^= action.hashCode(); - return retval; - } - - public boolean equals(Object obj) { - if (obj == this) - return true; - - if (!(obj instanceof PermissionEntry)) - return false; - - PermissionEntry that = (PermissionEntry) obj; - - if (this.permission == null) { - if (that.permission != null) - return false; - } else { - if (!this.permission.equals(that.permission)) - return false; - } - - if (this.name == null) { - if (that.name != null) - return false; - } else { - if (!this.name.equals(that.name)) - return false; - } - - if (this.action == null) { - if (that.action != null) - return false; - } else { - if (!this.action.equals(that.action)) - return false; - } - - if (this.signedBy == null) { - if (that.signedBy != null) - return false; - } else { - if (!this.signedBy.equals(that.signedBy)) - return false; - } - - // everything matched -- the 2 objects are equal - return true; - } - - public void write(PrintWriter out) { - out.print("permission "); - out.print(permission); - if (name != null) { - out.print(" \""); - - // ATTENTION: regex with double escaping, - // the normal forms look like: - // $name =~ s/\\/\\\\/g; and - // $name =~ s/\"/\\\"/g; - // and then in a java string, it's escaped again - - out.print( - name.replaceAll("\\\\", "\\\\\\\\").replaceAll("\\\"", "\\\\\\\"")); - out.print('"'); - } - if (action != null) { - out.print(", \""); - out.print(action); - out.print('"'); - } - if (signedBy != null) { - out.print(", signedBy \""); - out.print(signedBy); - out.print('"'); - } - out.println(";"); - } - } - - public static class ParsingException extends GeneralSecurityException { - - private static final long serialVersionUID = -4330692689482574072L; - - private String i18nMessage; - - /** - * Constructs a ParsingException with the specified detail message. A detail - * message is a String that describes this particular exception, which may, - * for example, specify which algorithm is not available. - * - * @param msg - * the detail message. - */ - public ParsingException(String msg) { - super(msg); - i18nMessage = msg; - } - - public ParsingException(int line, String msg) { - super("line " + line + ": " + msg); - MessageFormat form = new MessageFormat( - ResourcesMgr.getString("line number: msg")); - Object[] source = { new Integer(line), msg }; - i18nMessage = form.format(source); - } - - public ParsingException(int line, String expect, String actual) { - super("line " + line + ": expected [" + expect + "], found [" + actual - + "]"); - MessageFormat form = new MessageFormat(ResourcesMgr - .getString("line number: expected [expect], found [actual]")); - Object[] source = { new Integer(line), expect, actual }; - i18nMessage = form.format(source); - } - - public String getLocalizedMessage() { - return i18nMessage; - } - } - - public static void main(String arg[]) throws Exception { - FileReader fr = null; - FileWriter fw = null; - try { - PolicyParser pp = new PolicyParser(true); - fr = new FileReader(arg[0]); - pp.read(fr); - fw = new FileWriter(arg[1]); - pp.write(fw); - } finally { - if (fr != null) { - fr.close(); - } - - if (fw != null) { - fw.close(); - } - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java deleted file mode 100644 index 4a71073ec6..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.provider; - -import java.io.Serializable; -import java.util.Enumeration; -import java.security.*; - -/** - * An identity with a very simple trust mechanism. - * - * @author Benjamin Renaud - */ - -public class SystemIdentity extends Identity implements Serializable { - - /** use serialVersionUID from JDK 1.1. for interoperability */ - private static final long serialVersionUID = 9060648952088498478L; - - /* This should be changed to ACL */ - boolean trusted = false; - - /* Free form additional information about this identity. */ - private String info; - - public SystemIdentity(String name, IdentityScope scope) - throws InvalidParameterException, KeyManagementException { - super(name, scope); - } - - /** - * Is this identity trusted by sun.* facilities? - */ - public boolean isTrusted() { - return trusted; - } - - /** - * Set the trust status of this identity. - */ - protected void setTrusted(boolean trusted) { - this.trusted = trusted; - } - - void setIdentityInfo(String info) { - super.setInfo(info); - } - - String getIndentityInfo() { - return super.getInfo(); - } - - /** - * Call back method into a protected method for package friends. - */ - void setIdentityPublicKey(PublicKey key) throws KeyManagementException { - setPublicKey(key); - } - - /** - * Call back method into a protected method for package friends. - */ - void addIdentityCertificate(Certificate cert) throws KeyManagementException { - addCertificate(cert); - } - - void clearCertificates() throws KeyManagementException { - Certificate[] certs = certificates(); - for (int i = 0; i < certs.length; i++) { - removeCertificate(certs[i]); - } - } - - public String toString() { - String trustedString = "not trusted"; - if (trusted) { - trustedString = "trusted"; - } - return super.toString() + "[" + trustedString + "]"; - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java deleted file mode 100644 index d356952541..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.provider; - -import java.util.*; -import java.security.*; - -/** - * SunSecurity signer. Like SystemIdentity, it has a trust bit, which can be set - * by SunSecurity classes, and a set of accessors for other classes in - * sun.security.*. - * - * @author Benjamin Renaud - */ - -public class SystemSigner extends Signer { - - /** use serialVersionUID from JDK 1.1. for interoperability */ - private static final long serialVersionUID = -2127743304301557711L; - - /* Is this signer trusted */ - private boolean trusted = false; - - /** - * Construct a signer with a given name. - */ - public SystemSigner(String name) { - super(name); - } - - /** - * Construct a signer with a name and a scope. - * - * @param name - * the signer's name. - * - * @param scope - * the scope for this signer. - */ - public SystemSigner(String name, IdentityScope scope) - throws KeyManagementException { - - super(name, scope); - } - - /* Set the trust status of this signer */ - void setTrusted(boolean trusted) { - this.trusted = trusted; - } - - /** - * Returns true if this signer is trusted. - */ - public boolean isTrusted() { - return trusted; - } - - /* friendly callback for set keys */ - void setSignerKeyPair(KeyPair pair) - throws InvalidParameterException, KeyException { - setKeyPair(pair); - } - - /* friendly callback for getting private keys */ - PrivateKey getSignerPrivateKey() { - return getPrivateKey(); - } - - void setSignerInfo(String s) { - setInfo(s); - } - - /** - * Call back method into a protected method for package friends. - */ - void addSignerCertificate(Certificate cert) throws KeyManagementException { - addCertificate(cert); - } - - void clearCertificates() throws KeyManagementException { - Certificate[] certs = certificates(); - for (int i = 0; i < certs.length; i++) { - removeCertificate(certs[i]); - } - } - - public String toString() { - String trustedString = "not trusted"; - if (trusted) { - trustedString = "trusted"; - } - return super.toString() + "[" + trustedString + "]"; - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java deleted file mode 100644 index 0c9f6f7052..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java +++ /dev/null @@ -1,274 +0,0 @@ -/* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -import java.math.BigInteger; -import java.util.regex.Pattern; -import java.util.regex.Matcher; - -/** - * A utility class for debuging. - * - * @author Roland Schemers - */ -public class Debug { - - private String prefix; - - private static String args; - - static { - args = java.security.AccessController.doPrivileged( - new com.sun.ts.lib.util.sec.security.action.GetPropertyAction( - "java.security.debug")); - - String args2 = java.security.AccessController.doPrivileged( - new com.sun.ts.lib.util.sec.security.action.GetPropertyAction( - "java.security.auth.debug")); - - if (args == null) { - args = args2; - } else { - if (args2 != null) - args = args + "," + args2; - } - - if (args != null) { - args = marshal(args); - if (args.equals("help")) { - Help(); - } - } - } - - public static void Help() { - System.err.println(); - System.err.println("all turn on all debugging"); - System.err.println("access print all checkPermission results"); - System.err.println("combiner SubjectDomainCombiner debugging"); - System.err.println("gssloginconfig"); - System.err.println("configfile JAAS ConfigFile loading"); - System.err.println("configparser JAAS ConfigFile parsing"); - System.err.println(" GSS LoginConfigImpl debugging"); - System.err.println("jar jar verification"); - System.err.println("logincontext login context results"); - System.err.println("policy loading and granting"); - System.err.println("provider security provider debugging"); - System.err.println("scl permissions SecureClassLoader assigns"); - System.err.println(); - System.err.println("The following can be used with access:"); - System.err.println(); - System.err.println("stack include stack trace"); - System.err.println("domain dump all domains in context"); - System.err.println("failure before throwing exception, dump stack"); - System.err.println(" and domain that didn't have permission"); - System.err.println(); - System.err.println("The following can be used with stack and domain:"); - System.err.println(); - System.err.println("permission="); - System.err - .println(" only dump output if specified permission"); - System.err.println(" is being checked"); - System.err.println("codebase="); - System.err.println(" only dump output if specified codebase"); - System.err.println(" is being checked"); - - System.err.println(); - System.err.println("Note: Separate multiple options with a comma"); - System.exit(0); - } - - /** - * Get a Debug object corresponding to whether or not the given option is set. - * Set the prefix to be the same as option. - */ - - public static Debug getInstance(String option) { - return getInstance(option, option); - } - - /** - * Get a Debug object corresponding to whether or not the given option is set. - * Set the prefix to be prefix. - */ - public static Debug getInstance(String option, String prefix) { - if (isOn(option)) { - Debug d = new Debug(); - d.prefix = prefix; - return d; - } else { - return null; - } - } - - /** - * True if the system property "security.debug" contains the string "option". - */ - public static boolean isOn(String option) { - if (args == null) - return false; - else { - if (args.indexOf("all") != -1) - return true; - else - return (args.indexOf(option) != -1); - } - } - - /** - * print a message to stderr that is prefixed with the prefix created from the - * call to getInstance. - */ - - public void println(String message) { - System.err.println(prefix + ": " + message); - } - - /** - * print a blank line to stderr that is prefixed with the prefix. - */ - - public void println() { - System.err.println(prefix + ":"); - } - - /** - * print a message to stderr that is prefixed with the prefix. - */ - - public static void println(String prefix, String message) { - System.err.println(prefix + ": " + message); - } - - /** - * return a hexadecimal printed representation of the specified BigInteger - * object. the value is formatted to fit on lines of at least 75 characters, - * with embedded newlines. Words are separated for readability, with eight - * words (32 bytes) per line. - */ - public static String toHexString(BigInteger b) { - String hexValue = b.toString(16); - StringBuffer buf = new StringBuffer(hexValue.length() * 2); - - if (hexValue.startsWith("-")) { - buf.append(" -"); - hexValue = hexValue.substring(1); - } else { - buf.append(" "); // four spaces - } - if ((hexValue.length() % 2) != 0) { - // add back the leading 0 - hexValue = "0" + hexValue; - } - int i = 0; - while (i < hexValue.length()) { - // one byte at a time - buf.append(hexValue.substring(i, i + 2)); - i += 2; - if (i != hexValue.length()) { - if ((i % 64) == 0) { - buf.append("\n "); // line after eight words - } else if (i % 8 == 0) { - buf.append(" "); // space between words - } - } - } - return buf.toString(); - } - - /** - * change a string into lower case except permission classes and URLs. - */ - private static String marshal(String args) { - if (args != null) { - StringBuffer target = new StringBuffer(); - StringBuffer source = new StringBuffer(args); - - // obtain the "permission=" options - // the syntax of classname: IDENTIFIER.IDENTIFIER - // the regular express to match a class name: - // "[a-zA-Z_$][a-zA-Z0-9_$]*([.][a-zA-Z_$][a-zA-Z0-9_$]*)*" - String keyReg = "[Pp][Ee][Rr][Mm][Ii][Ss][Ss][Ii][Oo][Nn]="; - String keyStr = "permission="; - String reg = keyReg - + "[a-zA-Z_$][a-zA-Z0-9_$]*([.][a-zA-Z_$][a-zA-Z0-9_$]*)*"; - Pattern pattern = Pattern.compile(reg); - Matcher matcher = pattern.matcher(source); - StringBuffer left = new StringBuffer(); - while (matcher.find()) { - String matched = matcher.group(); - target.append(matched.replaceFirst(keyReg, keyStr)); - target.append(" "); - - // delete the matched sequence - matcher.appendReplacement(left, ""); - } - matcher.appendTail(left); - source = left; - - // obtain the "codebase=" options - // the syntax of URL is too flexible, and here assumes that the - // URL contains no space, comma(','), and semicolon(';'). That - // also means those characters also could be used as separator - // after codebase option. - // However, the assumption is incorrect in some special situation - // when the URL contains comma or semicolon - keyReg = "[Cc][Oo][Dd][Ee][Bb][Aa][Ss][Ee]="; - keyStr = "codebase="; - reg = keyReg + "[^, ;]*"; - pattern = Pattern.compile(reg); - matcher = pattern.matcher(source); - left = new StringBuffer(); - while (matcher.find()) { - String matched = matcher.group(); - target.append(matched.replaceFirst(keyReg, keyStr)); - target.append(" "); - - // delete the matched sequence - matcher.appendReplacement(left, ""); - } - matcher.appendTail(left); - source = left; - - // convert the rest to lower-case characters - target.append(source.toString().toLowerCase()); - - return target.toString(); - } - - return null; - } - - private final static char[] hexDigits = "0123456789abcdef".toCharArray(); - - public static String toString(byte[] b) { - if (b == null) { - return "(null)"; - } - StringBuilder sb = new StringBuilder(b.length * 3); - for (int i = 0; i < b.length; i++) { - int k = b[i] & 0xff; - if (i != 0) { - sb.append(':'); - } - sb.append(hexDigits[k >>> 4]); - sb.append(hexDigits[k & 0xf]); - } - return sb.toString(); - } - -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java deleted file mode 100644 index 24aeba29e6..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -import java.io.*; -import java.nio.*; -import java.nio.charset.*; -import java.util.Arrays; - -/** - * A utility class for reading passwords - * - */ -public class Password { - /** Reads user password from given input stream. */ - public static char[] readPassword(InputStream in) throws IOException { - - char[] consoleEntered = null; - byte[] consoleBytes = null; - - try { - // Use the new java.io.Console class - Console con = null; - if (in == System.in && ((con = System.console()) != null)) { - consoleEntered = con.readPassword(); - // readPassword returns "" if you just print ENTER, - // to be compatible with old Password class, change to null - if (consoleEntered != null && consoleEntered.length == 0) { - return null; - } - consoleBytes = convertToBytes(consoleEntered); - in = new ByteArrayInputStream(consoleBytes); - } - - // Rest of the lines still necessary for KeyStoreLoginModule - // and when there is no console. - - char[] lineBuffer; - char[] buf; - int i; - - buf = lineBuffer = new char[128]; - - int room = buf.length; - int offset = 0; - int c; - - boolean done = false; - while (!done) { - switch (c = in.read()) { - case -1: - case '\n': - done = true; - break; - - case '\r': - int c2 = in.read(); - if ((c2 != '\n') && (c2 != -1)) { - if (!(in instanceof PushbackInputStream)) { - in = new PushbackInputStream(in); - } - ((PushbackInputStream) in).unread(c2); - } else { - done = true; - break; - } - - default: - if (--room < 0) { - buf = new char[offset + 128]; - room = buf.length - offset - 1; - System.arraycopy(lineBuffer, 0, buf, 0, offset); - Arrays.fill(lineBuffer, ' '); - lineBuffer = buf; - } - buf[offset++] = (char) c; - break; - } - } - - if (offset == 0) { - return null; - } - - char[] ret = new char[offset]; - System.arraycopy(buf, 0, ret, 0, offset); - Arrays.fill(buf, ' '); - - return ret; - } finally { - if (consoleEntered != null) { - Arrays.fill(consoleEntered, ' '); - } - if (consoleBytes != null) { - Arrays.fill(consoleBytes, (byte) 0); - } - } - } - - /** - * Change a password read from Console.readPassword() into its original bytes. - * - * @param pass - * a char[] - * @return its byte[] format, similar to new String(pass).getBytes() - */ - private static byte[] convertToBytes(char[] pass) { - if (enc == null) { - synchronized (Password.class) { - enc = com.sun.ts.lib.util.sec.misc.SharedSecrets.getJavaIOAccess() - .charset().newEncoder().onMalformedInput(CodingErrorAction.REPLACE) - .onUnmappableCharacter(CodingErrorAction.REPLACE); - } - } - byte[] ba = new byte[(int) (enc.maxBytesPerChar() * pass.length)]; - ByteBuffer bb = ByteBuffer.wrap(ba); - synchronized (enc) { - enc.reset().encode(CharBuffer.wrap(pass), bb, true); - } - if (bb.position() < ba.length) { - ba[bb.position()] = '\n'; - } - return ba; - } - - private static volatile CharsetEncoder enc; -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java deleted file mode 100644 index dc4d5441fa..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -import java.io.*; -import java.net.*; -import java.security.*; -import java.util.Arrays; - -import com.sun.ts.lib.util.sec.net.www.ParseUtil; - -/** - * A utility class for getting a KeyStore instance from policy information. In - * addition, a supporting getInputStream method. - * - */ -public class PolicyUtil { - - // standard PKCS11 KeyStore type - private static final String P11KEYSTORE = "PKCS11"; - - // reserved word - private static final String NONE = "NONE"; - - /* - * Fast path reading from file urls in order to avoid calling - * FileURLConnection.connect() which can be quite slow the first time it is - * called. We really should clean up FileURLConnection so that this is not a - * problem but in the meantime this fix helps reduce start up time noticeably - * for the new launcher. -- DAC - */ - public static InputStream getInputStream(URL url) throws IOException { - if ("file".equals(url.getProtocol())) { - String path = url.getFile().replace('/', File.separatorChar); - path = ParseUtil.decode(path); - return new FileInputStream(path); - } else { - return url.openStream(); - } - } - - /** - * this is intended for use by policytool and the policy parser to instantiate - * a KeyStore from the information in the GUI/policy file - */ - public static KeyStore getKeyStore(URL policyUrl, // URL of policy file - String keyStoreName, // input: keyStore URL - String keyStoreType, // input: keyStore type - String keyStoreProvider, // input: keyStore provider - String storePassURL, // input: keyStore password - Debug debug) throws KeyStoreException, MalformedURLException, IOException, - NoSuchProviderException, NoSuchAlgorithmException, - java.security.cert.CertificateException { - - if (keyStoreName == null) { - throw new IllegalArgumentException("null KeyStore name"); - } - - char[] keyStorePassword = null; - try { - KeyStore ks; - if (keyStoreType == null) { - keyStoreType = KeyStore.getDefaultType(); - } - - if (P11KEYSTORE.equalsIgnoreCase(keyStoreType) - && !NONE.equals(keyStoreName)) { - throw new IllegalArgumentException("Invalid value (" + keyStoreName - + ") for keystore URL. If the keystore type is \"" + P11KEYSTORE - + "\", the keystore url must be \"" + NONE + "\""); - } - - if (keyStoreProvider != null) { - ks = KeyStore.getInstance(keyStoreType, keyStoreProvider); - } else { - ks = KeyStore.getInstance(keyStoreType); - } - - if (storePassURL != null) { - URL passURL; - try { - passURL = new URL(storePassURL); - // absolute URL - } catch (MalformedURLException e) { - // relative URL - if (policyUrl == null) { - throw e; - } - passURL = new URL(policyUrl, storePassURL); - } - - if (debug != null) { - debug.println("reading password" + passURL); - } - - InputStream in = null; - try { - in = passURL.openStream(); - keyStorePassword = Password.readPassword(in); - } finally { - if (in != null) { - in.close(); - } - } - } - - if (NONE.equals(keyStoreName)) { - ks.load(null, keyStorePassword); - return ks; - } else { - /* - * location of keystore is specified as absolute URL in policy file, or - * is relative to URL of policy file - */ - URL keyStoreUrl = null; - try { - keyStoreUrl = new URL(keyStoreName); - // absolute URL - } catch (MalformedURLException e) { - // relative URL - if (policyUrl == null) { - throw e; - } - keyStoreUrl = new URL(policyUrl, keyStoreName); - } - - if (debug != null) { - debug.println("reading keystore" + keyStoreUrl); - } - - InputStream inStream = null; - try { - inStream = new BufferedInputStream(getInputStream(keyStoreUrl)); - ks.load(inStream, keyStorePassword); - } finally { - inStream.close(); - } - return ks; - } - } finally { - if (keyStorePassword != null) { - Arrays.fill(keyStorePassword, ' '); - } - } - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java deleted file mode 100644 index 644970a5f6..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -import java.net.URI; -import java.net.URISyntaxException; -import java.security.GeneralSecurityException; - -/** - * A utility class to expand properties embedded in a string. Strings of the - * form ${some.property.name} are expanded to be the value of the property. - * Also, the special ${/} property is expanded to be the same as file.separator. - * If a property is not set, a GeneralSecurityException will be thrown. - * - * @author Roland Schemers - */ -public class PropertyExpander { - - public static class ExpandException extends GeneralSecurityException { - - private static final long serialVersionUID = -7941948581406161702L; - - public ExpandException(String msg) { - super(msg); - } - } - - public static String expand(String value) throws ExpandException { - return expand(value, false); - } - - public static String expand(String value, boolean encodeURL) - throws ExpandException { - if (value == null) - return null; - - int p = value.indexOf("${", 0); - - // no special characters - if (p == -1) - return value; - - StringBuffer sb = new StringBuffer(value.length()); - int max = value.length(); - int i = 0; // index of last character we copied - - scanner: while (p < max) { - if (p > i) { - // copy in anything before the special stuff - sb.append(value.substring(i, p)); - i = p; - } - int pe = p + 2; - - // do not expand ${{ ... }} - if (pe < max && value.charAt(pe) == '{') { - pe = value.indexOf("}}", pe); - if (pe == -1 || pe + 2 == max) { - // append remaining chars - sb.append(value.substring(p)); - break scanner; - } else { - // append as normal text - pe++; - sb.append(value.substring(p, pe + 1)); - } - } else { - while ((pe < max) && (value.charAt(pe) != '}')) { - pe++; - } - if (pe == max) { - // no matching '}' found, just add in as normal text - sb.append(value.substring(p, pe)); - break scanner; - } - String prop = value.substring(p + 2, pe); - if (prop.equals("/")) { - sb.append(java.io.File.separatorChar); - } else { - String val = System.getProperty(prop); - if (val != null) { - if (encodeURL) { - // encode 'val' unless it's an absolute URI - // at the beginning of the string buffer - try { - if (sb.length() > 0 || !(new URI(val)).isAbsolute()) { - val = com.sun.ts.lib.util.sec.net.www.ParseUtil - .encodePath(val); - } - } catch (URISyntaxException use) { - val = com.sun.ts.lib.util.sec.net.www.ParseUtil.encodePath(val); - } - } - sb.append(val); - } else { - throw new ExpandException("unable to expand property " + prop); - } - } - } - i = pe + 1; - p = value.indexOf("${", i); - if (p == -1) { - // no more to expand. copy in any extra - if (i < max) { - sb.append(value.substring(i, max)); - } - // break out of loop - break scanner; - } - } - return sb.toString(); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java deleted file mode 100644 index c84a927230..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright (c) 2000, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -/** - */ -public class ResourcesMgr { - - // intended for java.security, javax.security and sun.security resources - private static java.util.ResourceBundle bundle; - - // intended for com.sun.security resources - private static java.util.ResourceBundle altBundle; - - public static String getString(String s) { - - if (bundle == null) { - - // only load if/when needed - bundle = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.util.ResourceBundle run() { - return (java.util.ResourceBundle - .getBundle("sun.security.util.Resources")); - } - }); - } - - return bundle.getString(s); - } - - public static String getString(String s, final String altBundleName) { - - if (altBundle == null) { - - // only load if/when needed - altBundle = java.security.AccessController.doPrivileged( - new java.security.PrivilegedAction() { - public java.util.ResourceBundle run() { - return (java.util.ResourceBundle.getBundle(altBundleName)); - } - }); - } - - return altBundle.getString(s); - } -} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java b/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java deleted file mode 100644 index 65b2207696..0000000000 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java +++ /dev/null @@ -1,194 +0,0 @@ -/* - * Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.util.sec.security.util; - -import java.awt.AWTPermission; -import java.lang.RuntimePermission; -import java.net.SocketPermission; -import java.net.NetPermission; -import java.security.SecurityPermission; -import java.security.AllPermission; -import javax.security.auth.AuthPermission; - -/** - * Permission constants and string constants used to create permissions used - * throughout the JDK. - */ -public final class SecurityConstants { - // Cannot create one of these - private SecurityConstants() { - } - - // Commonly used string constants for permission actions used by - // SecurityManager. Declare here for shortcut when checking permissions - // in FilePermission, SocketPermission, and PropertyPermission. - - public static final String FILE_DELETE_ACTION = "delete"; - - public static final String FILE_EXECUTE_ACTION = "execute"; - - public static final String FILE_READ_ACTION = "read"; - - public static final String FILE_WRITE_ACTION = "write"; - - public static final String SOCKET_RESOLVE_ACTION = "resolve"; - - public static final String SOCKET_CONNECT_ACTION = "connect"; - - public static final String SOCKET_LISTEN_ACTION = "listen"; - - public static final String SOCKET_ACCEPT_ACTION = "accept"; - - public static final String SOCKET_CONNECT_ACCEPT_ACTION = "connect,accept"; - - public static final String PROPERTY_RW_ACTION = "read,write"; - - public static final String PROPERTY_READ_ACTION = "read"; - - public static final String PROPERTY_WRITE_ACTION = "write"; - - // Permission constants used in the various checkPermission() calls in JDK. - - // java.lang.Class, java.lang.SecurityManager, java.lang.System, - // java.net.URLConnection, java.security.AllPermission, java.security.Policy, - // sun.security.provider.PolicyFile - public static final AllPermission ALL_PERMISSION = new AllPermission(); - - // java.lang.SecurityManager - public static final AWTPermission TOPLEVEL_WINDOW_PERMISSION = new AWTPermission( - "showWindowWithoutWarningBanner"); - - // java.lang.SecurityManager - public static final AWTPermission ACCESS_CLIPBOARD_PERMISSION = new AWTPermission( - "accessClipboard"); - - // java.lang.SecurityManager - public static final AWTPermission CHECK_AWT_EVENTQUEUE_PERMISSION = new AWTPermission( - "accessEventQueue"); - - // java.awt.Dialog - public static final AWTPermission TOOLKIT_MODALITY_PERMISSION = new AWTPermission( - "toolkitModality"); - - // java.awt.Robot - public static final AWTPermission READ_DISPLAY_PIXELS_PERMISSION = new AWTPermission( - "readDisplayPixels"); - - // java.awt.Robot - public static final AWTPermission CREATE_ROBOT_PERMISSION = new AWTPermission( - "createRobot"); - - // java.awt.MouseInfo - public static final AWTPermission WATCH_MOUSE_PERMISSION = new AWTPermission( - "watchMousePointer"); - - // java.awt.Window - public static final AWTPermission SET_WINDOW_ALWAYS_ON_TOP_PERMISSION = new AWTPermission( - "setWindowAlwaysOnTop"); - - // java.awt.Toolkit - public static final AWTPermission ALL_AWT_EVENTS_PERMISSION = new AWTPermission( - "listenToAllAWTEvents"); - - // java.awt.SystemTray - public static final AWTPermission ACCESS_SYSTEM_TRAY_PERMISSION = new AWTPermission( - "accessSystemTray"); - - // java.net.URL - public static final NetPermission SPECIFY_HANDLER_PERMISSION = new NetPermission( - "specifyStreamHandler"); - - // java.net.ProxySelector - public static final NetPermission SET_PROXYSELECTOR_PERMISSION = new NetPermission( - "setProxySelector"); - - // java.net.ProxySelector - public static final NetPermission GET_PROXYSELECTOR_PERMISSION = new NetPermission( - "getProxySelector"); - - // java.net.CookieHandler - public static final NetPermission SET_COOKIEHANDLER_PERMISSION = new NetPermission( - "setCookieHandler"); - - // java.net.CookieHandler - public static final NetPermission GET_COOKIEHANDLER_PERMISSION = new NetPermission( - "getCookieHandler"); - - // java.net.ResponseCache - public static final NetPermission SET_RESPONSECACHE_PERMISSION = new NetPermission( - "setResponseCache"); - - // java.net.ResponseCache - public static final NetPermission GET_RESPONSECACHE_PERMISSION = new NetPermission( - "getResponseCache"); - - // java.lang.SecurityManager, sun.applet.AppletPanel, sun.misc.Launcher - public static final RuntimePermission CREATE_CLASSLOADER_PERMISSION = new RuntimePermission( - "createClassLoader"); - - // java.lang.SecurityManager - public static final RuntimePermission CHECK_MEMBER_ACCESS_PERMISSION = new RuntimePermission( - "accessDeclaredMembers"); - - // java.lang.SecurityManager, sun.applet.AppletSecurity - public static final RuntimePermission MODIFY_THREAD_PERMISSION = new RuntimePermission( - "modifyThread"); - - // java.lang.SecurityManager, sun.applet.AppletSecurity - public static final RuntimePermission MODIFY_THREADGROUP_PERMISSION = new RuntimePermission( - "modifyThreadGroup"); - - // java.lang.Class - public static final RuntimePermission GET_PD_PERMISSION = new RuntimePermission( - "getProtectionDomain"); - - // java.lang.Class, java.lang.ClassLoader, java.lang.Thread - public static final RuntimePermission GET_CLASSLOADER_PERMISSION = new RuntimePermission( - "getClassLoader"); - - // java.lang.Thread - public static final RuntimePermission STOP_THREAD_PERMISSION = new RuntimePermission( - "stopThread"); - - // java.lang.Thread - public static final RuntimePermission GET_STACK_TRACE_PERMISSION = new RuntimePermission( - "getStackTrace"); - - // java.security.AccessControlContext - public static final SecurityPermission CREATE_ACC_PERMISSION = new SecurityPermission( - "createAccessControlContext"); - - // java.security.AccessControlContext - public static final SecurityPermission GET_COMBINER_PERMISSION = new SecurityPermission( - "getDomainCombiner"); - - // java.security.Policy, java.security.ProtectionDomain - public static final SecurityPermission GET_POLICY_PERMISSION = new SecurityPermission( - "getPolicy"); - - // java.lang.SecurityManager - public static final SocketPermission LOCAL_LISTEN_PERMISSION = new SocketPermission( - "localhost:1024-", SOCKET_LISTEN_ACTION); - - // javax.security.auth.Subject - public static final AuthPermission DO_AS_PERMISSION = new AuthPermission( - "doAs"); - - // javax.security.auth.Subject - public static final AuthPermission DO_AS_PRIVILEGED_PERMISSION = new AuthPermission( - "doAsPrivileged"); -} diff --git a/pom.xml b/pom.xml index 38c3301205..1cc87dd5c7 100644 --- a/pom.xml +++ b/pom.xml @@ -34,49 +34,45 @@ project - appclient arquillian - assembly - common - connector - core-profile-tck - ejb30 + tcks/apis/connector + tcks/apis/enterprise-beans/ejb30 - ejb32 - el - el-tck - integration - javaee - javamail - jaxrs - jdbc - jms - jms-tck - jpa - jpa-tck - jsonb - jsonp - jsp - jstl - jta - libutil - runtime - samples - signaturetest + tcks/apis/enterprise-beans/ejb32 + tcks/apis/expression-language/expression-language-inside-container + tcks/apis/expression-language/expression-language-outside-container + tcks/apis/javamail + tcks/apis/jsonb + tcks/apis/jsonp + tcks/apis/messaging/messaging-inside-container + tcks/apis/messaging/messaging-outside-container + tcks/apis/pages + tcks/apis/persistence/persistence-inside-container + tcks/apis/persistence/persistence-outside-container + tcks/apis/rest + tcks/apis/tags + tcks/apis/transactions + tcks/apis/websocket + tcks/profiles/core-profile-tck + tcks/profiles/platform/appclient + tcks/profiles/platform/assembly + tcks/profiles/platform/integration + tcks/profiles/platform/javaee + tcks/profiles/platform/jdbc + tcks/profiles/platform/samples + tcks/profiles/platform/xa + tools tsharness user_guides webartifacts/jsf webartifacts/jsp webartifacts/jstl webartifacts/servlet - websocket - xa - - 1.10.11 + 1.10.15 1.0.2.Final ${project.version} 1.9.1.Final diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java b/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java deleted file mode 100644 index 3f85e664e7..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable; - -import com.sun.ts.lib.util.TestUtil; -import com.sun.ts.lib.porting.DeploymentInfo; -import java.util.Map; -import java.util.Hashtable; - -/** - * This class serves as an abstract implementation of the DeliverableInterface. - * It can be extended to customize values for a particular deliverable. - * - * @author Kyle Grucci - */ -public abstract class AbstractDeliverable implements DeliverableInterface { - protected Map htTSValidVehicles; - - protected Map htValidApps; - - protected Map htValidRunDirections; - - public boolean supportsAutoDeployment() { - return true; - } - - public boolean supportsAutoJMSAdmin() { - return true; - } - - public Map getValidVehicles() { - if (htTSValidVehicles == null) { - // TS hash table - htTSValidVehicles = new Hashtable(); - // add default values - htTSValidVehicles.put("tests.service_eetest.vehicles", - new String[] { "ejb", "servlet", "jsp" }); - } - return htTSValidVehicles; - } - - public Map getInteropDirections() { - if (htValidRunDirections == null) { - htValidRunDirections = new Hashtable(); - // default for all tests - htValidRunDirections.put("tests.interop", "forward"); - } - return htValidRunDirections; - } - - public boolean supportsInterop() { - return true; - } - - public String getAdditionalClasspath(String distDir) { - return null; - } - - public DeploymentInfo getDeploymentInfo(String earFile, - String[] sValidRuntimeInfoFilesArray) { - return null; - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java b/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java deleted file mode 100644 index 9a8466c25a..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java +++ /dev/null @@ -1,305 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable; - -import java.io.*; -import java.util.*; - -import com.sun.ts.lib.util.*; - -/** - * This class serves as a well known place for harness, util, and porting - * classes to retrieve property values. - * - * @created August 22, 2002 - * @author Kyle Grucci - * @deprecated - */ -@Deprecated(forRemoval = true) -public class AbstractPropertyManager implements PropertyManagerInterface { - - private Properties jteProperties; - - private String tmp = File.separator + "tmp"; - - protected static boolean bReversed; - - protected AbstractPropertyManager() { - } - - /** - * @exception PropertyNotSetException - */ - private void checkHarnessTempDir() throws PropertyNotSetException { - String tmpDir = getProperty("harness.temp.directory", null); - if (tmpDir == null) { - tmpDir = getProperty("TS_HOME", null) + this.tmp; - setProperty("harness.temp.directory", tmpDir); - } else { - if (!(tmpDir.endsWith(this.tmp) - || tmpDir.endsWith(this.tmp + File.separator) - || tmpDir.endsWith("/tmp") || tmpDir.endsWith("/tmp/"))) { - tmpDir += this.tmp; - setProperty("harness.temp.directory", tmpDir); - } - } - } - - /** - * copies all entries from TestEnvironment and jteProperties to a new - * Properties, which is used for remote invocation of porting server. - * jteProperties has precedence over TestEnvironment. We set forward/reverse - * related properties in jteProperties and the same key in TestEnvironment may - * have old value. - * - * @return a new properties - */ - private Properties copyEntries() { - Properties props = new Properties(); - if (this.jteProperties != null) { - props.putAll(this.jteProperties); - } - if (TestUtil.harnessDebug) { - TestUtil.logHarnessDebug( - "AbstractPropertyManager copied all entries to a properties."); - } - - props.put("bin.dir", System.getProperty("bin.dir", "")); - return props; - } - - /** - * Sets a property in property manager. If the key already exists in the - * property manager, the old value is overriden by new value. - * - * @param sKey - * key of the property. - * @param sVal - * value of the property. - */ - public void setProperty(String sKey, String sVal) { - if (jteProperties == null) { - jteProperties = new Properties(); - } - if (sKey != null && sVal != null) { - jteProperties.setProperty(sKey, sVal); - } - } - - /** - * This method swaps all of the following interop values in - * TSPropertyManager... - * - * @param sDirection - */ - public void swapInteropPropertyValues(String sDirection) { - if (sDirection.equals("reverse")) { - if (bReversed) { - return; - } else { - reverseValues(); - } - } else { - if (!bReversed) { - return; - } else { - forwardValues(); - } - } - } - - protected void forwardValues() { - bReversed = false; - } - - protected void reverseValues() { - bReversed = true; - } - - /** - * gets a new properties containing all entries in the property manager. Any - * operation on the returned properties will have no effect on property - * manager - * - * @return The jteProperties value - */ - public Properties getJteProperties() { - return copyEntries(); - } - - /** - * This method is called by the test harness to retrieve all properties needed - * by a particular test. - * - * @param sPropKeys - * - Properties to retrieve - * @return Properties - property/value pairs - * @exception PropertyNotSetException - */ - public Properties getTestSpecificProperties(String[] sPropKeys) - throws PropertyNotSetException { - Properties pTestProps = new Properties(); - String tmpKey = null; - - for (int ii = 0; ii < sPropKeys.length; ii++) { - tmpKey = sPropKeys[ii]; - if (tmpKey.equalsIgnoreCase("generateSQL")) { - pTestProps.put("generateSQL", "true"); - } else if (tmpKey.equalsIgnoreCase("all.props")) { - pTestProps = getJteProperties(); - pTestProps.put("generateSQL", "true"); - pTestProps.put("all.props", "true"); - return pTestProps; - } else { - pTestProps.put(tmpKey, getProperty(tmpKey)); - } - } - // set all props that all tests need - pTestProps.put("harness.log.port", getProperty("harness.log.port")); - pTestProps.put("harness.host", getProperty("harness.host")); - pTestProps.put("harness.log.traceflag", - getProperty("harness.log.traceflag")); - pTestProps.put("harness.log.delayseconds", - getProperty("harness.log.delayseconds")); - pTestProps.put("harness.temp.directory", - getProperty("harness.temp.directory")); - pTestProps.put("harness.socket.retry.count", - getProperty("harness.socket.retry.count")); - pTestProps.put("bin.dir", System.getProperty("bin.dir", "")); - - pTestProps.put("all.props", "false"); - return pTestProps; - } - - /** - * This method is called to get a property value - * - * @param sKey - * - Property to retrieve - * @return String - property value - * @exception PropertyNotSetException - */ - public String getProperty(String sKey) throws PropertyNotSetException { - String sVal = getProperty0(sKey); - if (sVal == null) { - throw new PropertyNotSetException("No value found for " + sKey - + ". Please check your jte file for an appropiate value"); - } - return sVal; - } - - /** - * gets property value with default - * - * @param sKey - * - Property to retrieve - * @param def - * @return String - property value - */ - public String getProperty(String sKey, String def) { - String result = getProperty0(sKey); - if (result == null) { - result = def; - } - return result; - } - - /** - * Gets the defaultValue attribute of the AbstractPropertyManager object - * - * @param sKey - * @return The defaultValue value - */ - private String getDefaultValue(String sKey) { - String result = null; - if (sKey.startsWith("deployment_host.")) { - result = "local"; - if (TestUtil.harnessDebug) { - TestUtil.logHarnessDebug( - "WARNING: No value found for " + sKey + ", use default local"); - } - } else if (sKey.equals("undeploy_redeploy_apps")) { - result = "true"; - } - return result; - } - - /** - * retrieves property value from TestEnvironment, and converts it to a single - * string. If lookup returns null or empty string array, returns null. - * - * @param key - * @return The fromEnv value - */ - private String getFromEnv(String key) { - String result = null; - String[] values = null; - if (values != null) { - switch (values.length) { - case 0: - if (key.equals("s1as.admin.passwd") || key.equals("ri.admin.passwd") - || key.equals("deployManagerpasswd.1") - || key.equals("deployManagerpasswd.2")) { - result = ""; - } - break; - case 1: - result = values[0].trim(); - break; - default: - result = ""; - for (int i = 0; i < values.length; i++) { - result += values[i] + " "; - } - result = result.trim(); - } - } - return result; - } - - /** - * first tries properties, then env, and finally default values - * - * @param key - * @return The property0 value - */ - private String getProperty0(String key) { - String result = null; - if (jteProperties != null) { - result = jteProperties.getProperty(key); - } - if (result == null) { - result = getDefaultValue(key); - } - return result; - } - - /** - * Sets the jteProperties attribute of the AbstractPropertyManager object - * - * @param p - * The new jteProperties value - * @exception PropertyNotSetException - */ - protected final void setJteProperties(Properties p) - throws PropertyNotSetException { - jteProperties = p; - jteProperties.put("bin.dir", System.getProperty("bin.dir", "")); - checkHarnessTempDir(); - } - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java b/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java deleted file mode 100644 index 04fb1a0cd9..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable; - -/** - * This is a factory class for creating instances of TSDeploymentInterface. The - * implementation classes used are determined by the values of the porting - * package properties in TS_HOME/bin/ts.jte. - * - * @author Kyle Grucci - */ - -public class DeliverableFactory { - private static DeliverableInterface di; - - public static DeliverableInterface getDeliverableInstance() throws Exception { - if (di == null) - di = createInstance(); - return di; - } - - public static DeliverableInterface getDeliverableInstance( - ClassLoader classLoader) throws Exception { - if (di == null) - di = createInstance(classLoader); - return di; - } - - private static DeliverableInterface createInstance() throws Exception { - return createInstance(null); - } - - private static DeliverableInterface createInstance(ClassLoader classLoader) - throws Exception { - try { - // get property value from within the ts specific properties file - String sClassName = System.getProperty("deliverable.class"); - // create and initialize a new instance of the Deployment class - Class c = null; - if (classLoader == null) { - c = Class.forName(sClassName); - } else { - c = Class.forName(sClassName, true, classLoader); - } - return (DeliverableInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java b/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java deleted file mode 100644 index e1db2c04ae..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java +++ /dev/null @@ -1,118 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable; - -import java.util.Map; -import java.util.Properties; -import com.sun.ts.lib.porting.DeploymentInfo; - -/** - * This interface serves as a place to retrieve deliverable specific - * information. Some example deliverables would be standalone TCKs, the CTS, the - * JDBC test suite, etc. - * - * @author Kyle Grucci - */ -public interface DeliverableInterface { - - - /** - * This method is called to retrieve a reference to this Deliverable's - * PropertyManager. If the PropertyManager instance does not yet exist, one - * will be created from the Properties object. - * - * @param p - Properties specific to the currently running test - * @return PropertyManagerInterface impl. - */ - public PropertyManagerInterface createPropertyManager(Properties p) - throws Exception; - - /** - * This method is called to retrieve a reference to this Deliverable's - * PropertyManager. - * - * @return PropertyManagerInterface impl. - */ - public PropertyManagerInterface getPropertyManager() throws Exception; - - /** - * This method is called to determine the vehicles to use for given test - * directories. - * - * @return A mapping between test directories and vehicles. - */ - public Map getValidVehicles(); - - /** - * This method is called to determine the direction to run any interop tests - * The default for any tests if forward. - * - * @return A mapping between test directories and directions. - */ - public Map getInteropDirections(); - - /** - * This method is called by the SuiteSynchronizer class to determine whether - * autodeployment is supported by this deliverable. - * - * @return True if supported, else false. - */ - public boolean supportsAutoDeployment(); - - /** - * This method is called by the SuiteSynchronizer class to determine whether - * interop tests are supported by this deliverable. - * - * @return True if supported, else false. - */ - public boolean supportsInterop(); - - /** - * This method is called by the SuiteSynchronizer class to determine whether - * JMS topic/queue/factory admin is supported by this deliverable. - * - * @return True if supported, else false. - */ - public boolean supportsAutoJMSAdmin(); - - /** - * This method is called by the TSScript class, which appends the returned - * string to the classpath specified in the testExecute commandline. - * - * @param distDir - * The dist directory for the currently running test. - * - * @return Returns a String which will be appended to the classpath specified - * in the testExecute commandline. - */ - public String getAdditionalClasspath(String distDir); - - /** - * This method is called by the SuiteSynchronizer class to get a - * DeploymentInfo Object. Other deliverables may use this method to subclass - * the standard DeploymentInfo class. - * - * @param earFile - * The archive being deployed - * @param sValidRuntimeInfoFilesArray - * An array of Sun RI runtime xml - * - * @return This method should return a DeploymentInfo object - */ - public DeploymentInfo getDeploymentInfo(String earFile, - String[] sValidRuntimeInfoFilesArray); -} diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java b/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java deleted file mode 100644 index dd40f52fb1..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.deliverable; - -import java.util.Properties; - -/** - * This class serves as a well known place for harness, util, and porting - * classes to retrieve property values. - * - * @author Kyle Grucci - */ -public interface PropertyManagerInterface { - - /** - * This method swaps all of the following interop values in - * TSPropertyManager... - * - */ - public void swapInteropPropertyValues(String sDirection); - - /** - * gets a new properties containing all entries in the property manager. Any - * operation on the returned properties will have no effect on property - * manager - */ - public Properties getJteProperties(); - - /** - * gets property value with default - * - * @param sKey - Property to retrieve - * @param def - default value to use - * @return String - property value - */ - public String getProperty(String sKey, String def); - - /** - * This method is called to get a property value - * - * @param sKey - * - Property to retrieve - * @return String - property value - */ - public String getProperty(String sKey) throws PropertyNotSetException; - - /** - * This method is called to set a property on the property manager - * - * @param sKey - key to be used - * @param sVal - value to use - */ - public void setProperty(String sKey, String sVal); - - /** - * This method is called by the test harness to retrieve all properties needed - * by a particular test. - * - * @param sPropKeys - Properties to retrieve - * @return Properties - property/value pairs - */ - public Properties getTestSpecificProperties(String[] sPropKeys) - throws PropertyNotSetException; -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java b/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java deleted file mode 100644 index 626a0a4bb5..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import com.sun.ts.lib.deliverable.PropertyManagerInterface; -import com.sun.ts.lib.deliverable.DeliverableFactory; -import java.io.*; -import java.util.*; - -/** - * Provides all information required to deploy an application on a server. Much - * of this information is extracted from runtime xml files. The following - * information is provided: - *
    - *
  • EJB Jar info
  • - *
  • Web Resources - Display name, context root, resource references and ejb - * references for each web resource in this ear.
  • - *
  • EJB Resources - Name, JNDI name, resource references, ejb references, and - * CMP information for each ejb resource in this ear.
  • - *
  • Resource References - For each resource reference, the JNDI name, default - * resource principal name and password, and any mail configuration information - * is provided.
  • - *
  • EJB References - For each EJB reference, the EJB name and its - * corresponding JNDI name is provided.
  • - *
- *

- * See: javaee.home.ri/lib/dtds/sun-application_5_0-0.dtd - * javaee.home.ri/lib/dtds/sun-application-client_5_0-0.dtd - * javaee.home.ri/lib/dtds/sun-ejb-jar_3_0-0.dtd - * javaee.home.ri/lib/dtds/sun-web-app_2_5-0.dtd for more and updated - * information. - * - */ - -public interface DeploymentInfo extends java.io.Serializable { - /** - * Sets the value of the given property. This method should be temporary, - * until all important information can be provided by the API. - */ - public void setProperty(String key, String value); - - /** - * Returns the value of the given property. This method should be temporary, - * until all important information can be provided by the API. - */ - public String getProperty(String key); - - /** - * Sets/gets an array of deploymentInfo objects from previously deployed apps - * in the currrent directory along with all common apps - */ - public void setPreviousInfos(DeploymentInfo[] infos); - - public DeploymentInfo[] getPreviousInfos(); - - /** - * Returns the ear file to deploy - */ - public String getEarFile(); - - /** - * Returns the list of runtime files to be deployed - */ - public String[] getRuntimeFiles(); - - /** - * Returns a Map that maps runtimne deployment descriptor filename Strings to - * concrete implementations of the com.sun.ts.lib.porting.ejb.SunEjbJar - * interface. - */ - public Map getEjbRuntimeData(); - - /** - * Returns a Map that maps runtimne deployment descriptor filename Strings to - * concrete implementations of the com.sun.ts.lib.porting.web.SunWebApp - * interface. - */ - public Map getWebRuntimeData(); - - /** - * Returns a Map that maps runtimne deployment descriptor filename Strings to - * concrete implementations of the com.sun.ts.lib.porting.app.SunApplication - * interface. - */ - public Map getAppRuntimeData(); - - /** - * Returns a Map that maps runtimne deployment descriptor filename Strings to - * concrete implementations of the - * com.sun.ts.lib.porting.appclient.SunApplicationClient interface. - */ - public Map getAppClientRuntimeData(); - - /** - * Returns a List of concrete implementations of the - * com.sun.ts.lib.porting.appclient.SunApplicationClient interface. - */ - public List getAppClientRuntimeDDs(); - - /** - * Returns a List of concrete implementations of the - * com.sun.ts.lib.porting.app.SunApplication interface. - */ - public List getAppRuntimeDDs(); - - /** - * Returns a List of concrete implementations of the - * com.sun.ts.lib.porting.web.SunWebApp interface. - */ - public List getWebRuntimeDDs(); - - /** - * Returns a List of concrete implementations of the - * com.sun.ts.lib.porting.ejb.SunEjbJar interface. - */ - public List getEjbRuntimeDDs(); - - /** - * Returns a String that conatains the contents of all the runtime XML files. - */ - public String getContentAsXml(); - - /** - * Exception thrown if an error occured parsing the XML - */ - public class ParseException extends Exception implements Serializable { - public ParseException(String message) { - super(message); - } - } - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java deleted file mode 100644 index b03aa03d6f..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.io.*; -import com.sun.ts.lib.deliverable.*; - -/** - * This is a factory class for creating instances of TSDeploymentInterface. The - * implementation classes used are determined by the values of the porting - * package properties in TS_HOME/bin/ts.jte. - * - * @author Kyle Grucci - */ -public class TSDeployment { - private static PropertyManagerInterface propMgr = null; - - public static int iPortingSet = 1; - - public static TSDeploymentInterface getDeploymentInstance(PrintWriter writer, - String sClassName) throws Exception { - return createInstance(sClassName, writer); - } - - private static TSDeploymentInterface createInstance(String sClassName, - PrintWriter writer) throws Exception { - try { - propMgr = DeliverableFactory.getDeliverableInstance() - .getPropertyManager(); - - // create and initialize a new instance of the Deployment class - Class c = Class.forName(propMgr.getProperty(sClassName)); - TSDeploymentInterface ctsDep1 = (TSDeploymentInterface) c.newInstance(); - - // set static prop so porting impls in the same VM can look it up - iPortingSet = Integer - .parseInt(sClassName.substring(sClassName.lastIndexOf(".") + 1)); - - // tell this 88 class which porting set of props we are using - // (1 or 2) - // if(ctsDep1 instanceof - // com.sun.ts.lib.deliverable.cts.deploy.StandardDeployment14) - // { - // ((com.sun.ts.lib.deliverable.cts.deploy.StandardDeployment14)ctsDep1).setFirstLevelPortingSet(Integer.parseInt(sClassName.substring(sClassName.lastIndexOf(".")+1))); - // } - - ctsDep1.init(writer); - - return ctsDep1; - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java deleted file mode 100644 index aca79c47b9..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.net.URL; -import java.util.*; -import java.io.*; - -/** - * An implementation of the TSDeploymentInterface can be provided by a Jakarta EE - * implementation, to support their own deploy/undeploy semantics. - * - * Jakarta EE implementations that previously depended on Pruned Jakarta Deployment, - * should also use TSDeploymentInterface instead of com.sun.ts.lib.porting.TSDeploymentInterface2. - * - * @author Kyle Grucci - */ -public interface TSDeploymentInterface { - /** - * Initializes a new TSDeployment instance. All output should be printed to - * this PrintWriter. All properties in the ts.jte file are accessible to this - * porting implementation class only via the TSPropertyManager class. Please - * see Sun's implementation of this method for an example. - * - * @param writer - * The PrintWriter that should be used to log output. - */ - public void init(PrintWriter writer); - - /** - * This method is called by the test harness to deploy an .ear file into your - * Java EE implementation. We extract such info as the app earfile from the - * provided deployment information. The following properties are available for - * this method's use: - *

- * generateSQL - "true" if SQL is to be generated for CMP beans - *

- *

- * deployment_host - the host where this app is to be deployed - *

- * - * All additional information is queryable from the DeploymentInfo interface. - * - * @param info - * Object containing necessary deployment info. - * @return This method should return a string which is formatted such that it - * can be appended to the classpath. your Java EE implementation - * returns the fully qualified path to a jar file, which contains the - * generated ejb stub classes, which are used by any appclient tests - * (tests whose client directly uses an ejb). - */ - public String deploy(DeploymentInfo info) throws TSDeploymentException; - - /** - * This method is called by test harness to undeploy an .ear file from your - * Java EE implementation. We extract such info as host and app from these - * props. The following properties are available for this method 's use: - * - * ear_file - the fully qualified application (.ear file) deployment_host - - * the host to undeploy this app from - * - * @param p - * Properties specific to the currently running test - */ - public void undeploy(Properties p) throws TSDeploymentException; - - /** - * This method is called by the test harness to check whether or not an - * application ear is deployed. This information is used to determine whether - * or not the harness needs to undeploy it. The following properties are - * available for this method's use: - * - * ear_file - the fully qualified application (.ear file) deployment_host - - * the host where this app is deployed - * - * @param p - * Properties specific to the currently running test - * @return True if the app is deployed. False if not. - */ - public boolean isDeployed(Properties p) throws TSDeploymentException; - - /** - * This method is called to deploy a connector (.rar file) to your Java EE - * implementation. We extract such info as deployment_host and rar_file from - * these props. The following properties are available for this method's use: - * - * rar_file - the fully qualified connector file (.rar file) deployment_host - - * the host name of the machine to deploy it to - * - * @param p - * Properties specific to the currently running test - */ - public void deployConnector(Properties p) throws TSDeploymentException; - - /** - * This method is called to undeploy a connector (.rar file) from your Java EE - * implementation. We extract such info as deployment_host and rar_file from - * these props. The following properties are available for this method's use: - * - * rar_file - the fully qualified connector file (.rar file) deployment_host - - * the host name of the machine to undeploy it from - * - * @param p - * Properties specific to the currently running test - */ - public void undeployConnector(Properties p) throws TSDeploymentException; - - /** - * This method is called to check to see if a given connector (.rar file) is - * deployed on your Java EE implementation. We extract such info as - * deployment_host and rar_file from these props. The following properties are - * available for this method's use: - * - * rar_file - the fully qualified connector file (.rar file) deployment_host - - * the host name of the machine to deploy it to - * - * @param p - * Properties specific to the currently running test - * @return True if the app is deployed. False if not. - */ - public boolean isConnectorDeployed(Properties p) throws TSDeploymentException; - - /** - * This method is called by the test harness to get any additional test - * specific arguments that must be passed to the application client container - * class, which is specified in the ts.jte file in the given environment - * (command.testExecuteAppClient property). The additional args should be - * appended to the value of (p.getProperty("executeArgs");), and returned. The - * following properties are available for this method's use: - * - * executeArgs - the current executeArgs as specified in the jte file - * - * @param p - * Properties specific to the currently running test - * @return This method should return a string which represents all executeArgs - * to be used. - */ - public String getAppClientArgs(Properties p); - - /** - * This method is called by the test harness to get the corba JNDI names to - * use in an interop scenario. This method should return a hashtable of - * mappings for any EJB references in the array of DeploymentInfo objects - * where: - * - * key = original corbaname JNDI name in the RI format value = vendor - * corbaname JNDI name in the Vendor format - * - * @param infoArray - * Array of DeploymentInfo objects for the ear files associated with - * a particular directory - * @return Hashtable This method should return a Hashtable of mappings (see - * above) - */ - public Hashtable getInteropJNDINames(DeploymentInfo[] infoArray); -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java deleted file mode 100644 index 238a26f0bd..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -/* - * @(#)TSHttpsURLConnection.java 1.7 02/06/17 - */ - -package com.sun.ts.lib.porting; - -import com.sun.ts.lib.util.*; -import java.io.*; -import java.net.*; - -/** - * TSHttpsURLConnection provides the HTTPS specific featurs - * - */ -public class TSHttpsURLConnection implements TSHttpsURLConnectionInterface { - private TSHttpsURLConnectionInterface tsHttpsURLConnection = null; - - private String sClass = "porting.ts.HttpsURLConnection.class.1"; - - /** - * Instantiates the class defined in porting.ts.HttpsURLConnection.class.1 - */ - public TSHttpsURLConnection() { - - if (tsHttpsURLConnection == null) { - try { - - Class c = Class.forName(TestUtil.getProperty(sClass)); - - tsHttpsURLConnection = (TSHttpsURLConnectionInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - - /** - * Instantiates the class defined by sClass - * - * @param sClass - * - this class is used to instantiate implementation specific - * HttpsURLConnection class - */ - public TSHttpsURLConnection(String sClass) { - - if (tsHttpsURLConnection == null) { - try { - - Class c = Class.forName(TestUtil.getProperty(sClass)); - - tsHttpsURLConnection = (TSHttpsURLConnectionInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - } - - /** - * Sets the value of the doInput field for this Connection - * - * @param doInput - * - the new value (the default is false) - */ - public void setDoInput(boolean doInput) { - tsHttpsURLConnection.setDoInput(doInput); - } - - /** - * Sets the value of the doOutput field for this Connection - * - * @param doOutput - * - the new value (the default is false) - */ - public void setDoOutput(boolean doOutput) { - tsHttpsURLConnection.setDoOutput(doOutput); - } - - /** - * Sets the value of the useCaches field for this Connection If the UseCaches - * flag on the connection is true, the connection is allowed to use whatever - * caches it can. If false, caches are to be ignored. The default value is set - * to true - * - * @param usecaches - * - the new value (the default is true) - */ - public void setUseCaches(boolean usecaches) { - tsHttpsURLConnection.setUseCaches(usecaches); - } - - /** - * Sets the general request property. If a property with the key already - * exists, overwrite its value with the new value. - * - * @param key - * - the keyword by which the request is known - * @param value - * - the value associated with it - */ - public void setRequestProperty(String key, String value) { - tsHttpsURLConnection.setRequestProperty(key, value); - } - - /** - * Returns the value of the named header field. If called on a connection that - * sets the same header multiple times only the last value is returned. - * - * @param name - * - the name of the header field. - * @return String - the value of the named header field, or null if there is - * no such field in the header. - */ - public String getHeaderField(String name) { - return tsHttpsURLConnection.getHeaderField(name); - } - - /** - * Returns the value for the nth header field. It returns null if there are - * fewer than n fields - * - * @param num - * - Integer num - * @return String - returns the value of the nth header field - */ - public String getHeaderField(int num) { - return tsHttpsURLConnection.getHeaderField(num); - } - - /** - * Disconnect connection - */ - public void disconnect() { - tsHttpsURLConnection.disconnect(); - } - - /** - * Returns an input stream that reads from the open connection - * - * @return InputStream - inputStream - */ - public InputStream getInputStream() throws IOException { - return tsHttpsURLConnection.getInputStream(); - } - - /** - * Returns an Output stream that writes to the open connection - * - * @return OutputStream - outputStream - */ - public OutputStream getOutputStream() throws IOException { - return tsHttpsURLConnection.getOutputStream(); - } - - /** - * Initializes HttpsURLConnection - * - * @param url - * url used to open HttpsURLConnection - */ - public void init(URL url) throws IOException { - tsHttpsURLConnection.init(url); - } - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java deleted file mode 100644 index a9ae622729..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.porting; - -import java.io.*; -import java.net.*; - -/** - * This is the TSHttpsURLConnectionInterface. An implementation of this - * interface must be provided by each Java EE implementation, to support https - * url connection. - * - */ -public interface TSHttpsURLConnectionInterface { - /** - * Sets the value of the doInput field for this URLConnection to the specified - * value. - * - * A URL connection can be used for input and/or output. Set the DoInput flag - * to true if you intend to use the URL connection for input, false if not. - * The default is true. - * - * - * @param doInput - * a boolean indicating whether the URL connection is used for input - * or not - */ - public void setDoInput(boolean doInput); - - /** - * Sets the value of the doOutput field for this URLConnection to the - * specified value. - * - * A URL connection can be used for input and/or output. Set the DoOutput flag - * to true if you intend to use the URL connection for output, false if not. - * The default is false. - * - * @param doOutput - * a boolean indicating whether the URL connection is used for output - * or not - */ - public void setDoOutput(boolean doOutput); - - /** - * Sets the value of the useCaches field of this URLConnection to the - * specified value. - * - * Some protocols do caching of documents. Occasionally, it is important to be - * able to "tunnel through" and ignore the caches (e.g., the "reload" button - * in a browser). If the UseCaches flag on a connection is true, the - * connection is allowed to use whatever caches it can. If false, caches are - * to be ignored. The default value is true - * - * @param usecaches - * a boolean indicating whether or not to allow caching - */ - public void setUseCaches(boolean usecaches); - - /** - * Sets the general request property. If a property with the key already - * exists, overwrite its value with the new value. - * - * @param key - * the keyword by which the request is known - * @param value - * the value associated with it - */ - public void setRequestProperty(String key, String value); - - /** - * Returns the value of the named header field. If called on a connection that - * sets the same header multiple times only the last value is returned. - * - * @param name - * the name of the header field. - * @return String the value of the named header field, or null if there is no - * such field in the header. - */ - public String getHeaderField(String name); - - /** - * Returns the value for the nth header field. It returns null if there are - * fewer than n fields - * - * @param num - * Integer num - * @return String returns the value of the nth header field - */ - public String getHeaderField(int num); - - /** - * Disconnects connection - */ - public void disconnect(); - - /** - * Returns an input stream that reads from the open connection - * - * @return InputStream inputStream - */ - public InputStream getInputStream() throws IOException; - - /** - * Returns an Output stream that writes to the open connection - * - * @return OutputStream - OutputStream - */ - public OutputStream getOutputStream() throws IOException; - - /** - * Initializes HttpsURLConnection - * - * @param url - * url used to open HttpsURLConnection - */ - public void init(URL url) throws IOException; - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java deleted file mode 100644 index f4a782d16a..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java +++ /dev/null @@ -1,502 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.util.*; -import java.io.*; -import com.sun.ts.lib.util.*; -import com.sun.ts.lib.deliverable.*; - -/** - * This class acts as a Factory object for creating an implementation specific - * instance of the TSJMSAdminInterface based on the value of the ts.jte - * property, porting.ts.jms.class.1 - * - * @author Kyle Grucci - */ -public class TSJMSAdmin { - private static PropertyManagerInterface propMgr = null; - - private static Hashtable htQueues1 = null; - - private static Hashtable htTopics1 = null; - - private static Hashtable htQueues2 = null; - - private static Hashtable htTopics2 = null; - - private static Hashtable htTopicConnectionFactories1 = null; - - private static Hashtable htQueueConnectionFactories1 = null; - - private static Hashtable htConnectionFactories1 = null; - - private static Hashtable htTopicConnectionFactories2 = null; - - private static Hashtable htQueueConnectionFactories2 = null; - - private static Hashtable htConnectionFactories2 = null; - - /* List of prefixes for test directories using JMS factories */ - private static String factTestPrefixes[] = { "jms", "ejb", "ejb30", - "jsp" + File.separator + "spec" + File.separator + "tagext" - + File.separator + "resource", - "appclient" + File.separator + "deploy" + File.separator + "resref", - "servlet" + File.separator + "spec" + File.separator + "annotation", - "servlet" + File.separator + "platform" + File.separator + "deploy" - + File.separator + "resref", - "webservices" + File.separator + "handler" + File.separator + "localtx", - "webservices" + File.separator + "handlerEjb" + File.separator - + "localtx", }; - - public static TSJMSAdminInterface getTSJMSAdminInstance(PrintWriter writer, - String sClassName) throws Exception { - return createInstance(sClassName, writer); - } - - private static TSJMSAdminInterface createInstance(String sClassName, - PrintWriter writer) throws Exception { - try { - propMgr = DeliverableFactory.getDeliverableInstance() - .getPropertyManager(); - // create and initialize a new instance of the Deployment class - Class c = Class.forName(propMgr.getProperty(sClassName)); - TSJMSAdminInterface ctsJMS = (TSJMSAdminInterface) c.newInstance(); - ctsJMS.init(writer); - return ctsJMS; - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } - - /** - * Return true if a run of test directory 'sDir' requires preliminary creation - * of JMS factories. - */ - public static boolean requiresJmsFactories(String sDir) { - String prefix = "tests" + File.separator; - for (int i = 0; i < factTestPrefixes.length; i++) { - if (-1 != sDir.indexOf(prefix + factTestPrefixes[i])) { - return true; - } - } - return false; - } - - public static Hashtable getQueueConnectionFactories(int iServer) { - if (iServer == 2) - return htQueueConnectionFactories2; - else - return htQueueConnectionFactories1; - } - - public static Hashtable getTopicConnectionFactories(int iServer) { - if (iServer == 2) - return htTopicConnectionFactories2; - else - return htTopicConnectionFactories1; - } - - public static Hashtable getConnectionFactories(int iServer) { - if (iServer == 2) - return htConnectionFactories2; - else - return htConnectionFactories1; - } - - public static String[] getQueues(String sPath, int iServer) { - Hashtable htQueues = htQueues1; - String sRelativeTestPath = convertSlashesToDashes(sPath); - String[] sVal2 = null; - String sRelativeTestPathCopy = sRelativeTestPath; - TestUtil.logHarnessDebug("getQueues: iServer = " + iServer); - if (iServer == 2) - htQueues = htQueues2; - do { - // get overridden vehicles property if it exists, otherwise - // return null - TestUtil - .logHarnessDebug("getQueues: going to check sRelativeTestPathCopy = " - + sRelativeTestPathCopy); - sVal2 = (String[]) htQueues.get(sRelativeTestPathCopy); - TestUtil.logHarnessDebug("getQueues: sVal2 = " + sVal2); - if (sVal2 == null) { - // do nothing - } else { - for (int ii = 0; ii < sVal2.length; ii++) { - TestUtil.logHarnessDebug( - "getQueuesToCreate: " + "vehicle[" + ii + "] = " + sVal2[ii]); - } - } - } while ((sRelativeTestPathCopy = getNextLevelUp( - sRelativeTestPathCopy)) != null && sVal2 == null); - TestUtil.logHarnessDebug("getQueues: returning sVal2 = " + sVal2); - return sVal2; - } - - public static String[] getTopics(String sPath, int iServer) { - Hashtable htTopics = htTopics1; - String sRelativeTestPath = convertSlashesToDashes(sPath); - String[] sVal2 = null; - String sRelativeTestPathCopy = sRelativeTestPath; - TestUtil.logHarnessDebug("getTopics: iServer = " + iServer); - if (iServer == 2) - htTopics = htTopics2; - do { - // get overridden vehicles property if it exists, otherwise - // return null - TestUtil - .logHarnessDebug("getTopics: going to check sRelativeTestPathCopy = " - + sRelativeTestPathCopy); - sVal2 = (String[]) htTopics.get(sRelativeTestPathCopy); - TestUtil.logHarnessDebug("getTopics: sVal2 = " + sVal2); - if (sVal2 == null) { - // do nothing - } else { - for (int ii = 0; ii < sVal2.length; ii++) { - TestUtil.logHarnessDebug( - "getQueuesToCreate: " + "vehicle[" + ii + "] = " + sVal2[ii]); - } - } - } while ((sRelativeTestPathCopy = getNextLevelUp( - sRelativeTestPathCopy)) != null && sVal2 == null); - TestUtil.logHarnessDebug("getTopics: returning sVal2 = " + sVal2); - return sVal2; - } - - private static String getNextLevelUp(String sDottedPath) { - int index = 0; - String sNewPath = null; - index = sDottedPath.lastIndexOf("-"); - if (index != -1) - sNewPath = sDottedPath.substring(0, index); - return sNewPath; - } - - private static String convertSlashesToDashes(String sTestDir) { - String sRelativeTestPath = ""; - TestUtil.logHarnessDebug("sTestDir = " + sTestDir); - sRelativeTestPath = (sTestDir.substring(sTestDir.indexOf( - File.separator + "ts" + File.separator + "tests" + File.separator) + 4)) - .replace(File.separatorChar, '-'); - TestUtil.logHarnessDebug("sRelativeTestPath = " + sRelativeTestPath); - return sRelativeTestPath; - } - - static { - // for server 1 - htQueues1 = new Hashtable(); - htTopics1 = new Hashtable(); - htTopicConnectionFactories1 = new Hashtable(); - htQueueConnectionFactories1 = new Hashtable(); - htConnectionFactories1 = new Hashtable(); - // for server 2 - htQueues2 = new Hashtable(); - htTopics2 = new Hashtable(); - htTopicConnectionFactories2 = new Hashtable(); - htQueueConnectionFactories2 = new Hashtable(); - htConnectionFactories2 = new Hashtable(); - // connection factories and associated properties to create - htTopicConnectionFactories1.put("jms/TopicConnectionFactory", ""); - htTopicConnectionFactories1.put("jms/DURABLE_SUB_CONNECTION_FACTORY", - "clientId=cts"); - htTopicConnectionFactories1.put("jms/MDBTACCESSTEST_FACTORY", - "clientId=cts1"); - htTopicConnectionFactories1.put("jms/DURABLE_BMT_CONNECTION_FACTORY", - "clientId=cts2"); - htTopicConnectionFactories1.put("jms/DURABLE_CMT_CONNECTION_FACTORY", - "clientId=cts3"); - htTopicConnectionFactories1.put("jms/DURABLE_BMT_XCONNECTION_FACTORY", - "clientId=cts4"); - htTopicConnectionFactories1.put("jms/DURABLE_CMT_XCONNECTION_FACTORY", - "clientId=cts5"); - htTopicConnectionFactories1.put("jms/DURABLE_CMT_TXNS_XCONNECTION_FACTORY", - "clientId=cts6"); - htQueueConnectionFactories1.put("jms/QueueConnectionFactory", ""); - htConnectionFactories1.put("jms/ConnectionFactory", ""); - // add default values - htQueues1.put("tests-jms-ee-mdb", - new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-xa", new String[] { "MDB_QUEUE_REPLY", - "jms_ee_mdb_xa_MDB_QUEUE_CMT", "jms_ee_mdb_xa_MDB_QUEUE_BMT" }); - htQueues1.put("tests-jms-ee-mdb-mdb_msgHdrQ", - new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgHdrQ_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_msgPropsQ", new String[] { - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgPropsQ_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ1", new String[] { - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ1_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ2", new String[] { - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ2_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ3", new String[] { - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ3_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_rec", - new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_rec_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_sndQ", - new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_sndQ_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_sndToQueue", new String[] { - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_sndToQueue_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_synchrec", new String[] { "MDB_QUEUE", - "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_synchrec_MDB_QUEUE" }); - htQueues1.put("tests-jms-ee-mdb-mdb_exceptQ", - new String[] { "MDB_QUEUE_REPLY", - "jms_ee_mdb_mdb_exceptQ_MDB_QUEUE_CMT", - "jms_ee_mdb_mdb_exceptQ_MDB_QUEUE_BMT", - "jms_ee_mdb_mdb_exceptQ_MDB_QUEUETXNS_CMT" }); - htQueues1.put("tests-jms-ee-mdb-mdb_exceptT", - new String[] { "MDB_QUEUE_REPLY", - "jms_ee_mdb_mdb_exceptT_MDB_QUEUE_CMT", - "jms_ee_mdb_mdb_exceptT_MDB_QUEUE_BMT", - "jms_ee_mdb_mdb_exceptT_MDB_QUEUETXNS_CMT" }); - htQueues1.put("tests-jms-core", new String[] { "MY_QUEUE", "MY_QUEUE2" }); - htQueues1.put("tests-jms-core20", new String[] { "MY_QUEUE", "MY_QUEUE2" }); - htQueues1.put("tests-jms-ee-ejb", new String[] { "MY_QUEUE" }); - htQueues1.put("tests-jms-ee-ejbweb-xa", new String[] { "QUEUE_BMT" }); - htQueues1.put("tests-jms-ee-appclient", new String[] { "MY_QUEUE" }); - htQueues1.put("tests-jms-ee-appclient-queuetests", new String[] { - "MY_QUEUE", "testQueue2", "testQ0", "testQ1", "testQ2" }); - htQueues1.put("tests-jms-ee-appclient-txqueuetests", - new String[] { "MY_QUEUE", "Q2" }); - // local access tests - htQueues1.put("tests-ejb-ee-bb-localaccess-mdbqaccesstest", new String[] { - "ejb_ee_bb_localaccess_mdbqaccesstest_MDB_QUEUE", "MDB_QUEUE_REPLY" }); - htQueues1.put("tests-ejb-ee-bb-localaccess-mdbtaccesstest", - new String[] { "MDB_QUEUE_REPLY" }); - htQueues1.put("tests-ejb-ee-sec-stateful-mdb", new String[] { - "MDB_QUEUE_REPLY", "ejb_ee_sec_stateful_mdb_MDB_QUEUE" }); - htQueues1.put("tests-ejb-ee-sec-mdb", new String[] { "MDB_QUEUE_REPLY", - "ejb_sec_mdb_MDB_QUEUE_BMT", "ejb_sec_mdb_MDB_QUEUE_CMT" }); - - /* - * Queues for ejb/ee/timer sub-tree - */ - htQueues1.put("tests-ejb-ee-timer", - new String[] { "MY_QUEUE", "ejb_ee_timer_mdb_MsgBean" }); - - /* - * Queues for ejb/ee/deploy sub-tree - */ - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-single", - new String[] { "ejb_ee_deploy_mdb_enventry_single_AllBean", - "ejb_ee_deploy_mdb_enventry_single_StringBean", - "ejb_ee_deploy_mdb_enventry_single_BooleanBean", - "ejb_ee_deploy_mdb_enventry_single_ByteBean", - "ejb_ee_deploy_mdb_enventry_single_ShortBean", - "ejb_ee_deploy_mdb_enventry_single_IntegerBean", - "ejb_ee_deploy_mdb_enventry_single_LongBean", - "ejb_ee_deploy_mdb_enventry_single_FloatBean", - "ejb_ee_deploy_mdb_enventry_single_DoubleBean", - "ejb_ee_deploy_mdb_enventry_single_AllBeanBMT", - "ejb_ee_deploy_mdb_enventry_single_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-scope", - new String[] { "ejb_ee_deploy_mdb_enventry_scope_Bean1_SameJar", - "ejb_ee_deploy_mdb_enventry_scope_Bean2_SameJar", - "ejb_ee_deploy_mdb_enventry_scope_Bean1_MultiJar", - "ejb_ee_deploy_mdb_enventry_scope_Bean2_MultiJar", - "ejb_ee_deploy_mdb_enventry_scope_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-casesens", - new String[] { "ejb_ee_deploy_mdb_enventry_casesens_CaseBean", - "ejb_ee_deploy_mdb_enventry_casesens_CaseBeanBMT", - "ejb_ee_deploy_mdb_enventry_casesens_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-single", - new String[] { "ejb_ee_deploy_mdb_ejbref_single_TestBean", - "ejb_ee_deploy_mdb_ejbref_single_TestBeanBMT", - "ejb_ee_deploy_mdb_ejbref_single_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-scope", - new String[] { "ejb_ee_deploy_mdb_ejbref_scope_Romeo", - "ejb_ee_deploy_mdb_ejbref_scope_Tristan", - "ejb_ee_deploy_mdb_ejbref_scope_Cyrano", - "ejb_ee_deploy_mdb_ejbref_scope_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-casesens", - new String[] { "ejb_ee_deploy_mdb_ejbref_casesens_TestBean", - "ejb_ee_deploy_mdb_ejbref_casesens_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-single", - new String[] { "ejb_ee_deploy_mdb_ejblink_single_TestBean", - "ejb_ee_deploy_mdb_ejblink_single_TestBeanBMT", - "ejb_ee_deploy_mdb_ejblink_single_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-scope", - new String[] { "ejb_ee_deploy_mdb_ejblink_scope_TestBean", - "ejb_ee_deploy_mdb_ejblink_scope_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-casesens", - new String[] { "ejb_ee_deploy_mdb_ejblink_casesens_TestBean", - "ejb_ee_deploy_mdb_ejblink_casesens_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-resref-single", - new String[] { "ejb_ee_deploy_mdb_resref_single_TestBean", - "ejb_ee_deploy_mdb_resref_single_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-singleT", - new String[] { "ejb_ee_deploy_mdb_enventry_singleT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-scopeT", - new String[] { "ejb_ee_deploy_mdb_enventry_scopeT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-casesensT", - new String[] { "ejb_ee_deploy_mdb_enventry_casesensT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-singleT", - new String[] { "ejb_ee_deploy_mdb_ejbref_singleT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-scopeT", - new String[] { "ejb_ee_deploy_mdb_ejbref_scopeT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-casesensT", - new String[] { "ejb_ee_deploy_mdb_ejbref_casesensT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-singleT", - new String[] { "ejb_ee_deploy_mdb_ejblink_singleT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-scopeT", - new String[] { "ejb_ee_deploy_mdb_ejblink_scopeT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-casesensT", - new String[] { "ejb_ee_deploy_mdb_ejblink_casesensT_ReplyQueue" }); - htQueues1.put("tests-ejb-ee-deploy-mdb-resref-singleT", - new String[] { "ejb_ee_deploy_mdb_resref_singleT_ReplyQueue" }); - - /* - * Queues for ejb30 sub-tree - */ - htQueues1.put("tests-ejb30-bb-session-stateless-annotation", - new String[] { "MY_QUEUE" }); - htQueues1.put("tests-ejb30-bb-mdb", - new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-tx-mdb", - new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-bb-localaccess-mdbclient", - new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-timer-basic-mdb", - new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-zombie", new String[] { "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-assembly-appres", - new String[] { "MDB_QUEUE_REPLY" }); - htQueues1.put("tests-ejb30-timer-interceptor-business-mdb", - new String[] { "MDB_QUEUE" }); - htQueues1.put("tests-ejb30-timer-schedule-auto-attr-mdb", - new String[] { "MDB_QUEUE" }); - - /* - * Queue for servlet sub-tree - */ - htQueues1.put("tests-servlet-spec-annotation", new String[] { "MY_QUEUE" }); - - /* - * Queues for jsp sub-tree - */ - htQueues1.put("tests-jsp-spec-tagext-resource", - new String[] { "MY_QUEUE" }); - - /* - * Queues for webservices sub-tree - */ - htQueues1.put("tests-webservices-handler-localtx", - new String[] { "MY_QUEUE" }); - htQueues1.put("tests-webservices-handlerEjb-localtx", - new String[] { "MY_QUEUE" }); - - // add default values - htTopics1.put("tests-jms-ee-mdb-mdb_sndToTopic", - new String[] { "jms_ee_mdb_mdb_sndToTopic_MDB_TOPIC_REPLY", - "jms_ee_mdb_mdb_sndToTopic_MDB_TOPIC" }); - htTopics1.put("tests-jms-core", new String[] { "MY_TOPIC", "MY_TOPIC2" }); - htTopics1.put("tests-jms-core20", new String[] { "MY_TOPIC", "MY_TOPIC2" }); - htTopics1.put("tests-jms-ee-ejb", new String[] { "MY_TOPIC" }); - htTopics1.put("tests-jms-ee-ejbweb-xa", new String[] { "TOPIC_BMT" }); - htTopics1.put("tests-jms-ee-appclient", new String[] { "MY_TOPIC" }); - htTopics1.put("tests-jms-ee-appclient-topictests", - new String[] { "MY_TOPIC", "MY_TOPIC2" }); - htTopics1.put("tests-jms-ee-appclient-txtopictests", - new String[] { "MY_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-xa", new String[] { - "jms_ee_mdb_xa_MDB_DURABLE_BMT", "jms_ee_mdb_xa_MDB_DURABLE_CMT" }); - htTopics1.put("tests-jms-ee-mdb-mdb_exceptT", - new String[] { "jms_ee_mdb_mdb_exceptT_MDB_DURABLE_BMT", - "jms_ee_mdb_mdb_exceptT_MDB_DURABLE_CMT", - "jms_ee_mdb_mdb_exceptT_MDB_DURABLETXNS_CMT" }); - htTopics1.put("tests-jms-ee-mdb-mdb_msgHdrT", - new String[] { "jms_ee_mdb_mdb_msgHdrT_MDB_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-mdb_msgPropsT", - new String[] { "jms_ee_mdb_mdb_msgPropsT_MDB_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT1", - new String[] { "jms_ee_mdb_mdb_msgTypesT1_MDB_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT2", - new String[] { "jms_ee_mdb_mdb_msgTypesT2_MDB_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT3", - new String[] { "jms_ee_mdb_mdb_msgTypesT3_MDB_TOPIC" }); - htTopics1.put("tests-jms-ee-mdb-mdb_rec", - new String[] { "jms_ee_mdb_mdb_rec_MDB_TOPIC" }); - // local access tests - htTopics1.put("tests-ejb-ee-bb-localaccess-mdbtaccesstest", - new String[] { "ejb_ee_bb_localaccess_mdbtaccesstest_MDB_TOPIC" }); - /* - * Topics for ejb/ee/deploy sub-tree - */ - htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-singleT", - new String[] { "ejb_ee_deploy_mdb_enventry_singleT_AllBean", - "ejb_ee_deploy_mdb_enventry_singleT_StringBean", - "ejb_ee_deploy_mdb_enventry_singleT_BooleanBean", - "ejb_ee_deploy_mdb_enventry_singleT_ByteBean", - "ejb_ee_deploy_mdb_enventry_singleT_ShortBean", - "ejb_ee_deploy_mdb_enventry_singleT_IntegerBean", - "ejb_ee_deploy_mdb_enventry_singleT_LongBean", - "ejb_ee_deploy_mdb_enventry_singleT_FloatBean", - "ejb_ee_deploy_mdb_enventry_singleT_DoubleBean", - "ejb_ee_deploy_mdb_enventry_singleT_AllBeanBMT" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-scopeT", - new String[] { "ejb_ee_deploy_mdb_enventry_scopeT_Bean1_SameJar", - "ejb_ee_deploy_mdb_enventry_scopeT_Bean2_SameJar", - "ejb_ee_deploy_mdb_enventry_scopeT_Bean1_MultiJar", - "ejb_ee_deploy_mdb_enventry_scopeT_Bean2_MultiJar" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-casesensT", - new String[] { "ejb_ee_deploy_mdb_enventry_casesensT_CaseBean", - "ejb_ee_deploy_mdb_enventry_casesensT_CaseBeanBMT" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-singleT", - new String[] { "ejb_ee_deploy_mdb_ejbref_singleT_TestBean", - "ejb_ee_deploy_mdb_ejbref_singleT_TestBeanBMT" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-scopeT", - new String[] { "ejb_ee_deploy_mdb_ejbref_scopeT_Romeo", - "ejb_ee_deploy_mdb_ejbref_scopeT_Tristan", - "ejb_ee_deploy_mdb_ejbref_scopeT_Cyrano" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-casesensT", - new String[] { "ejb_ee_deploy_mdb_ejbref_casesensT_TestBean" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-singleT", - new String[] { "ejb_ee_deploy_mdb_ejblink_singleT_TestBean", - "ejb_ee_deploy_mdb_ejblink_singleT_TestBeanBMT" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-scopeT", - new String[] { "ejb_ee_deploy_mdb_ejblink_scopeT_TestBean" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-casesensT", - new String[] { "ejb_ee_deploy_mdb_ejblink_casesensT_TestBean" }); - htTopics1.put("tests-ejb-ee-deploy-mdb-resref-singleT", - new String[] { "ejb_ee_deploy_mdb_resref_singleT_TestBean" }); - - /* - * Topics for ejb30 sub-tree - */ - htTopics1.put("tests-ejb30-bb-session-stateless-annotation", - new String[] { "MY_TOPIC" }); - htTopics1.put("tests-ejb30-bb-mdb-dest-topic", new String[] { "MY_TOPIC" }); - htTopics1.put( - "tests-ejb30-bb-mdb-activationconfig-topic-selectordupsnondurable", - new String[] { "MY_TOPIC" }); - - /* - * Topics for servlet sub-tree - */ - htTopics1.put("tests-servlet-spec-annotation", new String[] { "MY_TOPIC" }); - - /* - * Topics for jsp sub-tree - */ - htTopics1.put("tests-jsp-spec-tagext-resource", - new String[] { "MY_TOPIC" }); - - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java deleted file mode 100644 index eea300569a..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java +++ /dev/null @@ -1,183 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.io.*; - -/** - * This is the TSJMSAdminInterface. An implementation of this interface must be - * provided by each Java EE implementation, to support their own - * creation/deletion semantics of topic/queue and - * QueueConnectionFactory/TopicConnectionFactory/ ConnectionFactory. - * - * @author Kyle Grucci - */ - -public interface TSJMSAdminInterface { - /** - * The init method is a logging mechanism for diagnostics. The writer - * parameter specifies the PrinterWriter that is used to log output. - * - * Initializes a new TSJMSAdminInterface instance. All output should be - * printed to this PrintWriter. All properties in the ts.jte file are - * accessible to this porting implementation class only via the - * TSPropertyManager class. - * - * @param writer - * The PrintWriter that is used to log output. - */ - public void init(PrintWriter writer); - - /** - * The createQueues method creates queues in a Java EE implementation. The - * queues parameter specifies the queue destination objects to create. - * - * @param queues - * Queues to create - * - */ - public void createQueues(String[] queues) throws TSJMSAdminException; - - /** - * The createTopics method creates topics in a Java EE implementation. The - * topics parameter specifies the topic destination objects to create. - * - * @param topics - * Topics to create - * - */ - public void createTopics(String[] topics) throws TSJMSAdminException; - - /** - * The removeQueues method removes queues in a Java EE implementation. The - * queues parameter specifies the queue destination objects to remove. - * - * @param queues - * Queues to remove - * - */ - public void removeQueues(String[] queues) throws TSJMSAdminException; - - /** - * The removeTopics method remove topics in a Java EE implementation. The - * topics parameter specifies the topic destination objects to remove. - * - * @param topics - * Topics to remove - * - */ - public void removeTopics(String[] topics) throws TSJMSAdminException; - - /** - * This method creates QueueConnectionFactorys in a Java EE implementation. - * - * Two String array parameters are passed when createQueueConnectionFactories - * is called, where the first array specifies QueueConnectionFactorys to - * create and the second array specifies properties associated with the - * QueueConnectionFactory. - * - * Arguments passed as queueConnectionFactories[n],props[n] where props[i] - * consists all properties that associated to QueueConnectionFactory - * queueConnectionFactories[i]. - * - * Each element in the Properties array consists of a String name value pair - * that defines the properties for the factory connection. Some of the - * connection factories set up by the Java EE TCK require a property for the - * clientID. The name value pair in this case would be "clientId=cts". If more - * than one property needs to be specified by a single QueueConnectionFactory, - * the properties should be space separated in the props string. If no - * property is being specified, the name value pair would be an empty String - * "". - * - * @param queueConnectionFactories - * queueConnectionFactories to create - * @param props - * properties for the connection, if any - */ - - public void createQueueConnectionFactories(String[] queueConnectionFactories, - String[] props) throws TSJMSAdminException; - - /** - * This method creates TopicConnectionFactorys in a Java EE implementation. - * - * Two String array parameters are passed when createTopicConnectionFactories - * is called, where the first array specifies TopicConnectionFactorys to - * create and the second array specifies properties associated with the - * TopicConnectionFactory. - * - * Arguments passed as topicConnectionFactories[n],props[n] where props[i] - * consists all properties that associated to TopicConnectionFactory - * topicConnectionFactories[i]. - * - * Each element in the Properties array consists of a String name value pair - * that defines the properties for the factory connection. Some of the - * connection factories set up by the Java EE TCK require a property for the - * clientID. The name value pair in this case would be "clientId=cts". If more - * than one property needs to be specified by a single TopicConnectionFactory, - * the properties should be space separated in the props string. If no - * property is being specified, the name value pair would be an empty String - * "". - * - * @param topicConnectionFactories - * topicConnectionFactories to create - * @param props - * properties for the connection, if any - */ - public void createTopicConnectionFactories(String[] topicConnectionFactories, - String[] props) throws TSJMSAdminException; - - /** - * This method creates ConnectionFactorys in a Java EE implementation. - * - * Two String array parameters are passed when createConnectionFactories is - * called, where the first array specifies ConnectionFactorys to create and - * the second array specifies properties associated with the - * ConnectionFactory. - * - * Arguments passed as connectionFactories[n],props[n] where props[i] consists - * all properties that associated to ConnectionFactory connectionFactories[i]. - * - * Each element in the Properties array consists of a String name value pair - * that defines the properties for the factory connection. If more than one - * property needs to be specified by a single ConnectionFactory, the - * properties should be space separated in the props string. If no property is - * being specified, the name value pair would be an empty String "". - * - * @param connectionFactories - * connectionFactories to create - * @param props - * properties for the connection, if any - */ - public void createConnectionFactories(String[] connectionFactories, - String[] props) throws TSJMSAdminException; - - /** - * This method removes ConnectionFactories from a Java EE implementation. - * - * @param jmsConnectionFactoryNames - * JmsConnectionFactoryNames to remove - * - */ - public void removeJmsConnectionFactories(String[] jmsConnectionFactoryNames) - throws TSJMSAdminException; - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java deleted file mode 100644 index 3f662ba738..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import com.sun.ts.lib.util.*; - -/** - * This is a factory class for creating instances of TSJMSObjectsInterface. The - * implementation classes used are determined by the values of the porting - * package properties in TS_HOME/bin/ts.jte. - * - */ -public class TSJMSObjects { - - private static final String DEFAULT_PORTING_CLASS = "com.sun.ts.lib.implementation.sun.jms.SunRIJMSObjects"; - - private static String portingPropName = "porting.ts.jmsObjects.class.1"; - - private static String portingClass = null; - - private static TSJMSObjectsInterface tsJmsObjects = null; - - public static TSJMSObjectsInterface getJMSObjectsInstance() throws Exception { - try { - // Create instance of the TSJMSObjectsInterface implementation - // class - TestUtil.logMsg("TSJMSObjects.getJMSObjectsInstance()"); - portingClass = TestUtil.getProperty(portingPropName); - if (portingClass == null) { - portingClass = DEFAULT_PORTING_CLASS; - TestUtil.logMsg("Property " + portingPropName + " not set. " - + "Using default porting class. "); - } - TestUtil.logMsg("Porting implementation class=" + portingClass); - if (tsJmsObjects == null) { - Class c = Class.forName(portingClass); - tsJmsObjects = (TSJMSObjectsInterface) c.newInstance(); - } - return tsJmsObjects; - } catch (Exception e) { - e.printStackTrace(); - throw e; - } - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java deleted file mode 100644 index 3a9a7872d9..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import jakarta.jms.*; - -/** - * This is the TSJMSObjectsInterface. An implementation of this interface must - * be provided by each JMS implementation to support their own implementation of - * getting administered objects. - * - */ -public interface TSJMSObjectsInterface { - /** - * This method allows JMS implementation to get Queue - */ - - public Queue getQueue(String name) throws Exception; - - /** - * This method allows JMS implementation to get Topic - */ - - public Topic getTopic(String name) throws Exception; - - /** - * This method allows JMS implementation to get TopicConnectionFactory - */ - - public TopicConnectionFactory getTopicConnectionFactory(String name) - throws Exception; - - /** - * This method allows JMS implementation to get QueueConnectionFactory - */ - - public QueueConnectionFactory getQueueConnectionFactory(String name) - throws Exception; - - /** - * This method allows JMS implementation to get ConnectionFactory - */ - - public ConnectionFactory getConnectionFactory(String name) throws Exception; - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java deleted file mode 100644 index 3018ffbaeb..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ -package com.sun.ts.lib.porting; - -import com.sun.ts.lib.util.*; - -/** - * TSLoginContext provides the implementation specific code for allowing a - * program to login as a specific user. This class is implemented as a wrapper - * class around Sun's login implementation code. - */ -public class TSLoginContext implements TSLoginContextInterface { - private TSLoginContextInterface ctsLogin = null; - - private String sClass = "porting.ts.login.class.1"; - - /** - * Provides the LoginContext needed to perform a login. - */ - public TSLoginContext() throws Exception { - // move initialization to login method, to make sure that TestUtil's - // properties are already initialized - } - - /** - * Provides the LoginContext needed to perform a login. - */ - public TSLoginContext(String sClassName) throws Exception { - sClass = sClassName; - } - - /** - * Performs the login functionality. - * - * @param usr - * the username to login - * @param pwd - * the password of user - */ - public void login(String usr, String pwd) throws Exception { - if (ctsLogin == null) { - init(); - } - ctsLogin.login(usr, pwd); - } - - /** - * This login method is used for certificate based login - * - * Note: This method also uses keystore and keystore password from the TS - * configuration file - * - * @param useralias - * - alias is used to pick up the certificate from keystore - */ - - public void login(String useralias) throws Exception { - if (ctsLogin == null) { - init(); - } - ctsLogin.login(useralias); - } - - /** - * This login method is used for certificate based login - * - * @param useralias - * - alias used to pickup the certificate from keystore - * @param keystore - * - keystore file - * @param keyPass - * - keystore password - */ - - public void login(String useralias, String keystore, String keyPass) - throws Exception { - if (ctsLogin == null) { - init(); - } - ctsLogin.login(useralias, keystore, keyPass); - } - - /** - * Performs logout. - */ - public Boolean logout() { - if (ctsLogin == null) { - init(); - } - return ctsLogin.logout(); - } - - private void init() { - try { - // create and initialize a new instance of the Login class - Class c = Class.forName(TestUtil.getProperty(sClass)); - ctsLogin = (TSLoginContextInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - // throw e; - } - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java deleted file mode 100644 index e86c5ab7ce..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -/** - * TSLoginContextInterface provides the interface that must be implemented to - * provide the implementation specific login code to login as a specified user. - */ -public interface TSLoginContextInterface { - /** - * This method is used for login with username and password. - * - * @param usr - * - string username - * @param pwd - * - string password - */ - public void login(String usr, String pwd) throws Exception; - - /** - * This login method is used for Certificate based login - * - * Note: This method also uses keystore and keystore password from the TS - * configuration file - * - * @param alias - * - alias is used to pick up the certificate from keystore - */ - public void login(String alias) throws Exception; - - /** - * This login method is used for Certificate based login - * - * @param alias - * - alias is used to pick up the certificate from keystore - * @param keystore - * - keystore file - * @param keyPass - * - keystore password - */ - public void login(String alias, String keystore, String keyPass) - throws Exception; - - /** - * This method is used for logout - */ - public Boolean logout(); - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java deleted file mode 100644 index 32d4d9db5f..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.net.*; -import java.io.Serializable; -import com.sun.ts.lib.util.*; - -/** - * This is a Java EE Reference specific implementation of the TSURLInterface - * which is to be used for Java EE TCK testing. TS tests use this interface to - * obtain the URL String to use to access a given web component. If a given Java - * EE Server implmentation requires that URLs be created in a different manner, - * then this implementation can be replaced. - * - * @author Kyle Grucci - */ -public class TSURL implements TSURLInterface, Serializable { - private TSURLInterface ctsURL = null; - - private String sClass = "porting.ts.url.class.1"; - - private String portingDefault = "com.sun.ts.lib.porting.implementation.SunRIURL"; - - public TSURL() { - // we'll initialize the impl when the individual method is called - // this constructor assumes sClass = "porting.ts.url.class.1". - } - - public TSURL(String sClassName) { - sClass = sClassName; - } - - /** - * This method is called by TS tests to get the URL to use to access a given - * web component. - * - * @param protocol - * - the name of the protocol. - * @param host - * - the name of the host. - * @param port - * - the port number. - * @param file - * - the host file. - * @return a valid URL object. - */ - public URL getURL(String protocol, String host, int port, String file) - throws MalformedURLException { - if (ctsURL == null) { - try { - // create and initialize a new instance of TSURLInterface - Class c = Class.forName(System.getProperty(sClass, portingDefault)); - ctsURL = (TSURLInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - } - - return ctsURL.getURL(protocol, host, port, file); - } - - /** - * This method is called by TS tests to get the URL to use to access a given - * web component. - * - * @param protocol - * - the name of the protocol. - * @param host - * - the name of the host. - * @param port - * - the port number. - * @param file - * - the host file. - * @return a valid URL as a String. - */ - public String getURLString(String protocol, String host, int port, - String file) { - if (ctsURL == null) { - try { - // create and initialize a new instance of TSURLInterface - Class c = Class.forName(System.getProperty(sClass, portingDefault)); - ctsURL = (TSURLInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - } - return ctsURL.getURLString(protocol, host, port, file); - } - - /** - * This method is called by TS tests to get the request string to use to - * access a given web component. - * - * @param request - * - the request file. - * @return a valid String object. - */ - public String getRequest(String request) { - if (ctsURL == null) { - try { - // create and initialize a new instance of TSURLInterface - // Class c = Class.forName(TestUtil.getProperty(sClass)); - // Use the system property porting.ts.url.class.1 - Class c = Class.forName(System.getProperty(sClass, portingDefault)); - ctsURL = (TSURLInterface) c.newInstance(); - } catch (Exception e) { - e.printStackTrace(); - } - } - return ctsURL.getRequest(request); - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java b/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java deleted file mode 100644 index 792af9f0c3..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -/* - * $Id$ - */ - -package com.sun.ts.lib.porting; - -import java.net.*; - -/** - * An implementation of the TSURLInterface is to be used for Java EE TCK - * testing. TS tests use this interface to obtain the URL String to use to - * access a given web component. If a given Java EE Server implmentation - * requires that URLs be created in a different manner, then this implementation - * can be replaced. - * - * @author Kyle Grucci - */ -public interface TSURLInterface { - /** - * This method is called by TS tests to get the URL to use to access a given - * web component. - * - * @param protocol - * - the name of the protocol. - * @param host - * - the name of the host. - * @param port - * - the port number. - * @param file - * - the host file. - * @return a valid URL object. - */ - public URL getURL(String protocol, String host, int port, String file) - throws MalformedURLException; - - /** - * This method is called by TS tests to get the URL to use to access a given - * web component. - * - * @param protocol - * - the name of the protocol. - * @param host - * - the name of the host. - * @param port - * - the port number. - * @param file - * - the host file. - * @return a valid URL as a String. - */ - public String getURLString(String protocol, String host, int port, - String file); - - /** - * This method is called by TS tests to get the request to use to access a - * given web component. - * - * @param request - * - the request file. - * @return a valid String object. - */ - public String getRequest(String request); -} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java b/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java deleted file mode 100644 index 9686340dd3..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.porting.implementation; - -import java.net.MalformedURLException; -import java.net.URL; - -import com.sun.ts.lib.porting.TSURLInterface; - -// import com.sun.ts.lib.porting.TSURLInterface; - -/** - * This is a J2EE Reference specific implementation of the TSURLInterface which - * is to be used for J2EE-TS testing. TS tests use this interface to obtain the - * URL String to use to access a given web component. If a given J2EE Server - * implmentation requires that URLs be created in a different manner, then this - * implementation can be replaced. - * - * @author Kyle Grucci - */ -public class SunRIURL implements TSURLInterface { - private URL url = null; - - /** - * This method is called by TS tests to get the URL to use to access a given web - * component. - * - * @param protocol - the name of the protocol. - * @param host - the name of the host. - * @param port - the port number. - * @param file - the host file. - * @return a valid URL object. - */ - public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException { - try { - url = new URL(protocol, host, port, file); - } catch (MalformedURLException e) { - // logger.log(Logger.Level.ERROR,"Failed during URL creation", e); - throw e; - } - return url; - } - - /** - * This method is called by TS tests to get the URL to use to access a given web - * component. - * - * @param protocol - the name of the protocol. - * @param host - the name of the host. - * @param port - the port number. - * @param file - the host file. - * @return a valid URL as a String. - */ - public String getURLString(String protocol, String host, int port, String file) { - if (file.startsWith("/")) - return protocol + "://" + host + ":" + port + file; - else - return protocol + "://" + host + ":" + port + "/" + file; - } - - /** - * This method is called by TS tests to get the request string to use to access - * a given web component. - * - * @param request - the request file. - * @return a valid String object. - */ - public String getRequest(String request) { - return request; - } -} diff --git a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java b/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java deleted file mode 100644 index 6fdd9b9747..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.tests.security.permissions; - -import java.security.BasicPermission; -import java.security.Permission; - -/** - * Java SecurityManager Permission class for CTS Test purposes. This permission - * extends the Permission class and is used to perform validations of - * permissions.xml. - * - * Sample usage of this permssion: permission - * com.sun.ts.tests.ejb30.sec.permsxml.CTSPermission1 "*"; - * - */ - -public final class CTSPermission1 extends Permission { - - private transient String methodName; - - private transient String actions; - - private transient int hashCodeValue = 0; - - /** - * Create a new CTSPermission1 with no action - * - * @param name - * - - */ - public CTSPermission1(String name) { - super(name); - } - - /** - * Creates a new CTSPermission1 with action - * - * @param name - * JNDI resource path name - * @param action - * JNDI action (none defined) - */ - public CTSPermission1(String name, String actions) { - super(name); - this.actions = actions; - } - - public boolean equals(Object o) { - if (o == null || !(o instanceof CTSPermission1)) - return false; - - CTSPermission1 that = (CTSPermission1) o; - - if (!this.getName().equals(that.getName())) - return false; - - if (this.methodName != null) { - if (that.methodName == null || !this.methodName.equals(that.methodName)) { - return false; - } - } else if (that.methodName != null) { - return false; - } - - if (this.actions != null) { - if (that.actions == null || !this.actions.equals(that.actions)) { - return false; - } - } else if (that.actions != null) { - return false; - } - - return true; - } - - public String getActions() { - return this.actions; - } - - public void setActions(String val) { - this.actions = val; - } - - public String getMethodName() { - return this.methodName; - } - - public void setMethodName(String val) { - this.methodName = val; - } - - public int hashCode() { - if (hashCodeValue == 0) { - - String hash = this.getName(); - if (this.actions != null) { - hash += " " + this.actions; - } - hashCodeValue = hash.hashCode(); - } - return this.hashCodeValue; - } - - public boolean implies(Permission permission) { - - CTSPermission1 that = (CTSPermission1) permission; - - if ((permission == null) || !(permission instanceof CTSPermission1)) { - return false; - } - - if (!this.getName().equals(that.getName())) { - return false; - } - - if ((this.methodName != null) && (that.methodName == null - || !this.methodName.equals(that.methodName))) { - return false; - } - - if ((this.actions != null) - && (that.actions == null || !this.actions.equals(that.actions))) { - return false; - } - - return true; - } - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java b/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java deleted file mode 100644 index fcc45f36c3..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.tests.security.permissions; - -import java.security.BasicPermission; -import java.security.Permission; - -/** - * Java SecurityManager Permission class for CTS Test purposes. This permission - * extends the Permission class and is used to perform validations of - * permissions.xml. - * - * Sample usage of this permssion: permission - * com.sun.ts.tests.ejb30.sec.permsxml.CTSPermission1 "*"; - * - */ - -public final class CTSPermission2 extends Permission { - - private transient String methodName; - - private transient String actions; - - private transient int hashCodeValue = 0; - - /** - * Create a new CTSPermission2 with no action - * - * @param name - * - - */ - public CTSPermission2(String name) { - super(name); - } - - /** - * Creates a new CTSPermission2 with action - * - * @param name - * JNDI resource path name - * @param action - * JNDI action (none defined) - */ - public CTSPermission2(String name, String actions) { - super(name); - this.actions = actions; - } - - public boolean equals(Object o) { - if (o == null || !(o instanceof CTSPermission2)) - return false; - - CTSPermission2 that = (CTSPermission2) o; - - if (!this.getName().equals(that.getName())) - return false; - - if (this.methodName != null) { - if (that.methodName == null || !this.methodName.equals(that.methodName)) { - return false; - } - } else if (that.methodName != null) { - return false; - } - - if (this.actions != null) { - if (that.actions == null || !this.actions.equals(that.actions)) { - return false; - } - } else if (that.actions != null) { - return false; - } - - return true; - } - - public String getActions() { - return this.actions; - } - - public void setActions(String val) { - this.actions = val; - } - - public String getMethodName() { - return this.methodName; - } - - public void setMethodName(String val) { - this.methodName = val; - } - - public int hashCode() { - if (hashCodeValue == 0) { - - String hash = this.getName(); - if (this.actions != null) { - hash += " " + this.actions; - } - hashCodeValue = hash.hashCode(); - } - return this.hashCodeValue; - } - - public boolean implies(Permission permission) { - - CTSPermission2 that = (CTSPermission2) permission; - - if ((permission == null) || !(permission instanceof CTSPermission2)) { - return false; - } - - if (!this.getName().equals(that.getName())) { - return false; - } - - if ((this.methodName != null) && (that.methodName == null - || !this.methodName.equals(that.methodName))) { - return false; - } - - if ((this.actions != null) - && (that.actions == null || !this.actions.equals(that.actions))) { - return false; - } - - return true; - } - -} diff --git a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java b/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java deleted file mode 100644 index 242db3d604..0000000000 --- a/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java +++ /dev/null @@ -1,344 +0,0 @@ -/* - * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Public License v. 2.0, which is available at - * http://www.eclipse.org/legal/epl-2.0. - * - * This Source Code may also be made available under the following Secondary - * Licenses when the conditions for such availability set forth in the - * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, - * version 2 with the GNU Classpath Exception, which is available at - * https://www.gnu.org/software/classpath/license.html. - * - * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 - */ - -package com.sun.ts.lib.tests.security.permissions; - -import java.security.BasicPermission; -import java.security.PermissionCollection; -import java.security.Permissions; -import java.security.Permission; - -import java.io.Serializable; -import java.util.Map; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Collections; -import java.util.StringTokenizer; - -/** - * This is a Java SE based Permission class, used for Test purposes. This - * permission extends the BasicPermission class and is used to perform - * validations of permissions.xml. - * - * This permission should support actions of "read" or "write" and basically - * tries to behave similar to the JavaSE PropertyPermission class. The reason - * for this locally defined class is that we want to reference it in the - * permissions.xml while ensuring it will not be used or pre-defined within any - * of the vendors app servers. This means there will ONLY be perms defined - * inpermissions.xml for READ actions. This will allow a different level of - * testing to be done. - * - * Sample usage of this permssion: permission - * com.sun.ts.tests.ejb30.sec.permsxml.CTSPropertyPermission "*" "read.write"; - * - */ - -public final class CTSPropertyPermission extends BasicPermission { - - private transient String methodName; - - private transient String actions; - - private transient int hashCodeValue = 0; - - private transient boolean isReadAction = false; - - private transient boolean isWriteAction = false; - - protected int mask = 0; - - static private int READ = 0x01; - - static private int WRITE = 0x02; - - /** - * Create a new CTSPropertyPermission with no action - * - * @param name - * - - */ - public CTSPropertyPermission(String name) { - this(name, "READ"); - } - - /** - * Creates a new CTSPropertyPermission with action - * - * @param name - * JNDI resource path name - * @param action - * JNDI action (none defined) - */ - public CTSPropertyPermission(String name, String actions) { - super(name); - this.setActions(actions); - this.mask = parseActions(actions); - } - - private int parseActions(String action) { - - // we support actions separated by a commona ',' or a space ' ' - StringTokenizer st = new StringTokenizer(action, ", "); - - mask = 0; - while (st.hasMoreTokens()) { - String token = st.nextToken(); - if (token.equals("READ")) { - mask |= READ; - } else if (token.equals("WRITE")) { - mask |= WRITE; - } else { - // ignore unrecognize actions and assume READ - mask |= READ; - } - } - return mask; - } - - public int getMask() { - return mask; - } - - public boolean equals(Object o) { - if (o == null || !(o instanceof CTSPropertyPermission)) - return false; - - CTSPropertyPermission that = (CTSPropertyPermission) o; - - if (!this.getName().equals(that.getName())) - return false; - - if (this.methodName != null) { - if (that.methodName == null || !this.methodName.equals(that.methodName)) { - return false; - } - } else if (that.methodName != null) { - return false; - } - - if (this.actions != null) { - if (that.actions == null || !this.actions.equals(that.actions)) { - return false; - } - } else if (that.actions != null) { - return false; - } - - if (that.mask != this.mask) { - return false; - } - - return true; - } - - public static String getActions(int mask) { - if (mask == 0) { - return ""; - } else if (mask == READ) { - return "READ"; - } else if (mask == WRITE) { - return "WRITE"; - } else if (mask == (READ | WRITE)) { - return "READ,WRITE"; - } else { - // something went wrong - System.out.println("in getActions(): bad value for mask = " + mask); - return "ZZZ"; - } - } - - public void setActions(String val) { - this.actions = val; - - this.actions = this.actions.toUpperCase(); - if (this.actions.contains("READ")) { - isReadAction = true; - } - - if (this.actions.contains("WRITE")) { - isWriteAction = true; - } - - } - - public String getMethodName() { - return this.methodName; - } - - public void setMethodName(String val) { - this.methodName = val; - } - - public int hashCode() { - if (hashCodeValue == 0) { - - String hash = this.getName(); - if (this.actions != null) { - hash += " " + this.actions; - } - hashCodeValue = hash.hashCode(); - } - return this.hashCodeValue; - } - - public boolean implies(Permission permission) { - - debug("enterred CTSPropertyPermission.implies()"); - - CTSPropertyPermission that = (CTSPropertyPermission) permission; - - if ((permission == null) - || !(permission instanceof CTSPropertyPermission)) { - debug("in implies(): permission ! instance of CTSPropertyPermission"); - return false; - } - - if ((!this.getName().equals("*")) - && (!this.getName().equals(that.getName()))) { - debug("in implies(): this.getName() != that.getName()"); - return false; - } - - if ((this.mask & that.mask) != that.mask) { - debug("in implies(): masks not equal"); - return false; - } - - if ((this.methodName != null) && (that.methodName == null - || !this.methodName.equals(that.methodName))) { - debug("that.methodName = " + that.methodName); - debug("this.methodName = " + this.methodName); - return false; - } - - String strName = that.getName(); - debug("in implies(): strName = " + strName); - debug("in implies(): this.actions() = " + this.getActions()); - debug("in implies(): that.actions() = " + that.getActions()); - - if (this.getIsReadAction() != that.getIsReadAction()) { - debug("in implies(): this.getIsReadAction() != that.getIsReadAction()"); - return false; - } - - if (this.getIsWriteAction() != that.getIsWriteAction()) { - debug("in implies(): this.getIsWriteAction() != that.getIsWriteAction()"); - return false; - } - - return true; - } - - public PermissionCollection newPermissionCollection() { - return new CTSPropertyPermissionCollection(); - } - - public void setIsReadAction(boolean val) { - isReadAction = val; - } - - public boolean getIsReadAction() { - return isReadAction; - } - - public void setIsWriteAction(boolean val) { - isWriteAction = val; - } - - public boolean getIsWriteAction() { - return isWriteAction; - } - - private void debug(String str) { - System.err.println(str); - } - -} - -/* - * - */ -final class CTSPropertyPermissionCollection extends PermissionCollection - implements Serializable { - private transient Map perms; - - public CTSPropertyPermissionCollection() { - perms = new HashMap(32); // some default - } - - public void add(Permission permission) { - - if (permission == null) { - throw new IllegalArgumentException( - "failed trying to add null permission"); - } - - if (!(permission instanceof CTSPropertyPermission)) { - throw new IllegalArgumentException("invalid permission: " + permission); - } - - if (isReadOnly()) { - throw new SecurityException( - "can't add perm to (READONLY) CTSPropertyPermission"); - } - - CTSPropertyPermission propPerm = (CTSPropertyPermission) permission; - String permName = propPerm.getName(); - - // try to get the perrm from our hashmap - CTSPropertyPermission thePerm = (CTSPropertyPermission) perms.get(permName); - if (thePerm != null) { - if (thePerm.getMask() != propPerm.getMask()) { - String actions = CTSPropertyPermission - .getActions(thePerm.getMask() | propPerm.getMask()); - perms.put(permName, new CTSPropertyPermission(permName, actions)); - } - } else { - perms.put(permName, permission); - } - } - - public boolean implies(Permission permission) { - - CTSPropertyPermission that = (CTSPropertyPermission) permission; - - if (!(permission instanceof CTSPropertyPermission)) { - System.out.println( - "CTSPropertyPermissionCollection.implies(): permission ! instance of CTSPropertyPermission"); - return false; - } - - String permName = that.getName(); - int desiredMask = that.getMask(); - int actualMask = 0; - - CTSPropertyPermission tempPerm = (CTSPropertyPermission) perms - .get(permName); - if (tempPerm != null) { - actualMask |= tempPerm.getMask(); - if ((actualMask & desiredMask) == desiredMask) { - return true; - } - } - - return false; - } - - public Enumeration elements() { - return Collections.enumeration(perms.values()); - } - -} diff --git a/cdi-ee-tck/README.md b/tcks/apis/cdi-ee-tck/README.md similarity index 100% rename from cdi-ee-tck/README.md rename to tcks/apis/cdi-ee-tck/README.md diff --git a/cdi-ee-tck/pom.xml b/tcks/apis/cdi-ee-tck/pom.xml similarity index 100% rename from cdi-ee-tck/pom.xml rename to tcks/apis/cdi-ee-tck/pom.xml diff --git a/cdi-ee-tck/runners/README.md b/tcks/apis/cdi-ee-tck/runners/README.md similarity index 100% rename from cdi-ee-tck/runners/README.md rename to tcks/apis/cdi-ee-tck/runners/README.md diff --git a/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8DeploymentExceptionTransformer.java b/tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8DeploymentExceptionTransformer.java similarity index 100% rename from cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8DeploymentExceptionTransformer.java rename to tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8DeploymentExceptionTransformer.java diff --git a/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8EEResourceManager.java b/tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8EEResourceManager.java similarity index 100% rename from cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8EEResourceManager.java rename to tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8EEResourceManager.java diff --git a/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8Extension.java b/tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8Extension.java similarity index 100% rename from cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8Extension.java rename to tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFly8Extension.java diff --git a/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFlyMessaging.java b/tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFlyMessaging.java similarity index 100% rename from cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFlyMessaging.java rename to tcks/apis/cdi-ee-tck/runners/src/test/java/org/jboss/weld/tck/wildfly/WildFlyMessaging.java diff --git a/cdi-ee-tck/runners/src/test/resources/META-INF/cdi-tck.properties b/tcks/apis/cdi-ee-tck/runners/src/test/resources/META-INF/cdi-tck.properties similarity index 100% rename from cdi-ee-tck/runners/src/test/resources/META-INF/cdi-tck.properties rename to tcks/apis/cdi-ee-tck/runners/src/test/resources/META-INF/cdi-tck.properties diff --git a/cdi-ee-tck/runners/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/tcks/apis/cdi-ee-tck/runners/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension similarity index 100% rename from cdi-ee-tck/runners/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension rename to tcks/apis/cdi-ee-tck/runners/src/test/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension diff --git a/cdi-ee-tck/runners/src/test/resources/arquillian.xml b/tcks/apis/cdi-ee-tck/runners/src/test/resources/arquillian.xml similarity index 100% rename from cdi-ee-tck/runners/src/test/resources/arquillian.xml rename to tcks/apis/cdi-ee-tck/runners/src/test/resources/arquillian.xml diff --git a/cdi-ee-tck/runners/wildfly-runner.pom b/tcks/apis/cdi-ee-tck/runners/wildfly-runner.pom similarity index 100% rename from cdi-ee-tck/runners/wildfly-runner.pom rename to tcks/apis/cdi-ee-tck/runners/wildfly-runner.pom diff --git a/cdi-ee-tck/tck-dist/EFTL.txt b/tcks/apis/cdi-ee-tck/tck-dist/EFTL.txt similarity index 100% rename from cdi-ee-tck/tck-dist/EFTL.txt rename to tcks/apis/cdi-ee-tck/tck-dist/EFTL.txt diff --git a/cdi-ee-tck/tck-dist/README.adoc b/tcks/apis/cdi-ee-tck/tck-dist/README.adoc similarity index 100% rename from cdi-ee-tck/tck-dist/README.adoc rename to tcks/apis/cdi-ee-tck/tck-dist/README.adoc diff --git a/cdi-ee-tck/tck-dist/apl.txt b/tcks/apis/cdi-ee-tck/tck-dist/apl.txt similarity index 100% rename from cdi-ee-tck/tck-dist/apl.txt rename to tcks/apis/cdi-ee-tck/tck-dist/apl.txt diff --git a/cdi-ee-tck/tck-dist/artifact-install.pom b/tcks/apis/cdi-ee-tck/tck-dist/artifact-install.pom similarity index 100% rename from cdi-ee-tck/tck-dist/artifact-install.pom rename to tcks/apis/cdi-ee-tck/tck-dist/artifact-install.pom diff --git a/cdi-ee-tck/tck-dist/pom.xml b/tcks/apis/cdi-ee-tck/tck-dist/pom.xml similarity index 100% rename from cdi-ee-tck/tck-dist/pom.xml rename to tcks/apis/cdi-ee-tck/tck-dist/pom.xml diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide-docinfo.xml b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide-docinfo.xml similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide-docinfo.xml rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide-docinfo.xml diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/cdi-tck-reference-guide.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/configuration.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/configuration.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/configuration.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/configuration.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/executing.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/executing.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/executing.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/executing.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/images/cdi_logo.png b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/cdi_logo.png similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/images/cdi_logo.png rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/cdi_logo.png diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-emailable-report.png b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-emailable-report.png similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-emailable-report.png rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-emailable-report.png diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-plugin-report.png b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-plugin-report.png similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-plugin-report.png rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-plugin-report.png diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-suite-detail-report.png b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-suite-detail-report.png similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-suite-detail-report.png rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-suite-detail-report.png diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-summary-report.png b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-summary-report.png similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-summary-report.png rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/images/testng-summary-report.png diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/installation.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/installation.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/installation.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/installation.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/introduction.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/introduction.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/introduction.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/introduction.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/part1.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/part1.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/part1.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/part1.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/part2.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/part2.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/part2.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/part2.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/reporting.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/reporting.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/reporting.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/reporting.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc b/tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc diff --git a/cdi-ee-tck/tck-dist/src/main/assembly/assembly.xml b/tcks/apis/cdi-ee-tck/tck-dist/src/main/assembly/assembly.xml similarity index 100% rename from cdi-ee-tck/tck-dist/src/main/assembly/assembly.xml rename to tcks/apis/cdi-ee-tck/tck-dist/src/main/assembly/assembly.xml diff --git a/cdi-ee-tck/tck/pom.xml b/tcks/apis/cdi-ee-tck/tck/pom.xml similarity index 100% rename from cdi-ee-tck/tck/pom.xml rename to tcks/apis/cdi-ee-tck/tck/pom.xml diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AbstractInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AbstractInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AbstractInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AbstractInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/AlphaInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanOverridingTypeLevelBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanOverridingTypeLevelBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanOverridingTypeLevelBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanOverridingTypeLevelBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelAndTypeLevelBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelAndTypeLevelBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelAndTypeLevelBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelAndTypeLevelBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithConstructorLevelBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithTypeLevelBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithTypeLevelBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithTypeLevelBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BeanWithTypeLevelBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/BravoInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/SessionBeanConstructorInterceptionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/SessionBeanConstructorInterceptionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/SessionBeanConstructorInterceptionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/aroundConstruct/ejb/SessionBeanConstructorInterceptionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBindingLiteral.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBindingLiteral.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBindingLiteral.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BallBindingLiteral.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBindingLiteral.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBindingLiteral.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBindingLiteral.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/BasketBindingLiteral.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedLifecycleInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedLifecycleInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedLifecycleInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ComplicatedLifecycleInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/EnterpriseInterceptorBindingResolutionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/EnterpriseInterceptorBindingResolutionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/EnterpriseInterceptorBindingResolutionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/EnterpriseInterceptorBindingResolutionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/LoggedService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MessageService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MonitorService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MonitorService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MonitorService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/MonitorService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PingBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PingBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PingBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PingBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PongBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PongBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PongBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/PongBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteMessageService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteMessageService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteMessageService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteMessageService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/RemoteService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/Service.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/Service.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/Service.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/Service.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ServiceStereotype.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ServiceStereotype.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ServiceStereotype.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/ServiceStereotype.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/TransactionalBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/TransactionalBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/TransactionalBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/bindings/resolution/ejb/TransactionalBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Binding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Binding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Binding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Binding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/Interceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/MiddleInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SessionBeanAroundInvokeInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SessionBeanAroundInvokeInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SessionBeanAroundInvokeInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SessionBeanAroundInvokeInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/bindings/ejb/SuperInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/AroundInvokeAccessInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/AroundInvokeAccessInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/AroundInvokeAccessInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/AroundInvokeAccessInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/BazInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/BazInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/BazInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/BazInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/FooInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/FooInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/FooInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/FooInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Printer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Printer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Printer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Printer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/PrinterSecurityInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/PrinterSecurityInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/PrinterSecurityInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/PrinterSecurityInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Toner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Toner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Toner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundInvoke/ee/Toner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Alarm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Alarm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Alarm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Alarm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AlarmSecurityInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AlarmSecurityInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AlarmSecurityInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AlarmSecurityInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AroundTimeoutInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AroundTimeoutInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AroundTimeoutInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/AroundTimeoutInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Bell.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Bell.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Bell.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Bell.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TestData.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TestData.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TestData.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TestData.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimeoutInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimeoutInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimeoutInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimeoutInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/TimingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/AroundTimeoutOrderInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/AroundTimeoutOrderInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/AroundTimeoutOrderInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/AroundTimeoutOrderInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Binding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Binding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Binding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Binding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/Interceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleTimingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleTimingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleTimingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/MiddleTimingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperTimingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperTimingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperTimingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/SuperTimingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/TimingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/TimingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/TimingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/aroundTimeout/bindings/TimingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeThreadInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeThreadInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeThreadInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundInvokeThreadInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundTimeoutThreadInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundTimeoutThreadInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundTimeoutThreadInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/AroundTimeoutThreadInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/InterceptorEnvironmentTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/InterceptorEnvironmentTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/InterceptorEnvironmentTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/InterceptorEnvironmentTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/TestEndObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/TestEndObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/TestEndObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/TestEndObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/BarServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/BarServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/BarServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/BarServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/FooServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/FooServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/FooServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/FooServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/InterceptorEnvironmentJNDITest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/InterceptorEnvironmentJNDITest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/InterceptorEnvironmentJNDITest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/InterceptorEnvironmentJNDITest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/MyInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/BarServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/BarServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/BarServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/BarServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/FooServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/FooServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/FooServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/FooServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/InterceptorEnvironmentJNDISessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/InterceptorEnvironmentJNDISessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/InterceptorEnvironmentJNDISessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/InterceptorEnvironmentJNDISessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/interceptorLifeCycle/environment/jndi/ejb/MyInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Airborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Airborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Airborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Airborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/AirborneInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/AirborneInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/AirborneInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/AirborneInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/DestructionInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/DestructionInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/DestructionInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/DestructionInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Destructive.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Destructive.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Destructive.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Destructive.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Rocket.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Rocket.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Rocket.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Rocket.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SessionBeanLifecycleInterceptorDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SessionBeanLifecycleInterceptorDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SessionBeanLifecycleInterceptorDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SessionBeanLifecycleInterceptorDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SuperDestructionInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SuperDestructionInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SuperDestructionInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/SuperDestructionInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Weapon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Weapon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Weapon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/bindings/ejb/Weapon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/AnimalInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/AnimalInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/AnimalInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/AnimalInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/CatInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/CatInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/CatInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/CatInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/LifecycleCallbackInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/LifecycleCallbackInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/LifecycleCallbackInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/interceptors/tests/contract/lifecycleCallback/ejb/LifecycleCallbackInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/jaxrs/JaxRsActivator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/jaxrs/JaxRsActivator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/jaxrs/JaxRsActivator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/jaxrs/JaxRsActivator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ChromeDevtoolsDriver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ChromeDevtoolsDriver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ChromeDevtoolsDriver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ChromeDevtoolsDriver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/DriverPool.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/DriverPool.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/DriverPool.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/DriverPool.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ExtendedWebDriver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ExtendedWebDriver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ExtendedWebDriver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/ExtendedWebDriver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/WebPage.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/WebPage.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/WebPage.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/selenium/WebPage.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/DummySessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/DummySessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/DummySessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/DummySessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/EnterpriseArchiveBuilder.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/EnterpriseArchiveBuilder.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/EnterpriseArchiveBuilder.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/EnterpriseArchiveBuilder.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/WebArchiveBuilder.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/WebArchiveBuilder.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/WebArchiveBuilder.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/shrinkwrap/ee/WebArchiveBuilder.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/DisabledEjbInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/DisabledEjbInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/DisabledEjbInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/DisabledEjbInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EjbInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EjbInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EjbInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EjbInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EnabledEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EnabledEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EnabledEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/EnabledEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/NotEnabledEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/NotEnabledEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/NotEnabledEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/NotEnabledEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/SessionBeanAlternativeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/SessionBeanAlternativeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/SessionBeanAlternativeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/SessionBeanAlternativeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseProduction.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseProduction.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseProduction.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseProduction.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/DatabaseTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/EnabledResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/EnabledResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/EnabledResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/EnabledResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/NotEnabledResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/NotEnabledResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/NotEnabledResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/NotEnabledResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/ResourceAlternativeAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/ResourceAlternativeAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/ResourceAlternativeAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/enterprise/resource/ResourceAlternativeAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative01Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative01Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative01Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative01Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative03Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative03Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative03Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseSelectedAlternative03Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/EnterpriseService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/PojoService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/PojoService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/PojoService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/PojoService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/SelectedAlternativeTestUtil.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/SelectedAlternativeTestUtil.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/SelectedAlternativeTestUtil.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/SelectedAlternativeTestUtil.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/Service.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/Service.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/Service.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/enterprise/Service.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/BravoResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/BravoResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/BravoResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/BravoResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/CharlieResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/CharlieResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/CharlieResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/CharlieResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/DeltaResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/DeltaResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/DeltaResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/DeltaResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ProductionReady.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ProductionReady.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ProductionReady.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ProductionReady.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative01Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative01Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative01Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative01Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative04Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative04Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative04Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternative04Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternativeExplicitPriorityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternativeExplicitPriorityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternativeExplicitPriorityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceAlternativeExplicitPriorityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/alternative/selection/resource/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/ActivateRequestContextinEETest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/ActivateRequestContextinEETest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/ActivateRequestContextinEETest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/ActivateRequestContextinEETest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/activation/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationResource.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationResource.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationResource.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ApplicationResource.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/IntrospectApplication.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/IntrospectApplication.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/IntrospectApplication.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/IntrospectApplication.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/Result.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/Result.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/Result.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/Result.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/SimpleApplicationBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/SimpleApplicationBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/SimpleApplicationBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/SimpleApplicationBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestHttpSessionListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestHttpSessionListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestHttpSessionListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestHttpSessionListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletContextListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletContextListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletContextListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletContextListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/TestServletRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/ApplicationContextAsyncListenerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/ApplicationContextAsyncListenerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/ApplicationContextAsyncListenerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/ApplicationContextAsyncListenerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncRequestProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncRequestProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncRequestProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncRequestProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/AsyncServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/FailingServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/FailingServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/FailingServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/FailingServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleApplicationBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleApplicationBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleApplicationBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleApplicationBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleAsyncListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleAsyncListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleAsyncListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/SimpleAsyncListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/async/StatusServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/ApplicationContextDestructionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/ApplicationContextDestructionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/ApplicationContextDestructionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/ApplicationContextDestructionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/BarInfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/BarInfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/BarInfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/BarInfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/FooInitServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/FooInitServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/FooInitServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/destroy/FooInitServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/ApplicationContextDisposerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/ApplicationContextDisposerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/ApplicationContextDisposerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/ApplicationContextDisposerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Edible.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Edible.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Edible.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Edible.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Forest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Forest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Forest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Forest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroom.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroom.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroom.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroom.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroomer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroomer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroomer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/disposer/Mushroomer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/ApplicationContextSharedTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/ApplicationContextSharedTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/ApplicationContextSharedTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/ApplicationContextSharedTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/BarBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/BarBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/BarBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/BarBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMS.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMS.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMS.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMS.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMSModelIII.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMSModelIII.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMSModelIII.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FMSModelIII.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/FooRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/SimpleApplicationBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/SimpleApplicationBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/SimpleApplicationBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/ejb/SimpleApplicationBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventMultiWarTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventMultiWarTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventMultiWarTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventMultiWarTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ApplicationScopeEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Collector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Collector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Collector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Collector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Helper.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Helper.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Helper.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Helper.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer3.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer3.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer3.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/Observer3.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ObserverNames.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ObserverNames.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ObserverNames.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/ObserverNames.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/PingServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/PingServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/PingServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/event/PingServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Action.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Action.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Action.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Action.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingleton.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingleton.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingleton.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingleton.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingletonPostConstructCallbackTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingletonPostConstructCallbackTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingletonPostConstructCallbackTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/EagerSingletonPostConstructCallbackTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Service.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Service.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Service.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/Service.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBeanPostConstructCallbackTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBeanPostConstructCallbackTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBeanPostConstructCallbackTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/postconstruct/SimpleBeanPostConstructCallbackTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/ApplicationContextPreDestroyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/ApplicationContextPreDestroyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/ApplicationContextPreDestroyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/ApplicationContextPreDestroyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/application/predestroy/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/AbstractConversationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/AbstractConversationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/AbstractConversationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/AbstractConversationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/BuiltInConversation.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/BuiltInConversation.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/BuiltInConversation.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/BuiltInConversation.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ClientConversationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ClientConversationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ClientConversationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ClientConversationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cloud.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cloud.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cloud.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cloud.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/CloudController.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/CloudController.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/CloudController.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/CloudController.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationContextObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationContextObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationContextObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationContextObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationStatusServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationStatusServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationStatusServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationStatusServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationTestPhaseListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationTestPhaseListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationTestPhaseListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ConversationTestPhaseListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cumulus.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cumulus.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cumulus.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Cumulus.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/InvalidatingSessionDestroysConversationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/LongRunningConversationPropagatedByFacesContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ManualCidPropagationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ManualCidPropagationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ManualCidPropagationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/ManualCidPropagationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/OutermostFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/OutermostFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/OutermostFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/OutermostFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Storm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Storm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Storm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/Storm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncFooServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncFooServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncFooServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncFooServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncRequestProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncRequestProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncRequestProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/AsyncRequestProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BarFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BarFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BarFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BarFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BazRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BazRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BazRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/BazRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/ConversationDeterminationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/ConversationDeterminationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/ConversationDeterminationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/ConversationDeterminationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/Duck.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/Duck.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/Duck.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/Duck.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FailingServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FailingServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FailingServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FailingServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FooServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FooServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FooServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/FooServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/QuxAsyncListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/QuxAsyncListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/QuxAsyncListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/QuxAsyncListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/StatusServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/TestResult.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/TestResult.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/TestResult.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/determination/TestResult.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ApplicationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ApplicationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ApplicationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ApplicationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/ConversationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/LongRunningConversationLifecycleEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/LongRunningConversationLifecycleEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/LongRunningConversationLifecycleEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/LongRunningConversationLifecycleEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/Servlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/Servlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/Servlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/Servlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/TransientConversationLifecycleEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/TransientConversationLifecycleEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/TransientConversationLifecycleEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/TransientConversationLifecycleEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ConversationScopedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ConversationScopedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ConversationScopedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ConversationScopedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/DestroyConversationNotAssociatedWithCurrentRequestEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/DestroyConversationNotAssociatedWithCurrentRequestEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/DestroyConversationNotAssociatedWithCurrentRequestEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/DestroyConversationNotAssociatedWithCurrentRequestEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ObservingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ObservingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ObservingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/ObservingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/event/notattached/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/ConversationFilterTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/ConversationFilterTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/ConversationFilterTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/ConversationFilterTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Dummy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Dummy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Dummy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Dummy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/IntrospectServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/IntrospectServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/IntrospectServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/IntrospectServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/OuterFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/OuterFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/OuterFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/OuterFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/State.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/State.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/State.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/State.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Tester.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Tester.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Tester.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/filter/Tester.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/InactiveConversationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/InactiveConversationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/InactiveConversationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/inactive/InactiveConversationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Message.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Message.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Message.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Message.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Servlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Servlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Servlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/Servlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/ServletConversationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/ServletConversationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/ServletConversationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/conversation/servlet/ServletConversationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/DependentContextEjbTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/DependentContextEjbTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/DependentContextEjbTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/DependentContextEjbTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Farm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Farm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Farm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Farm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FarmLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FarmLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FarmLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FarmLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Fox.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Fox.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Fox.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Fox.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRun.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRun.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRun.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRun.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRunLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRunLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRunLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/FoxRunLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Horse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Horse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Horse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Horse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/House.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/House.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/House.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/House.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/HouseLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/HouseLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/HouseLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/HouseLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Room.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Room.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Room.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Room.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/RoomLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/RoomLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/RoomLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/RoomLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Stable.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Stable.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Stable.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Stable.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Table.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Table.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Table.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/Table.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/TableLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/TableLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/TableLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/dependent/ejb/TableLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/AbstractMessageListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/AbstractMessageListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/AbstractMessageListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/AbstractMessageListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LogStore.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LogStore.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LogStore.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LogStore.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LoggerService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LoggerService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LoggerService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/LoggerService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/MessageDrivenBeanContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/MessageDrivenBeanContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/MessageDrivenBeanContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/MessageDrivenBeanContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/QueueMessageDrivenBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/QueueMessageDrivenBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/QueueMessageDrivenBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/QueueMessageDrivenBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/SimpleMessageProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/SimpleMessageProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/SimpleMessageProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/SimpleMessageProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/TopicMessageDrivenBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/TopicMessageDrivenBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/TopicMessageDrivenBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/jms/TopicMessageDrivenBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/EnterpriseBeanWithNonPassivatingDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/EnterpriseBeanWithNonPassivatingDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/EnterpriseBeanWithNonPassivatingDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/EnterpriseBeanWithNonPassivatingDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianHaminaLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianHaminaLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianHaminaLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianHaminaLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianhaminaDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianhaminaDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianhaminaDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/MaarianhaminaDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/Maarianhamina_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/Maarianhamina_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/Maarianhamina_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/Maarianhamina_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/BrokenDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/BrokenDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/BrokenDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/BrokenDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/District.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/District.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/District.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/District.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EspooLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EspooLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EspooLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/EspooLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/Espoo_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/Espoo_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/Espoo_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/decorator/enterprise/field/Espoo_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Cup_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Cup_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Cup_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Cup_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/NonPassivationCapableEjbWithPassivatingScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/NonPassivationCapableEjbWithPassivatingScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/NonPassivationCapableEjbWithPassivatingScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/NonPassivationCapableEjbWithPassivatingScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/District.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/District.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/District.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/District.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/EspooLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/EspooLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/EspooLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/EspooLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/Espoo_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/Espoo_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/Espoo_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/Espoo_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/enterprise/field/UnserializableSimpleInjectedIntoPassivatingEnterpriseBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Digital.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Digital.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Digital.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Digital.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/DigitalInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/DigitalInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/DigitalInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/DigitalInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/EnterpriseBeanWithNonPassivatingInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/EnterpriseBeanWithNonPassivatingInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/EnterpriseBeanWithNonPassivatingInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/EnterpriseBeanWithNonPassivatingInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Telephone.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Telephone.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Telephone.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/Telephone.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/BrokenInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/BrokenInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/BrokenInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/BrokenInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/District.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/District.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/District.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/District.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EnterpriseBeanWithNonPassivatingInjectedFieldInInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EspooLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EspooLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EspooLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/EspooLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/Espoo_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/Espoo_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/Espoo_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/interceptor/enterprise/field/Espoo_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/British.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/British.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/British.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/British.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/ConstructorInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/ConstructorInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/ConstructorInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/ConstructorInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Corral.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Corral.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Corral.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Corral.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Cow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Cow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Cow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/Cow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/CowProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/CowProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/CowProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/CowProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/EnterpriseBeanWithIllegalDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/EnterpriseBeanWithIllegalDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/EnterpriseBeanWithIllegalDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/EnterpriseBeanWithIllegalDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/FieldInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/FieldInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/FieldInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/FieldInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/SetterInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/SetterInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/SetterInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/field/enterprise/SetterInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/British.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/British.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/British.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/British.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ConstructorInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ConstructorInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ConstructorInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ConstructorInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Cow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Cow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Cow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Cow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/CowProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/CowProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/CowProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/CowProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/EnterpriseBeanWithIllegalDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/EnterpriseBeanWithIllegalDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/EnterpriseBeanWithIllegalDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/EnterpriseBeanWithIllegalDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/FieldInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/FieldInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/FieldInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/FieldInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Herd.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Herd.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Herd.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Herd.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ProducerMethodParamInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ProducerMethodParamInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ProducerMethodParamInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/ProducerMethodParamInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Ranch.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Ranch.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Ranch.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/Ranch.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/SetterInjectionCorralBroken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/SetterInjectionCorralBroken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/SetterInjectionCorralBroken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/broken/producer/method/enterprise/SetterInjectionCorralBroken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Another.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Another.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Another.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Another.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourcePassivationDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourcePassivationDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourcePassivationDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourcePassivationDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/DataSourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Pool.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Pool.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Pool.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Pool.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Profile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Profile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Profile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/Profile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourcePassivationDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourcePassivationDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourcePassivationDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourcePassivationDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/persistence/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ResourcePassivationDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ResourcePassivationDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ResourcePassivationDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ResourcePassivationDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/Worker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/Worker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/Worker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/Worker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/resource/remote/ejb/FooRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Chef.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Chef.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Chef.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Chef.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Hammer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Hammer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Hammer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Hammer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/SessionBeanPassivationDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/SessionBeanPassivationDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/SessionBeanPassivationDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/SessionBeanPassivationDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Spoon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Spoon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Spoon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Spoon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Worker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Worker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Worker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/dependency/sessionbean/Worker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Digital.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Digital.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Digital.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Digital.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/DigitalInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/DigitalInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/DigitalInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/DigitalInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/NonPassivationCapableSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/NonPassivationCapableSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/NonPassivationCapableSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/NonPassivationCapableSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Telephone.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Telephone.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Telephone.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/Telephone.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/TelephoneLine.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/TelephoneLine.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/TelephoneLine.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/TelephoneLine.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Digital.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Digital.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Digital.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Digital.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/DigitalInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/DigitalInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/DigitalInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/DigitalInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Elephant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Elephant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Elephant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Elephant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ElephantLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ElephantLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ElephantLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ElephantLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanXmlDescriptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanXmlDescriptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanXmlDescriptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/StatefulSessionBeanXmlDescriptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Telephone.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Telephone.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Telephone.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/Telephone.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/TelephoneLine.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/TelephoneLine.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/TelephoneLine.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/TelephoneLine.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Digital.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Digital.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Digital.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Digital.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/DigitalInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/DigitalInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/DigitalInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/DigitalInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Elephant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Elephant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Elephant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Elephant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ElephantLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ElephantLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ElephantLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ElephantLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanXmlDescriptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanXmlDescriptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanXmlDescriptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/StatefulSessionBeanXmlDescriptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Telephone.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Telephone.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Telephone.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/Telephone.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/TelephoneLine.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/TelephoneLine.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/TelephoneLine.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/TelephoneLine.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ContextDestructionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ContextDestructionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ContextDestructionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ContextDestructionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/IntrospectServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/RequestContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/RequestContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/RequestContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/RequestContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/SimpleRequestBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/SimpleRequestBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/SimpleRequestBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/SimpleRequestBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServletRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServletRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServletRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/TestServletRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncRequestProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncRequestProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncRequestProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncRequestProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/AsyncServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/FailingServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/FailingServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/FailingServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/FailingServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/RequestContextAsyncListenerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/RequestContextAsyncListenerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/RequestContextAsyncListenerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/RequestContextAsyncListenerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleAsyncListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleAsyncListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleAsyncListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleAsyncListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleRequestBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleRequestBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleRequestBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/SimpleRequestBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/async/StatusServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/BarBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/BarBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/BarBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/BarBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/EJBRequestContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/EJBRequestContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/EJBRequestContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/EJBRequestContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMS.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMS.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMS.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMS.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMSModelIII.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMSModelIII.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMSModelIII.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FMSModelIII.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRequestBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRequestBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRequestBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/FooRequestBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/SimpleRequestBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/SimpleRequestBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/SimpleRequestBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/ejb/SimpleRequestBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/ObservingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/ObservingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/ObservingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/ObservingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/RequestScopeEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/RequestScopeEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/RequestScopeEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/RequestScopeEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/Servlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/Servlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/Servlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/Servlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/ApplicationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/ApplicationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/ApplicationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/ApplicationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/AsyncService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/AsyncService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/AsyncService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/AsyncService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopeEventAsyncTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopeEventAsyncTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopeEventAsyncTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopeEventAsyncTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/async/RequestScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/AbstractMessageListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/AbstractMessageListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/AbstractMessageListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/AbstractMessageListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/ApplicationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/ApplicationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/ApplicationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/ApplicationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopeEventMessageDeliveryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopeEventMessageDeliveryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopeEventMessageDeliveryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopeEventMessageDeliveryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/RequestScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/SimpleMessageProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/SimpleMessageProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/SimpleMessageProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/SimpleMessageProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/TopicMessageDrivenBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/TopicMessageDrivenBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/TopicMessageDrivenBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/jms/TopicMessageDrivenBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/ApplicationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/ApplicationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/ApplicationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/ApplicationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/FooRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopeEventRemoteTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopeEventRemoteTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopeEventRemoteTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopeEventRemoteTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/remote/RequestScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/ApplicationScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/ApplicationScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/ApplicationScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/ApplicationScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopeEventTimeoutTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopeEventTimeoutTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopeEventTimeoutTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopeEventTimeoutTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopedObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopedObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopedObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/RequestScopedObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/TimeoutService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/TimeoutService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/TimeoutService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/event/timeout/TimeoutService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/FooResource.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/FooResource.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/FooResource.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/FooResource.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/ObservingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/ObservingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/ObservingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/ObservingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/RequestContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/RequestContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/RequestContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/jaxrs/RequestContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/Action.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/Action.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/Action.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/Action.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingleton.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingleton.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingleton.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingleton.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonInfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonInfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonInfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonInfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonPostConstructCallbackTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonPostConstructCallbackTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonPostConstructCallbackTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/EagerSingletonPostConstructCallbackTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/RequestContextObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/RequestContextObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/RequestContextObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/RequestContextObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBeanPostConstructCallbackTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBeanPostConstructCallbackTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBeanPostConstructCallbackTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleBeanPostConstructCallbackTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleInfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleInfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleInfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/request/postconstruct/SimpleInfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectHttpSessionListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectHttpSessionListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectHttpSessionListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectHttpSessionListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServletRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServletRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServletRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/IntrospectServletRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SessionContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SessionContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SessionContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SessionContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SimpleSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SimpleSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SimpleSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/SimpleSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncRequestProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncRequestProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncRequestProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncRequestProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/AsyncServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/FailingServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/FailingServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/FailingServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/FailingServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SessionContextAsyncListenerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SessionContextAsyncListenerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SessionContextAsyncListenerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SessionContextAsyncListenerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleAsyncListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleAsyncListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleAsyncListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleAsyncListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/SimpleSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/async/StatusServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/ObservingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/ObservingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/ObservingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/ObservingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/Servlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/Servlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/Servlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/Servlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopeEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopeEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopeEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopeEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/event/SessionScopedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/IntrospectServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/IntrospectServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/IntrospectServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/IntrospectServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextHttpSessionListenerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextHttpSessionListenerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextHttpSessionListenerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextHttpSessionListenerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextServletRequestListenerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextServletRequestListenerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextServletRequestListenerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SessionContextServletRequestListenerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SimpleSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SimpleSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SimpleSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/SimpleSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestHttpSessionListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestHttpSessionListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestHttpSessionListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestHttpSessionListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestServletRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestServletRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestServletRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/TestServletRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InitServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InitServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InitServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/InitServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionContextListenerShutdownTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionContextListenerShutdownTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionContextListenerShutdownTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionContextListenerShutdownTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionScopedTestFlagClient.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionScopedTestFlagClient.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionScopedTestFlagClient.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/SessionScopedTestFlagClient.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestFlag.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestFlag.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestFlag.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestFlag.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestHttpSessionListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestHttpSessionListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestHttpSessionListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/context/session/listener/shutdown/TestHttpSessionListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/BuiltinHttpServletRequestDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/BuiltinHttpServletRequestDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/BuiltinHttpServletRequestDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/BuiltinHttpServletRequestDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/request/HttpServletRequestDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/BuiltinServletContextDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/BuiltinServletContextDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/BuiltinServletContextDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/BuiltinServletContextDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/servletcontext/ServletContextDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/BuiltinHttpSessionDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/BuiltinHttpSessionDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/BuiltinHttpSessionDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/BuiltinHttpSessionDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/HttpSessionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/SessionListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/SessionListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/SessionListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/http/session/SessionListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/BuiltinPrincipalDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/BuiltinPrincipalDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/BuiltinPrincipalDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/BuiltinPrincipalDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalInjector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalInjector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalInjector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/principal/PrincipalInjector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/BuiltinUserTransactionDecoratorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/BuiltinUserTransactionDecoratorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/BuiltinUserTransactionDecoratorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/BuiltinUserTransactionDecoratorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/SessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/SessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/SessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/SessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/UserTransactionDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/UserTransactionDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/UserTransactionDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/builtin/transaction/UserTransactionDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankAccount.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankAccount.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankAccount.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankAccount.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/BankServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ChargeDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ChargeDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ChargeDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ChargeDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DecoratorInstanceIsDependentObjectTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DecoratorInstanceIsDependentObjectTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DecoratorInstanceIsDependentObjectTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DecoratorInstanceIsDependentObjectTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DurableAccount.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DurableAccount.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DurableAccount.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/DurableAccount.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ShortTermAccount.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ShortTermAccount.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ShortTermAccount.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/definition/lifecycle/ShortTermAccount.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/EJBDecoratorInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/EJBDecoratorInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/EJBDecoratorInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/EJBDecoratorInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/Pig.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/Pig.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/Pig.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/Pig.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigSty.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigSty.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigSty.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigSty.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyImpl.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyImpl.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyImpl.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/ejb/PigStyImpl.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusiness.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusiness.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusiness.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusiness.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusinessDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusinessDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusinessDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BarBusinessDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Business.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Business.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Business.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Business.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BusinessBase.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BusinessBase.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BusinessBase.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/BusinessBase.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/EnterpriseDecoratorInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/EnterpriseDecoratorInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/EnterpriseDecoratorInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/EnterpriseDecoratorInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusiness.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusiness.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusiness.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusiness.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooBusinessDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/invocation/enterprise/FooInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/AbstractDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/AbstractDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/AbstractDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/AbstractDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/Decorated.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/Decorated.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/Decorated.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/Decorated.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DecoratedImpl.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DecoratedImpl.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DecoratedImpl.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DecoratedImpl.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DummyDao.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DummyDao.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DummyDao.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/DummyDao.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/EnterpriseDecoratorOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/EnterpriseDecoratorOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/EnterpriseDecoratorOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/EnterpriseDecoratorOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GlobalDecoratorOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GlobalDecoratorOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GlobalDecoratorOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GlobalDecoratorOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator3.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator3.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator3.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator3.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator4.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator4.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator4.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator4.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator5.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator5.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator5.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/GloballyEnabledDecorator5.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator3.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator3.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator3.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/LegacyDecorator3.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/WebApplicationGlobalDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/WebApplicationGlobalDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/WebApplicationGlobalDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/decorators/ordering/global/WebApplicationGlobalDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RestrictedSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RestrictedSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RestrictedSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RestrictedSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RockBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RockBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RockBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/broken/restricted/ejb/RockBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Bird.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Bird.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Bird.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Bird.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Cobra.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Cobra.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Cobra.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Cobra.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Creature.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Creature.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Creature.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Creature.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/CreatureLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/CreatureLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/CreatureLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/CreatureLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryCreature.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryCreature.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryCreature.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryCreature.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LegendaryLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginAction.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginAction.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginAction.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginAction.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginActionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginActionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginActionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/LoginActionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mammal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mammal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mammal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mammal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mock.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mock.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mock.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Mock.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/MockLoginActionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/MockLoginActionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/MockLoginActionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/MockLoginActionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Reptile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Reptile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Reptile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Reptile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/SessionBeanTypesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/SessionBeanTypesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/SessionBeanTypesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/SessionBeanTypesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Snake.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Snake.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Snake.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Snake.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Tiger.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Tiger.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Tiger.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Tiger.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Vulture.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Vulture.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Vulture.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/Vulture.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/AnimalHolder.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/AnimalHolder.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/AnimalHolder.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/AnimalHolder.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/BeanTypesWithIllegalTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/BeanTypesWithIllegalTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/BeanTypesWithIllegalTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/BeanTypesWithIllegalTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Bird.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Bird.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Bird.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Bird.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Eagle.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Eagle.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Eagle.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Eagle.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Produced.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Produced.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Produced.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/bean/types/enterprise/illegal/Produced.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/BorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnglishBorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/EnterpriseQualifierDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/FamousCatLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairless.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairless.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairless.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairless.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessCat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessCat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessCat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessCat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairlessQualifier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Hairy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairyQualifier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairyQualifier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairyQualifier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/HairyQualifier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/LongHairedDog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/LongHairedDog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/LongHairedDog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/LongHairedDog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Skinny.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Skinny.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Skinny.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/Skinny.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyHairlessCatLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/SkinnyQualifier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/qualifier/enterprise/TameSkinnyHairlessCatLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanTooManyScopesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanTooManyScopesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanTooManyScopesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanTooManyScopesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanWithTooManyScopeTypes_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanWithTooManyScopeTypes_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanWithTooManyScopeTypes_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/SessionBeanWithTooManyScopeTypes_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldTooManyScopesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldTooManyScopesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldTooManyScopesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldTooManyScopesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldWithTooManyScopeTypes_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldWithTooManyScopeTypes_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldWithTooManyScopeTypes_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/SessionBeanProducerFieldWithTooManyScopeTypes_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/Word.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/Word.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/Word.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/field/Word.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodTooManyScopesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodTooManyScopesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodTooManyScopesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodTooManyScopesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodWithTooManyScopeTypes_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodWithTooManyScopeTypes_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodWithTooManyScopeTypes_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/SessionBeanProducerMethodWithTooManyScopeTypes_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/Word.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/Word.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/Word.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/broken/tooManyScopes/ejb/producer/method/Word.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTiger.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTiger.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTiger.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTiger.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTigerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTigerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTigerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BengalTigerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/BorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnglishBorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnterpriseScopeDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnterpriseScopeDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnterpriseScopeDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/EnterpriseScopeDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/FooScoped.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/FooScoped.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/FooScoped.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/FooScoped.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Siamese.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Siamese.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Siamese.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Siamese.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/SiameseLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/SiameseLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/SiameseLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/SiameseLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Tiger.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Tiger.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Tiger.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/scope/enterprise/Tiger.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/AbstractService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/AbstractService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/AbstractService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/AbstractService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeSpecializeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeSpecializeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeSpecializeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeSpecializeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/EnterpriseStereotypeAlternativeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Mock.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Mock.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Mock.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Mock.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/MockService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/MockService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/MockService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/MockService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/RealService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/RealService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/RealService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/RealService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Service.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Service.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Service.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/Service.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/SimpleAlternativeService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/SimpleAlternativeService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/SimpleAlternativeService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/alternative/enterprise/SimpleAlternativeService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/AnimalStereotype.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Barracuda.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Barracuda.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Barracuda.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Barracuda.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BarracudaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/BorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Chihuahua.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Chihuahua.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Chihuahua.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Chihuahua.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ChihuahuaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ChihuahuaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ChihuahuaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ChihuahuaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnglishBorderCollieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/EnterpriseStereotypeDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Fish.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Fish.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Fish.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/Fish.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/FishStereotype.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/FishStereotype.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/FishStereotype.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/FishStereotype.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/LongHairedDog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/LongHairedDog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/LongHairedDog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/LongHairedDog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahua.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahua.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahua.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahua.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahuaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahuaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahuaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/MexicanChihuahuaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ShortHairedDog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ShortHairedDog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ShortHairedDog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/ShortHairedDog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracuda.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracuda.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracuda.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracuda.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/enterprise/TameBarracudaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaStereotype.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaStereotype.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaStereotype.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/AlphaStereotype.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/EnterpriseStereotypeInterceptorBindingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/EnterpriseStereotypeInterceptorBindingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/EnterpriseStereotypeInterceptorBindingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/EnterpriseStereotypeInterceptorBindingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/definition/stereotype/interceptor/enterprise/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Alpha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Alpha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Alpha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Alpha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/AlphaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/AlphaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/AlphaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/AlphaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Bravo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Bravo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Bravo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Bravo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/BravoLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/BravoLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/BravoLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/BravoLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Charlie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Charlie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Charlie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Charlie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/CharlieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/CharlieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/CharlieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/CharlieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Delta.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Delta.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Delta.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Delta.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/DeltaLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/DeltaLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/DeltaLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/DeltaLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Echo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Echo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Echo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Echo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EchoLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EchoLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EchoLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EchoLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EnterpriseBeanDiscoveryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EnterpriseBeanDiscoveryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EnterpriseBeanDiscoveryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/EnterpriseBeanDiscoveryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Foxtrot.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Foxtrot.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Foxtrot.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Foxtrot.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/FoxtrotLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/FoxtrotLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/FoxtrotLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/FoxtrotLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/LegacyExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Ping.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Ping.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Ping.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/Ping.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/VerifyingExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/VerifyingExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/VerifyingExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/VerifyingExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/Apple.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/Apple.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/Apple.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/Apple.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTreeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTreeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTreeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/AppleTreeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/EnterpriseDefaultBeanDiscoveryModeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/EnterpriseDefaultBeanDiscoveryModeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/EnterpriseDefaultBeanDiscoveryModeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/EnterpriseDefaultBeanDiscoveryModeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/TestExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/TestExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/TestExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/enterprise/annotated/TestExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DefaultBeanDiscoveryModeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DefaultBeanDiscoveryModeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DefaultBeanDiscoveryModeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DefaultBeanDiscoveryModeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DummyBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DummyBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DummyBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/DummyBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/NotDiscoveredBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/NotDiscoveredBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/NotDiscoveredBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/NotDiscoveredBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/ProducedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/ProducedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/ProducedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/ProducedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/TestExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/TestExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/TestExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/discovery/implicit/TestExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInEarTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInEarTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInEarTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInEarTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInWarTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInWarTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInWarTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryInWarTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryMissingBeansXmlTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryMissingBeansXmlTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryMissingBeansXmlTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/LibraryMissingBeansXmlTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Unlucky.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Unlucky.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Unlucky.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/bundledLibrary/Unlucky.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarWebBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarWebBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarWebBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/BarWebBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooWebBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooWebBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooWebBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/FooWebBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/MultiWebModuleWithExtensionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/MultiWebModuleWithExtensionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/MultiWebModuleWithExtensionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/MultiWebModuleWithExtensionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/SingleWebModuleWithExtensionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/SingleWebModuleWithExtensionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/SingleWebModuleWithExtensionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/SingleWebModuleWithExtensionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/AlternativeBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/AlternativeBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/AlternativeBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/AlternativeBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BarInspector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BarInspector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BarInspector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BarInspector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Business.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Business.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Business.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Business.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEvent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEvent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEvent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEvent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEventInspector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEventInspector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEventInspector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationEventInspector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationObservedEvent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationObservedEvent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationObservedEvent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/BusinessOperationObservedEvent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/ContainerEventsObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/ContainerEventsObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/ContainerEventsObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/ContainerEventsObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/EnterpriseArchiveModulesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/EnterpriseArchiveModulesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/EnterpriseArchiveModulesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/EnterpriseArchiveModulesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyServiceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyServiceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyServiceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LegacyServiceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LoggingDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LoggingDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LoggingDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/LoggingDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/NonEnterprise.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/NonEnterprise.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/NonEnterprise.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/NonEnterprise.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Qux.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Qux.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Qux.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Qux.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Secured.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Secured.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Secured.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Secured.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/SecurityInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/SecurityInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/SecurityInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/SecurityInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Util.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Util.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Util.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ear/modules/Util.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/EJBJarDeploymentTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/EJBJarDeploymentTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/EJBJarDeploymentTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/EJBJarDeploymentTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/FooRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/ProcessBeanObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/ProcessBeanObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/ProcessBeanObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/ejb/ProcessBeanObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Alpha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Alpha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Alpha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Alpha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/AssertBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/AssertBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/AssertBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/AssertBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Bravo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Bravo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Bravo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Bravo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Charlie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Charlie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Charlie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/Charlie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryEarTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryEarTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryEarTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryEarTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryWarTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryWarTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryWarTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/installedLibrary/InstalledLibraryWarTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/ResourceAdapterArchiveTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/ResourceAdapterArchiveTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/ResourceAdapterArchiveTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/ResourceAdapterArchiveTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/TestResourceAdapter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/TestResourceAdapter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/TestResourceAdapter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/TestResourceAdapter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/Translator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/Translator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/Translator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/rar/Translator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/American.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/American.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/American.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/American.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/AnnotatedTypeObserverExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/AnnotatedTypeObserverExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/AnnotatedTypeObserverExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/AnnotatedTypeObserverExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Beer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Beer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Beer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Beer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/BeerCollector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/BeerCollector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/BeerCollector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/BeerCollector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/CraftBeer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/CraftBeer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/CraftBeer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/CraftBeer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarAlphaVisibilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarAlphaVisibilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarAlphaVisibilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarAlphaVisibilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarReverseAlphaVisibilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarReverseAlphaVisibilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarReverseAlphaVisibilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/JarToJarReverseAlphaVisibilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Soda.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Soda.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Soda.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/Soda.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInAlphaBeanArchiveTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfAnnotatedTypesFromExtensionInBravoBeanArchiveTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/visibility/VisibilityOfBeanInWebModuleFromBeanManagerInBeanLibraryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/BeansDescriptorAlternativeLocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/BeansDescriptorAlternativeLocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/BeansDescriptorAlternativeLocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/BeansDescriptorAlternativeLocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/AlternativeBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/AlternativeBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/AlternativeBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/AlternativeBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BarInspector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BarInspector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BarInspector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BarInspector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bazinga.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bazinga.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bazinga.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Bazinga.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Business.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Business.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Business.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Business.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BusinessOperationEvent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BusinessOperationEvent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BusinessOperationEvent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/BusinessOperationEvent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/ContainerEventsObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/ContainerEventsObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/ContainerEventsObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/ContainerEventsObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyServiceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyServiceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyServiceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LegacyServiceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LoggingDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LoggingDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LoggingDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/LoggingDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Qux.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Qux.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Qux.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Qux.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Secured.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Secured.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Secured.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/Secured.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/SecurityInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/SecurityInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/SecurityInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/SecurityInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/WebArchiveModulesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/WebArchiveModulesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/WebArchiveModulesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/packaging/war/modules/WebArchiveModulesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ApplicationShutdownLifecycleTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ApplicationShutdownLifecycleTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ApplicationShutdownLifecycleTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ApplicationShutdownLifecycleTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ContextDestructionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ContextDestructionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ContextDestructionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/ContextDestructionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoClient.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoClient.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoClient.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoClient.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InitServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InitServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InitServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/InitServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/LifecycleMonitoringExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/LifecycleMonitoringExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/LifecycleMonitoringExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/LifecycleMonitoringExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Qux.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Qux.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Qux.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/shutdown/Qux.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Bike.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Bike.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Bike.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Bike.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Car.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Car.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Car.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/Car.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/EnterpriseTrimmedBeanArchiveTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/EnterpriseTrimmedBeanArchiveTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/EnterpriseTrimmedBeanArchiveTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/EnterpriseTrimmedBeanArchiveTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/MotorizedVehicle.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/MotorizedVehicle.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/MotorizedVehicle.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/MotorizedVehicle.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/TestExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/TestExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/TestExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/TestExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/EJBObserverMethodNotBusinessMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/EJBObserverMethodNotBusinessMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/EJBObserverMethodNotBusinessMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/EJBObserverMethodNotBusinessMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/Terrier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/notBusinessMethod/TibetanTerrier_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBAsyncObserverMethodRemoteBusinessMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBAsyncObserverMethodRemoteBusinessMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBAsyncObserverMethodRemoteBusinessMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBAsyncObserverMethodRemoteBusinessMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBObserverMethodRemoteBusinessMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBObserverMethodRemoteBusinessMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBObserverMethodRemoteBusinessMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/EJBObserverMethodRemoteBusinessMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/FoxTerrrier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/FoxTerrrier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/FoxTerrrier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/FoxTerrrier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/Terrier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/Terrier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/Terrier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/Terrier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/TibetanTerrier.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/TibetanTerrier.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/TibetanTerrier.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/broken/observer/remoteBusinessMethod/TibetanTerrier.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/FooObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/FooObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/FooObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/FooObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/ObserverMethodInvocationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/ObserverMethodInvocationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/ObserverMethodInvocationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/ObserverMethodInvocationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Printer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Printer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Printer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Printer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Toner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Toner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Toner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/Toner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncMessageObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncMessageObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncMessageObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncMessageObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncObserverMethodInvocationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncObserverMethodInvocationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncObserverMethodInvocationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/AsyncObserverMethodInvocationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Counter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Counter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Counter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Counter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Message.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Message.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Message.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/Message.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/EnterpriseSecurityContextPropagationInAsyncObserverTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/EnterpriseSecurityContextPropagationInAsyncObserverTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/EnterpriseSecurityContextPropagationInAsyncObserverTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/EnterpriseSecurityContextPropagationInAsyncObserverTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Printer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Printer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Printer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Printer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Teacher.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Teacher.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Teacher.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Teacher.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Text.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Text.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Text.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/async/enterprise/Text.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/FooObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/FooObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/FooObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/FooObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/ObserverLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/ObserverLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/ObserverLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/ObserverLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Printer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Printer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Printer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Printer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/SessionBeanObserverMethodInvocationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/SessionBeanObserverMethodInvocationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/SessionBeanObserverMethodInvocationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/SessionBeanObserverMethodInvocationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Toner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Toner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Toner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/Toner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/FooObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/FooObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/FooObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/FooObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Printer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Printer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Printer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Printer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/SessionBeanStaticObserverMethodInvocationContextTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/SessionBeanStaticObserverMethodInvocationContextTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/SessionBeanStaticObserverMethodInvocationContextTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/SessionBeanStaticObserverMethodInvocationContextTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Student.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Student.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Student.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Student.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Toner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Toner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Toner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/context/enterprise/staticMethod/Toner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Egg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Egg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Egg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Egg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EnterpriseObserverInheritanceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EnterpriseObserverInheritanceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EnterpriseObserverInheritanceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EnterpriseObserverInheritanceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EventPayload.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EventPayload.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EventPayload.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/EventPayload.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Farmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Farmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Farmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/Farmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/FarmerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/FarmerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/FarmerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/FarmerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcher.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcher.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcher.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcher.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcherLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcherLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcherLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IndirectStockWatcherLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IntermediateStockWatcher.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IntermediateStockWatcher.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IntermediateStockWatcher.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/IntermediateStockWatcher.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/LazyFarmerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockPrice.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockPrice.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockPrice.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockPrice.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcher.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcher.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcher.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcher.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcherLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcherLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcherLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/inheritance/enterprise/StockWatcherLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/InfoServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/InfoServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/InfoServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/InfoServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleEventObserverOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleEventObserverOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleEventObserverOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleEventObserverOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/contextLifecycleEvent/ee/RequestContextLifecycleObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/AbstractObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/AbstractObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/AbstractObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/AbstractObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/OnlineAccountService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/OnlineAccountService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/OnlineAccountService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/OnlineAccountService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/PhisherAccountTransactionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/PhisherAccountTransactionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/PhisherAccountTransactionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/PhisherAccountTransactionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/ReceiverAccountTransactionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/ReceiverAccountTransactionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/ReceiverAccountTransactionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/ReceiverAccountTransactionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/SenderAccountTransactionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/SenderAccountTransactionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/SenderAccountTransactionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/SenderAccountTransactionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TransactionalPriorityObserverTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TransactionalPriorityObserverTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TransactionalPriorityObserverTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TransactionalPriorityObserverTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxFailure.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxFailure.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxFailure.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxFailure.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxWithdrawal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxWithdrawal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxWithdrawal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/priority/transactional/TxWithdrawal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/EJBEvent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/EJBEvent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/EJBEvent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/EJBEvent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/LocalInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/LocalInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/LocalInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/LocalInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/NoInterfaceSLSB.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/NoInterfaceSLSB.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/NoInterfaceSLSB.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/NoInterfaceSLSB.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/ResolveEnterpriseEventObserverTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/resolve/enterprise/Spitz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountTransactionObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountTransactionObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountTransactionObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/AccountTransactionObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Failure.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Failure.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Failure.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Failure.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/TransactionalObserverTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/TransactionalObserverTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/TransactionalObserverTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/TransactionalObserverTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Withdrawal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Withdrawal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Withdrawal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/Withdrawal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/CustomTransactionalObserverTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/CustomTransactionalObserverTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/CustomTransactionalObserverTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/CustomTransactionalObserverTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/Giraffe.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/Giraffe.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/Giraffe.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/Giraffe.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeCustomObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeCustomObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeCustomObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeCustomObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeService.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeService.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeService.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/GiraffeService.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/ObserverExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/ObserverExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/ObserverExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/custom/ObserverExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/EjbTestBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/EjbTestBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/EjbTestBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/EjbTestBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/FooTransactionalObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/FooTransactionalObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/FooTransactionalObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/FooTransactionalObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/TransactionalObserverRollbackTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/TransactionalObserverRollbackTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/TransactionalObserverRollbackTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/event/observer/transactional/roolback/TransactionalObserverRollbackTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/AlternativeMetadataTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/AlternativeMetadataTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/AlternativeMetadataTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/AlternativeMetadataTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/Pasta.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/Pasta.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/Pasta.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/Pasta.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/PastaWrapper.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/PastaWrapper.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/PastaWrapper.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/PastaWrapper.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/ProcessAnnotatedTypeObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/ProcessAnnotatedTypeObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/ProcessAnnotatedTypeObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/alternative/metadata/ejb/ProcessAnnotatedTypeObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/EnterpriseWithAnnotationsTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/EnterpriseWithAnnotationsTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/EnterpriseWithAnnotationsTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/EnterpriseWithAnnotationsTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/Hawk.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/Hawk.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/Hawk.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/annotated/delivery/ejb/Hawk.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/CreateBeanAttributesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/CreateBeanAttributesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/CreateBeanAttributesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/CreateBeanAttributesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Dam.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Dam.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Dam.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Dam.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Lake.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Lake.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Lake.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/Lake.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/LakeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/LakeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/LakeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/beanManager/beanAttributes/ejb/LakeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cheese.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cheese.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cheese.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cheese.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ContainerEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ContainerEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ContainerEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ContainerEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Cow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/CowLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/CowLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/CowLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/CowLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Farm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Farm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Farm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Farm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Food.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Food.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Food.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Food.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Milk.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Milk.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Milk.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Milk.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessAnnotatedTypeObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessBeanObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessBeanObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessBeanObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessBeanObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/ProcessInjectionTargetObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/SheepLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Tame.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Tame.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Tame.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/Tame.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ContainerEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ContainerEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ContainerEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ContainerEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ProcessInjectionTargetObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ProcessInjectionTargetObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ProcessInjectionTargetObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/ProcessInjectionTargetObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/QueueMessageDrivenBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/QueueMessageDrivenBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/QueueMessageDrivenBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/QueueMessageDrivenBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/container/event/jms/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/FullMarathon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/FullMarathon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/FullMarathon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/FullMarathon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Incremented.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Incremented.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Incremented.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Incremented.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/IncrementingInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/IncrementingInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/IncrementingInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/IncrementingInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtensionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtensionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtensionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/InterceptorExtensionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/LifecycleInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/LifecycleInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/LifecycleInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/LifecycleInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Marathon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Marathon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Marathon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Marathon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/NumberSource.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/NumberSource.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/NumberSource.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/NumberSource.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Suffixed.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Suffixed.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Suffixed.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/Suffixed.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/SuffixingInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/SuffixingInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/SuffixingInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/SuffixingInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/WordSource.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/WordSource.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/WordSource.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/interceptors/WordSource.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ContainerLifeCycleEventRuntimeInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ContainerLifeCycleEventRuntimeInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ContainerLifeCycleEventRuntimeInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ContainerLifeCycleEventRuntimeInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleAnnotation.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleAnnotation.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleAnnotation.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleAnnotation.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/SimpleBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/TestExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/TestExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/TestExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/TestExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/ContainerLifeCycleEventRuntimeInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/ContainerLifeCycleEventRuntimeInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/ContainerLifeCycleEventRuntimeInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/ContainerLifeCycleEventRuntimeInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleAnnotation.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleAnnotation.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleAnnotation.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleAnnotation.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/SimpleBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/TestExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/TestExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/TestExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/events/ejb/TestExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesNotFiredForBuiltinBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesNotFiredForBuiltinBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesNotFiredForBuiltinBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesNotFiredForBuiltinBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/builtin/ProcessBeanAttributesObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/Delta.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/Delta.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/Delta.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/Delta.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyValuesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyValuesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyValuesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyValuesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyingExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyingExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyingExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processBeanAttributes/ejb/VerifyingExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/ProcessInjectionPointFiredTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/ProcessInjectionPointFiredTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/ProcessInjectionPointFiredTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/ProcessInjectionPointFiredTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/VerifyingExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/VerifyingExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/VerifyingExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/VerifyingExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ContainerEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ContainerEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ContainerEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ContainerEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/CustomInjectionTarget.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/CustomInjectionTarget.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/CustomInjectionTarget.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/CustomInjectionTarget.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Farm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Farm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Farm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Farm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Fence.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Fence.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Fence.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Fence.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/FenceInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/FenceInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/FenceInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/FenceInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ProcessInjectionTargetObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ProcessInjectionTargetObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ProcessInjectionTargetObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/ProcessInjectionTargetObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TagLibraryListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TagLibraryListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TagLibraryListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TagLibraryListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestTagHandler.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestTagHandler.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestTagHandler.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestTagHandler.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/Elephant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/Elephant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/Elephant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/Elephant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ElephantLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ElephantLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ElephantLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ElephantLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/processBean/ejb/ProcessSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ProducerProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ProducerProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ProducerProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ProducerProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/RemoteProducerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/RemoteProducerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/RemoteProducerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/RemoteProducerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/producer/remote/ServiceRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherBeanClassToRegister.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherBeanClassToRegister.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherBeanClassToRegister.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherBeanClassToRegister.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherManualBeanRegistrationExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherManualBeanRegistrationExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherManualBeanRegistrationExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/AnotherManualBeanRegistrationExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanClassToRegister.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanClassToRegister.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanClassToRegister.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanClassToRegister.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInEarLibraryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInEarLibraryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInEarLibraryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInEarLibraryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInNonBeanArchiveTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInNonBeanArchiveTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInNonBeanArchiveTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInNonBeanArchiveTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInWarLibraryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInWarLibraryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInWarLibraryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanRegistrationByExtensionInWarLibraryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/Beanie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/Beanie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/Beanie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/Beanie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieType.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieType.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieType.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieType.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieTypeLiteral.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieTypeLiteral.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieTypeLiteral.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/BeanieTypeLiteral.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/DummyObserverExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/DummyObserverExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/DummyObserverExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/DummyObserverExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/EarExtensionsCheck.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/EarExtensionsCheck.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/EarExtensionsCheck.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/EarExtensionsCheck.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/ManualBeanRegistrationExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/ManualBeanRegistrationExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/ManualBeanRegistrationExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/ManualBeanRegistrationExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/TwoBeansOneClassTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/VisibilityOfBeanRegisteredByExtensionFromNonBeanLibraryTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/WarDummyObserverExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/WarDummyObserverExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/WarDummyObserverExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/extensions/registration/WarDummyObserverExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/BuiltInBeansTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/BuiltInBeansTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/BuiltInBeansTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/BuiltInBeansTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/MockLoginModule.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/MockLoginModule.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/MockLoginModule.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/MockLoginModule.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBeanLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBeanLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBeanLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/PrincipalInjectedBeanLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBeanLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBeanLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBeanLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/UserTransactionInjectedBeanLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/ContainerManagedTransactionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/ContainerManagedTransactionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/ContainerManagedTransactionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/ContainerManagedTransactionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/UserTransactionInvalidInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/UserTransactionInvalidInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/UserTransactionInvalidInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/broken/transaction/UserTransactionInvalidInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/BuiltinMetadataEEBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/BuiltinMetadataEEBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/BuiltinMetadataEEBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/BuiltinMetadataEEBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/Counter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/Counter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/Counter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/Counter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/InterceptorBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/InterceptorBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/InterceptorBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/InterceptorBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/ServletInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/ServletInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/ServletInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/ServletInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/ee/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProduct.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProduct.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProduct.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProduct.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProductDecorator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProductDecorator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProductDecorator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BakeryProductDecorator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Bread.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Bread.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Bread.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Bread.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BuiltinMetadataSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BuiltinMetadataSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BuiltinMetadataSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/BuiltinMetadataSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Frozen.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Frozen.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Frozen.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Frozen.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Yoghurt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Yoghurt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Yoghurt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/Yoghurt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/YoghurtInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/YoghurtInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/YoghurtInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/metadata/session/YoghurtInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverterServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverterServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverterServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/LowercaseConverterServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/ServletContainerBuiltinBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/ServletContainerBuiltinBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/ServletContainerBuiltinBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/builtin/servlet/ServletContainerBuiltinBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/Apple.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/Apple.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/Apple.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/Apple.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTreeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTreeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTreeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/AppleTreeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/DisposalMethodOnSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/DisposalMethodOnSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/DisposalMethodOnSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/methodOnSessionBean/DisposalMethodOnSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposalRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposalRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposalRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/FooDisposalRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/RemoteBusinessDisposalMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/RemoteBusinessDisposalMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/RemoteBusinessDisposalMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/enterprise/remoteMethod/RemoteBusinessDisposalMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/BrokenFoodProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/BrokenFoodProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/BrokenFoodProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/BrokenFoodProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/DisposerMethodWithAsyncObservesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/DisposerMethodWithAsyncObservesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/DisposerMethodWithAsyncObservesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/DisposerMethodWithAsyncObservesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/Food.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/Food.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/Food.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/broken/observes/async/Food.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Chicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Chicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Chicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Chicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Code.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Code.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Code.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Code.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/CzechChicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/CzechChicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/CzechChicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/CzechChicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/DisposerMethodInheritanceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/DisposerMethodInheritanceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/DisposerMethodInheritanceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/DisposerMethodInheritanceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Egg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Egg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Egg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Egg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Guru.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Guru.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Guru.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Guru.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Programmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Programmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Programmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Programmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Sumavanka.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Sumavanka.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Sumavanka.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/disposal/method/definition/inheritance/ejb/Sumavanka.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/DingoLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/DingoLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/DingoLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/DingoLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/Dingo_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/Dingo_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/Dingo_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/Dingo_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/GenericStatelessSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/GenericStatelessSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/GenericStatelessSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/genericStateless/GenericStatelessSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/Husky_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithConversationScope/SingletonWithConversationScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/Greyhound_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/SingletonWithRequestScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/SingletonWithRequestScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/SingletonWithRequestScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithRequestScope/SingletonWithRequestScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/IrishTerrier_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/singletonWithSessionScope/SingletonWithSessionScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/BulldogLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/BulldogLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/BulldogLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/BulldogLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Bulldog_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Bulldog_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Bulldog_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Bulldog_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Colie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Colie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Colie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Colie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/DecoratorAnnotatedStatelessSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/DecoratorAnnotatedStatelessSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/DecoratorAnnotatedStatelessSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/DecoratorAnnotatedStatelessSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessDecorator/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/DalmatianLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/DalmatianLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/DalmatianLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/DalmatianLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/Dalmatian_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/Dalmatian_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/Dalmatian_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/Dalmatian_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/InterceptorAnnotatedStatelessSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/InterceptorAnnotatedStatelessSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/InterceptorAnnotatedStatelessSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessInterceptor/InterceptorAnnotatedStatelessSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/DachshundLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/DachshundLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/DachshundLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/DachshundLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/Dachshund_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/StatelessWithApplicationScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/StatelessWithApplicationScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/StatelessWithApplicationScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithApplicationScope/StatelessWithApplicationScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/BoxerLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/BoxerLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/BoxerLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/BoxerLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/Boxer_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/StatelessWithConversationScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/StatelessWithConversationScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/StatelessWithConversationScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithConversationScope/StatelessWithConversationScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/BeagleLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/BeagleLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/BeagleLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/BeagleLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/Beagle_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/StatelessWithRequestScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/StatelessWithRequestScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/StatelessWithRequestScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithRequestScope/StatelessWithRequestScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/BullmastiffLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/BullmastiffLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/BullmastiffLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/BullmastiffLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/Bullmastiff_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/StatelessWithSessionScopeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/StatelessWithSessionScopeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/StatelessWithSessionScopeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/broken/statelessWithSessionScope/StatelessWithSessionScopeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Ape.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Ape.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Ape.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Ape.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ApeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ApeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ApeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ApeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/DogLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/DogLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/DogLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/DogLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Elephant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Elephant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Elephant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Elephant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ElephantLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ElephantLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ElephantLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ElephantLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/EnterpriseBeanViaXmlTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ExplicitConstructorSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Giraffe.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Giraffe.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Giraffe.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Giraffe.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/GiraffeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/GiraffeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/GiraffeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/GiraffeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Labrador.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Labrador.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Labrador.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Labrador.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Laika.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Laika.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Laika.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Laika.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Lion.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Lion.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Lion.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Lion.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/LionLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/LionLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/LionLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/LionLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Monkey.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Monkey.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Monkey.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Monkey.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/MonkeyLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/MonkeyLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/MonkeyLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/MonkeyLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/NoParamConstructorSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/NoParamConstructorSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/NoParamConstructorSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/NoParamConstructorSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Pitbull.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Pitbull.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Pitbull.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Pitbull.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PitbullLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PitbullLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PitbullLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PitbullLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Polar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Polar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Polar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Polar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBear.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBear.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBear.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBear.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBearLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBearLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBearLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/PolarBearLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Retriever.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Retriever.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Retriever.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Retriever.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/SimpleBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/SimpleBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/SimpleBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/SimpleBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Tame.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Tame.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Tame.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/Tame.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Collie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Collie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Collie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Collie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DogRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DoggieRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DoggieRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DoggieRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/DoggieRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Pitbull.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Pitbull.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Pitbull.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Pitbull.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/RemoteInterfaceNotInAPITypesTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/RemoteInterfaceNotInAPITypesTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/RemoteInterfaceNotInAPITypesTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/RemoteInterfaceNotInAPITypesTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/SuperBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/SuperBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/SuperBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/SuperBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Tame.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Tame.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Tame.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/definition/remote/Tame.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/AlteStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/AlteStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/AlteStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/AlteStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/DirectOrderProcessorLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/FrankfurtAmMain.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/FrankfurtAmMain.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/FrankfurtAmMain.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/FrankfurtAmMain.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GeschichtslosStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GeschichtslosStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GeschichtslosStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GeschichtslosStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Giessen.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Giessen.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Giessen.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Giessen.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GrossStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GrossStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GrossStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GrossStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GutenbergMuseum.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GutenbergMuseum.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GutenbergMuseum.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/GutenbergMuseum.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Heidelburg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Heidelburg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Heidelburg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Heidelburg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Important.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Important.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Important.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Important.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IndirectOrderProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IndirectOrderProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IndirectOrderProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IndirectOrderProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/IntermediateOrderProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Kassel.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Kassel.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Kassel.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Kassel.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/KleinStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/KleinStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/KleinStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/KleinStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/LandgraffenSchloss.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/LandgraffenSchloss.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/LandgraffenSchloss.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/LandgraffenSchloss.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Mainz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Mainz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Mainz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Mainz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Marburg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Marburg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Marburg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Marburg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/NeueStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/NeueStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/NeueStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/NeueStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessorLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessorLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessorLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/OrderProcessorLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/RoemerPassage.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/RoemerPassage.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/RoemerPassage.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/RoemerPassage.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Schloss.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Schloss.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Schloss.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/Schloss.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/SchoeneStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/SchoeneStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/SchoeneStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/SchoeneStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/UniStadt.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/UniStadt.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/UniStadt.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/lifecycle/UniStadt.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/DependentSessionInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/EnterpriseBeanRemoveMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/SessionScopedSessionInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/StateKeeper.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/StateKeeper.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/StateKeeper.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/enterprise/remove/StateKeeper.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/AndalusianChicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/AndalusianChicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/AndalusianChicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/AndalusianChicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/EjbInitializerMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/EjbInitializerMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/EjbInitializerMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/EjbInitializerMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/LocalChicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/LocalChicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/LocalChicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/initializer/ejb/LocalChicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/FooLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/FooLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/FooLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/FooLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Foo_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Foo_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Foo_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Foo_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/NonStaticFieldOfSessionBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/NonStaticFieldOfSessionBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/NonStaticFieldOfSessionBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/NonStaticFieldOfSessionBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Number.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Number.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Number.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/broken/enterprise/nonstatic/Number.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Chicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/ChickenLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Egg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Egg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Egg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Egg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/EnterpriseProducerFieldDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/field/definition/enterprise/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/FooProducerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/nonbusiness/ProducerMethodNotBusinessMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducerRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducerRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducerRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/FooProducerRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/RemoteBusinessProducerMethodTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/RemoteBusinessProducerMethodTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/RemoteBusinessProducerMethodTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/broken/enterprise/remoteMethod/RemoteBusinessProducerMethodTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChickenLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChickenLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChickenLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AndalusianChickenLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Apple.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Apple.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Apple.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Apple.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTreeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTreeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTreeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/AppleTreeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Chicken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Chicken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Chicken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Chicken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/ChickenLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/ChickenLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/ChickenLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/ChickenLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Egg.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Egg.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Egg.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Egg.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/EnterpriseProducerMethodDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/GrannySmithAppleTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/GrannySmithAppleTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/GrannySmithAppleTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/GrannySmithAppleTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/LightYellowPearTreeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Pear.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Pear.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Pear.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Pear.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/PearTreeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/YellowPearTree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Yummy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Yummy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Yummy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/producer/method/definition/enterprise/Yummy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanNotDiscoveredAsManagedBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanNotDiscoveredAsManagedBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanNotDiscoveredAsManagedBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanNotDiscoveredAsManagedBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/EnterpriseBeanObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockEnterpriseBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockEnterpriseBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockEnterpriseBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockEnterpriseBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletContextListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletContextListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletContextListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletContextListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletRequestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletRequestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletRequestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockServletRequestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockUIComponent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockUIComponent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockUIComponent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/definition/ee/MockUIComponent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/IntrospectServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/IntrospectServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/IntrospectServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/IntrospectServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/JavaEEComponentsTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/JavaEEComponentsTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/JavaEEComponentsTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/JavaEEComponentsTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Ping.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Ping.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Ping.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Ping.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Tame.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Tame.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Tame.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Tame.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Wild.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Wild.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Wild.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/ee/components/Wild.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/Another.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/Another.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/Another.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/Another.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceDefinitionWithNameTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceDefinitionWithNameTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceDefinitionWithNameTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceDefinitionWithNameTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/name/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/Another.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/Another.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/Another.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/Another.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceDefinitionWithDifferentTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceDefinitionWithDifferentTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceDefinitionWithDifferentTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceDefinitionWithDifferentTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Bean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Bean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Bean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Bean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/BeanRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/BeanRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/BeanRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/BeanRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Lazy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Lazy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Lazy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/Lazy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceDefinitionWithDifferentTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceDefinitionWithDifferentTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceDefinitionWithDifferentTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceDefinitionWithDifferentTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/ejb/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/Greeting.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/Greeting.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/Greeting.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/Greeting.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceDefinitionWithDifferentTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceDefinitionWithDifferentTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceDefinitionWithDifferentTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceDefinitionWithDifferentTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/env/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/Database.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/Database.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/Database.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/Database.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceDefinitionWithDifferentTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceDefinitionWithDifferentTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceDefinitionWithDifferentTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceDefinitionWithDifferentTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/context/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/Database.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/Database.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/Database.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/Database.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceDefinitionWithDifferentTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceDefinitionWithDifferentTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceDefinitionWithDifferentTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceDefinitionWithDifferentTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/broken/type/persistence/unit/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/AnotherInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Bean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Bean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Bean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Bean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/BeanRemote.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/BeanRemote.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/BeanRemote.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/BeanRemote.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/EjbInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Lazy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Lazy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Lazy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Lazy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Monitor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Monitor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Monitor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/Monitor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Bean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Bean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Bean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Bean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/EjbInjectionStaticProducerFieldTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/EjbInjectionStaticProducerFieldTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/EjbInjectionStaticProducerFieldTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/EjbInjectionStaticProducerFieldTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Lazy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Lazy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Lazy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/Lazy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/ejb/staticProducer/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/BooleanResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/BooleanResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/BooleanResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/BooleanResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/EnvInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/Greeting.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/Greeting.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/Greeting.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/Greeting.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/GreetingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/GreetingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/GreetingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/GreetingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/EnvInjectionStaticProducerFieldTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/EnvInjectionStaticProducerFieldTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/EnvInjectionStaticProducerFieldTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/EnvInjectionStaticProducerFieldTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/Greeting.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/Greeting.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/Greeting.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/Greeting.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/GreetingBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/GreetingBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/GreetingBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/GreetingBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/env/staticProducer/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/Database.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/Database.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/Database.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/Database.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/PersistenceContextInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBeanImpl.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBeanImpl.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBeanImpl.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/ServiceBeanImpl.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/Database.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/Database.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/Database.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/Database.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/PersistenceInjectionStaticProducerFieldTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/PersistenceInjectionStaticProducerFieldTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/PersistenceInjectionStaticProducerFieldTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/PersistenceInjectionStaticProducerFieldTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBeanImpl.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBeanImpl.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBeanImpl.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/staticProducer/ServiceBeanImpl.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/Another.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/Another.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/Another.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/Another.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/InjectionOfResourceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/Another.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/Another.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/Another.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/Another.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/InjectionOfResourceStaticProducerFieldTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/InjectionOfResourceStaticProducerFieldTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/InjectionOfResourceStaticProducerFieldTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/InjectionOfResourceStaticProducerFieldTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ManagedBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ManagedBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ManagedBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ManagedBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ResourceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ResourceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ResourceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/staticProducer/ResourceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/AppleEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/AppleEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/AppleEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/AppleEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Cheap.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Cheap.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Cheap.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Cheap.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Citrus.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Citrus.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Citrus.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Citrus.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/CitrusEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/CitrusEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/CitrusEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/CitrusEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Expensive.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Expensive.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Expensive.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Expensive.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FirstLevel.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FirstLevel.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FirstLevel.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FirstLevel.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Fruit.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Fruit.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Fruit.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Fruit.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FruitEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FruitEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FruitEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/FruitEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/InitializerMethodInheritanceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/InitializerMethodInheritanceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/InitializerMethodInheritanceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/InitializerMethodInheritanceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Lemon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Lemon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Lemon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Lemon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Orange.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Orange.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Orange.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/Orange.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/OrangeEjb.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/OrangeEjb.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/OrangeEjb.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/OrangeEjb.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/PriceProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/PriceProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/PriceProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/PriceProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/SecondLevel.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/SecondLevel.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/SecondLevel.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/initializer/SecondLevel.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Building.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Building.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Building.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Building.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/BuildingLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/BuildingLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/BuildingLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/BuildingLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/EnterpriseBeanSpecializationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmEquipment.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmEquipment.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmEquipment.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmEquipment.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Farmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Farmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Farmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Farmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/FarmerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Landowner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Landowner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Landowner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Landowner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Lazy.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Lazy.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Lazy.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Lazy.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmerLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmerLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmerLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/LazyFarmerLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Office.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Office.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Office.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Office.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/OfficeLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/OfficeLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/OfficeLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/OfficeLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/TractorLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/TractorLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/TractorLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/TractorLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Waste.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Waste.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Waste.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Waste.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Yard.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Yard.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Yard.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/Yard.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/YardInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/YardInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/YardInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/YardInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/DirectlyExtendsSimpleBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/DirectlyExtendsSimpleBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/DirectlyExtendsSimpleBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/DirectlyExtendsSimpleBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/FarmEquipment.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/FarmEquipment.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/FarmEquipment.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/FarmEquipment.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/TractorLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/TractorLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/TractorLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/TractorLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/Tractor_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/Tractor_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/Tractor_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/managedbean/Tractor_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/CowLocal_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/CowLocal_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/CowLocal_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/CowLocal_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/Cow_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/Cow_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/Cow_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/Cow_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/DirectlyExtendsNothingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/DirectlyExtendsNothingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/DirectlyExtendsNothingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/nothing/DirectlyExtendsNothingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginAction.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginAction.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginAction.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginAction.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginActionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginActionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginActionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/LoginActionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/Mock.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/Mock.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/Mock.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/Mock.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/MockLoginActionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/MockLoginActionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/MockLoginActionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/MockLoginActionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/SessionBeanSpecializingSessionBeanWithClientViewTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/SessionBeanSpecializingSessionBeanWithClientViewTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/SessionBeanSpecializingSessionBeanWithClientViewTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/extend/sessionbean/SessionBeanSpecializingSessionBeanWithClientViewTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/FarmYard_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/FarmYard_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/FarmYard_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/FarmYard_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/SameNameTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/SameNameTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/SameNameTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/SameNameTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/Yard.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/Yard.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/Yard.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/Yard.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/YardInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/YardInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/YardInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/name/YardInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Farmer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Farmer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Farmer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Farmer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FarmerInterface.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FarmerInterface.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FarmerInterface.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FarmerInterface.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FishFarmer_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FishFarmer_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FishFarmer_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/FishFarmer_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Landowner.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Landowner.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Landowner.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/Landowner.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/SheepFarmer_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/SheepFarmer_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/SheepFarmer_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/SheepFarmer_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/TwoBeansSpecializeTheSameBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/TwoBeansSpecializeTheSameBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/TwoBeansSpecializeTheSameBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/enterprise/broken/twobeans/TwoBeansSpecializeTheSameBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/EnterpriseProducerMethodSpecializationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/EnterpriseProducerMethodSpecializationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/EnterpriseProducerMethodSpecializationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/EnterpriseProducerMethodSpecializationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Expensive.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Expensive.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Expensive.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Expensive.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/JewelryShop.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/JewelryShop.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/JewelryShop.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/JewelryShop.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Necklace.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Necklace.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Necklace.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Necklace.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Product.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Product.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Product.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Product.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Shop.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Shop.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Shop.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Shop.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Sparkly.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Sparkly.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Sparkly.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/producer/method/enterprise/Sparkly.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipment.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/FarmEquipmentLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/SpecializingBeanExtendsEnterpriseBeanTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/extendejb/Tractor_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalClassMethodLevelInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalClassMethodLevelInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalClassMethodLevelInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalClassMethodLevelInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissileLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissileLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissileLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodClassLevelMissileLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelInterceptorTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelInterceptorTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelInterceptorTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelInterceptorTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissileLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissileLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissileLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FinalMethodMethodLevelMissileLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FooBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FooBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FooBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/FooBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/broken/finalClassInterceptor/ee/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Airborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Airborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Airborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Airborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/MissileLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/RadarInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/RadarInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/RadarInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/RadarInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/SessionBeanInterceptorOrderTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/SessionBeanInterceptorOrderTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/SessionBeanInterceptorOrderTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/SessionBeanInterceptorOrderTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenBeanInterceptorInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenBeanInterceptorInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenBeanInterceptorInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenBeanInterceptorInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenMissile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenMissile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenMissile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MessageDrivenMissile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/SimpleMessageProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/SimpleMessageProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/SimpleMessageProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/jms/SimpleMessageProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Airborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Airborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Airborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Airborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Anchor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Anchor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Anchor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Anchor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/AnchorInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/AnchorInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/AnchorInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/AnchorInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Cruiser.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Cruiser.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Cruiser.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Cruiser.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/MissileLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/SessionBeanInterceptorOnNonContextualEjbReferenceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/SessionBeanInterceptorOnNonContextualEjbReferenceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/SessionBeanInterceptorOnNonContextualEjbReferenceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/SessionBeanInterceptorOnNonContextualEjbReferenceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Ship.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Ship.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Ship.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Ship.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Waterborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Waterborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Waterborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/Waterborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Airborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Airborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Airborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Airborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/MissileLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Rocket.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Rocket.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Rocket.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/Rocket.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/SessionBeanInterceptorDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/SessionBeanInterceptorDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/SessionBeanInterceptorDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/simpleInterception/SessionBeanInterceptorDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Cactus.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Cactus.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Cactus.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Cactus.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Culinary.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Culinary.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Culinary.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Culinary.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/European.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/European.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/European.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/European.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Flower.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Flower.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Flower.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Flower.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/ForgetMeNot.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/ForgetMeNot.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/ForgetMeNot.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/ForgetMeNot.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Grass.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Grass.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Grass.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Grass.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedBySquirrel.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedBySquirrel.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedBySquirrel.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedBySquirrel.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedByWoodpecker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedByWoodpecker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedByWoodpecker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/GuardedByWoodpecker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/InterceptorBindingInheritanceTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/InterceptorBindingInheritanceTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/InterceptorBindingInheritanceTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/InterceptorBindingInheritanceTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Opuncia.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Opuncia.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Opuncia.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Opuncia.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Ping.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Ping.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Ping.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Ping.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Plant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Plant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Plant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Plant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/PongPlant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/PongPlant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/PongPlant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/PongPlant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Shrub.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Shrub.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Shrub.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Shrub.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/SquirrelInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/SquirrelInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/SquirrelInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/SquirrelInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Tree.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Tree.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Tree.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/Tree.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WaterChestnut.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WaterChestnut.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WaterChestnut.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WaterChestnut.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodForgetMeNot.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodForgetMeNot.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodForgetMeNot.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodForgetMeNot.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodpeckerInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodpeckerInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodpeckerInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/inheritance_ee/WoodpeckerInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Airborne.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Airborne.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Airborne.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Airborne.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/AnotherInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/AnotherInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/AnotherInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/AnotherInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/EnterpriseLifecycleInterceptorDefinitionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/EnterpriseLifecycleInterceptorDefinitionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/EnterpriseLifecycleInterceptorDefinitionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/EnterpriseLifecycleInterceptorDefinitionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Missile.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Missile.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Missile.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Missile.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/MissileInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/MissileInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/MissileInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/MissileInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Weapon.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Weapon.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Weapon.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/definition/lifecycle/enterprise/order/Weapon.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/InterceptorInvocationTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/InterceptorInvocationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/InterceptorInvocationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/InterceptorInvocationTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/Timing.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/Timing.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/Timing.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ejb/Timing.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/AbstractInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/AbstractInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/AbstractInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/AbstractInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Dao.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Dao.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Dao.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Dao.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/DummyDao.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/DummyDao.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/DummyDao.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/DummyDao.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/EnterpriseInterceptorOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/EnterpriseInterceptorOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/EnterpriseInterceptorOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/EnterpriseInterceptorOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GlobalInterceptorOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GlobalInterceptorOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GlobalInterceptorOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GlobalInterceptorOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor3.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor3.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor3.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor3.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor4.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor4.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor4.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor4.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor5.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor5.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor5.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/GloballyEnabledInterceptor5.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor3.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor3.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor3.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/LegacyInterceptor3.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Service.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Service.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Service.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Service.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Transactional.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Transactional.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Transactional.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/Transactional.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/WebApplicationGlobalInterceptor1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/WebApplicationGlobalInterceptor1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/WebApplicationGlobalInterceptor1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/interceptors/ordering/global/WebApplicationGlobalInterceptor1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Car.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Car.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Car.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Car.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/ClientProxyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Garage.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Garage.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Garage.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/Garage.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/ClientProxyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/ClientProxyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/ClientProxyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/ClientProxyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Fox.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Fox.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Fox.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Fox.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Tuna.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Tuna.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Tuna.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/Tuna.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/TunedTuna.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/TunedTuna.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/TunedTuna.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/clientProxy/integration/TunedTuna.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/MultiModuleSessionBeanAmbiguousDependencyTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/MultiModuleSessionBeanAmbiguousDependencyTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/MultiModuleSessionBeanAmbiguousDependencyTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/dependency/resolution/broken/ambiguous/ear/MultiModuleSessionBeanAmbiguousDependencyTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/IntegrationWithUnifiedELTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/el/integration/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/InjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/InjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/InjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/InjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/MegaPoorHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/MegaPoorHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/MegaPoorHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/MegaPoorHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/PoorHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/PoorHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/PoorHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/PoorHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/DeluxeHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/DeluxeHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/DeluxeHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/DeluxeHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/HenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/HenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/HenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/HenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/SessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/SessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/SessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/ejb/SessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouseLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouseLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouseLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/DeluxeHenHouseLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Farm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Farm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Farm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Farm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/FarmLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Fox.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Fox.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Fox.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Fox.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/HenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/HenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/HenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/HenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/InjectedSessionBeanLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouseLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouseLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouseLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/MegaPoorHenHouseLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/PoorHenHouse.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/PoorHenHouse.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/PoorHenHouse.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/PoorHenHouse.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionOrderingTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionOrderingTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionOrderingTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionOrderingTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SessionBeanInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SuperInjectedSessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SuperInjectedSessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SuperInjectedSessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/SuperInjectedSessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Qux.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Qux.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Qux.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/Qux.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/SessionBeanInjectionChainTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/SessionBeanInjectionChainTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/SessionBeanInjectionChainTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/enterprise/chain/SessionBeanInjectionChainTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ContainerEventTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/CreationalContextForNonContextualTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/CreationalContextForNonContextualTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/CreationalContextForNonContextualTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/CreationalContextForNonContextualTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Farm.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Farm.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Farm.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Farm.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/InjectionIntoNonContextualComponentTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ProcessAnnotatedTypeObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/SessionBean.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/SessionBean.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/SessionBean.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/SessionBean.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Sheep.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Sheep.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Sheep.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Sheep.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagLibraryListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestFilter.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestFilter.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestFilter.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestFilter.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestListener.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestListener.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestListener.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestListener.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestTagHandler.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestTagHandler.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestTagHandler.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestTagHandler.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/AmbiguousInjectionIntoNonContextualComponentTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/AmbiguousInjectionIntoNonContextualComponentTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/AmbiguousInjectionIntoNonContextualComponentTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/AmbiguousInjectionIntoNonContextualComponentTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Cow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Cow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Cow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/Cow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/ambiguous/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/TestServlet.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/TestServlet.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/TestServlet.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/TestServlet.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/UnsatisfiedInjectionIntoNonContextualComponentTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/UnsatisfiedInjectionIntoNonContextualComponentTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/UnsatisfiedInjectionIntoNonContextualComponentTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/broken/unsatisfied/UnsatisfiedInjectionIntoNonContextualComponentTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/PersistenceResourceInjectionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/PersistenceResourceInjectionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/PersistenceResourceInjectionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/PersistenceResourceInjectionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/Persistor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/Persistor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/Persistor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/Persistor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/SpecialPersistor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/SpecialPersistor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/SpecialPersistor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injection/persistence/SpecialPersistor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/InjectionPointTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/TestServlet_Broken.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/TestServlet_Broken.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/TestServlet_Broken.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/TestServlet_Broken.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/NonContextualInjectionPointTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/NonContextualInjectionPointTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/NonContextualInjectionPointTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/injectionpoint/non/contextual/NonContextualInjectionPointTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/JndiBeanManagerInjected.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/JndiBeanManagerInjected.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/JndiBeanManagerInjected.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/JndiBeanManagerInjected.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTestEar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTestEar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTestEar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/jndi/ManagerTestEar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/AfterDeploymentValidationObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/AfterDeploymentValidationObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/AfterDeploymentValidationObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/AfterDeploymentValidationObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Alpha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Alpha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Alpha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Alpha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Baz.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Baz.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Baz.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Baz.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bravo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bravo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bravo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Bravo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/CDIProviderInitTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/CDIProviderInitTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/CDIProviderInitTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/CDIProviderInitTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Charlie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Charlie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Charlie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Charlie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Marker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Marker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Marker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/Marker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerBda2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerNonBda.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerNonBda.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerNonBda.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerNonBda.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerWar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerWar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerWar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/MarkerObtainerWar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/NonBdaAfterDeploymentValidationObserver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/NonBdaAfterDeploymentValidationObserver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/NonBdaAfterDeploymentValidationObserver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/init/NonBdaAfterDeploymentValidationObserver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Alpha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Alpha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Alpha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Alpha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/AlphaLocator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/AlphaLocator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/AlphaLocator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/AlphaLocator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Bravo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Bravo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Bravo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Bravo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoLocator.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoLocator.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoLocator.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoLocator.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoMarker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoMarker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoMarker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/BravoMarker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/CDIProviderRuntimeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/CDIProviderRuntimeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/CDIProviderRuntimeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/CDIProviderRuntimeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Powerful.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Powerful.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Powerful.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/Powerful.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/PowerfulLiteral.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/PowerfulLiteral.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/PowerfulLiteral.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/manager/provider/runtime/PowerfulLiteral.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeEjbFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeEjbFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeEjbFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeEjbFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/AlternativeFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashEjbFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashEjbFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashEjbFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashEjbFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/CashFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFooLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFooLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFooLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EjbFooLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledManagedBeanInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerFieldInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledProducerMethodInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/EnabledSessionBeanInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Enterprise.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Enterprise.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Enterprise.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Enterprise.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Foo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Foo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Foo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Foo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooFieldProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooFieldProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooFieldProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooFieldProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooMethodProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooMethodProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooMethodProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/FooMethodProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolution02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolution02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolution02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolution02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolutionTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolutionTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolutionTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleELResolutionTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookup02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookup02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookup02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookup02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookupTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookupTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookupTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/InterModuleLookupTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ManagedFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ManagedFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ManagedFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ManagedFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentEjbFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentEjbFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentEjbFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentEjbFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/PaymentFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ProducedFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ProducedFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ProducedFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/ProducedFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeManagedBeanInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailability02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailability02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailability02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailability02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailabilityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailabilityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailabilityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SelectedAlternativeSessionBeanInjectionAvailabilityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailable02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailable02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailable02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailable02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailableTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailableTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailableTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedBeanInjectionNotAvailableTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailable02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailable02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailable02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailable02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailableTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailableTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailableTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializedProducerMethodInjectionNotAvailableTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializingFooMethodProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializingFooMethodProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializingFooMethodProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/SpecializingFooMethodProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Standard.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Standard.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Standard.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/Standard.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooELResolver.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooELResolver.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooELResolver.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooELResolver.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooLookup.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooLookup.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooLookup.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebFooLookup.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentEjbBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentEjbBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentEjbBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/WebPaymentEjbBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenProducedFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenProducedFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenProducedFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenProducedFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenWebBar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenWebBar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenWebBar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/BrokenWebBar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledEjbFoo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledEjbFoo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledEjbFoo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledEjbFoo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooFieldProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooFieldProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooFieldProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooFieldProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooMethodProducer.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooMethodProducer.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooMethodProducer.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledFooMethodProducer.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerFieldInjectionNotAvailableTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerFieldInjectionNotAvailableTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerFieldInjectionNotAvailableTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerFieldInjectionNotAvailableTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerMethodInjectionNotAvailableTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerMethodInjectionNotAvailableTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerMethodInjectionNotAvailableTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledProducerMethodInjectionNotAvailableTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledSessionBeanInjectionNotAvailableTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledSessionBeanInjectionNotAvailableTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledSessionBeanInjectionNotAvailableTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/DisabledSessionBeanInjectionNotAvailableTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/EjbFooLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/EjbFooLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/EjbFooLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/broken/EjbFooLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Animal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Animal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Animal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Animal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Bar.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Bar.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Bar.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Bar.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarBinding.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarBinding.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarBinding.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarBinding.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarSuperInterceptor.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarSuperInterceptor.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarSuperInterceptor.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/BarSuperInterceptor.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cat.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cat.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cat.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cat.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Checker.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Checker.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Checker.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Checker.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cow.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cow.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cow.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Cow.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Dog.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Dog.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Dog.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/Dog.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/InterceptorModularityTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/InterceptorModularityTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/InterceptorModularityTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/interceptors/InterceptorModularityTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Alpha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Alpha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Alpha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Alpha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Bravo.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Bravo.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Bravo.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Bravo.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Charlie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Charlie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Charlie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Charlie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Connector.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Connector.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Connector.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Connector.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Handler.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Handler.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Handler.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/Handler.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/LowercaseHandler.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/LowercaseHandler.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/LowercaseHandler.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/LowercaseHandler.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity01Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity01Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity01Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity01Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity03Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity03Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity03Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity03Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity04Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity04Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity04Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity04Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity05Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity05Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity05Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity05Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity06Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity06Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity06Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity06Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity07Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity07Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity07Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/SpecializationModularity07Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/UppercaseHandler.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/UppercaseHandler.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/UppercaseHandler.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/UppercaseHandler.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/AlternativeSpecializedFactory.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/AlternativeSpecializedFactory.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/AlternativeSpecializedFactory.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/AlternativeSpecializedFactory.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Factory.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Factory.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Factory.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Factory.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/FactoryEvent.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/FactoryEvent.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/FactoryEvent.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/FactoryEvent.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean1.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean1.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean1.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean1.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean2.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean2.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean2.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/InjectedBean2.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Product.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Product.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Product.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Product.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization01Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization01Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization01Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization01Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization02Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization02Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization02Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization02Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization03Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization03Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization03Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization03Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization04Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization04Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization04Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization04Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization05Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization05Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization05Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization05Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization06Test.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization06Test.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization06Test.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/modules/specialization/alternative/Specialization06Test.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/Capercaillie.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/Capercaillie.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/Capercaillie.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/Capercaillie.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/CapercaillieLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/CapercaillieLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/CapercaillieLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/CapercaillieLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/EnterpriseResolutionByTypeTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/EnterpriseResolutionByTypeTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/EnterpriseResolutionByTypeTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/EnterpriseResolutionByTypeTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/ScottishBirdLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/ScottishBirdLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/ScottishBirdLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/interceptor/ejb/ScottishBirdLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Elephant.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Elephant.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Elephant.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Elephant.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ElephantLocal.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ElephantLocal.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ElephantLocal.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ElephantLocal.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/EnterpriseVetoedTest.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/EnterpriseVetoedTest.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/EnterpriseVetoedTest.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/EnterpriseVetoedTest.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Gecko.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Gecko.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Gecko.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/Gecko.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ModifyingExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ModifyingExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ModifyingExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/ModifyingExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/VerifyingExtension.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/VerifyingExtension.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/VerifyingExtension.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/VerifyingExtension.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/Piranha.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/Piranha.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/Piranha.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/Piranha.java diff --git a/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/package-info.java b/tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/package-info.java similarity index 100% rename from cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/package-info.java rename to tcks/apis/cdi-ee-tck/tck/src/main/java/org/jboss/cdi/tck/tests/vetoed/enterprise/aquarium/package-info.java diff --git a/cdi-ee-tck/tck/src/main/resources/META-INF/test-unit.properties b/tcks/apis/cdi-ee-tck/tck/src/main/resources/META-INF/test-unit.properties similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/META-INF/test-unit.properties rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/META-INF/test-unit.properties diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/alternative/enterprise/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/alternative/enterprise/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/alternative/enterprise/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/alternative/enterprise/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/SimplePage.html b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/SimplePage.html similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/SimplePage.html rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/SimplePage.html diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/application/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/builtin.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/builtin.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/builtin.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/builtin.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cloud.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cloud.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cloud.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cloud.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/clouds.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/clouds.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/clouds.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/clouds.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cumulus.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cumulus.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cumulus.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/cumulus.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/error.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/error.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/error.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/error.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/faces-config.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/faces-config.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/faces-config.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/faces-config.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/home.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/home.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/home.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/home.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/lightening.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/lightening.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/lightening.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/lightening.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/rain.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/rain.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/rain.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/rain.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/servlet/message.html b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/servlet/message.html similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/servlet/message.html rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/servlet/message.html diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm-ajax.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm-ajax.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm-ajax.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm-ajax.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/storm.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/thunder.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/thunder.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/thunder.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/thunder.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/conversation/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/dependent/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/dependent/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/dependent/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/dependent/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingBeanConstructor/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingBeanConstructor/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingBeanConstructor/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingBeanConstructor/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingInitializerMethod/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingInitializerMethod/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingInitializerMethod/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/decoratorWithNonPassivatingInitializerMethod/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptor/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptor/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptor/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingBeanConstructorParameterInInterceptor/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingConstructorFieldInDecorator/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingConstructorFieldInDecorator/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingConstructorFieldInDecorator/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingConstructorFieldInDecorator/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerInDecorator/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerInDecorator/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerInDecorator/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerInDecorator/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerParameterInInterceptor/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerParameterInInterceptor/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerParameterInInterceptor/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/enterpriseBeanWithNonPassivatingInitializerParameterInInterceptor/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/interceptorWithNonPassivatingBeanConstructorParameter/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/interceptorWithNonPassivatingBeanConstructorParameter/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/interceptorWithNonPassivatingBeanConstructorParameter/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/broken/interceptorWithNonPassivatingBeanConstructorParameter/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ejb-jar.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ejb-jar.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ejb-jar.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/invalid/ejb-jar.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ejb-jar.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ejb-jar.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ejb-jar.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/passivating/enterprise/valid/ejb-jar.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/SimplePage.html b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/SimplePage.html similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/SimplePage.html rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/SimplePage.html diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/request/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/session/SimplePage.html b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/session/SimplePage.html similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/session/SimplePage.html rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/context/session/SimplePage.html diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/custom/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/custom/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/custom/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/custom/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateConstructor/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateConstructor/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateConstructor/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateConstructor/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateField/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateField/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateField/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateField/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateInitializerMethod/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateInitializerMethod/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateInitializerMethod/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/definition/inject/delegateInitializerMethod/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/observer/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/observer/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/observer/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/observer/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/producer/method/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/producer/method/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/producer/method/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/invocation/producer/method/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/resolution/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/resolution/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/resolution/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/decorators/resolution/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/inheritance/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/inheritance/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/inheritance/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/definition/stereotype/inheritance/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/deployment/trimmed/enteprise/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/event/observer/registerUsingEvent/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/event/observer/registerUsingEvent/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/event/observer/registerUsingEvent/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/event/observer/registerUsingEvent/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/container/event/ejb-jar.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/container/event/ejb-jar.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/container/event/ejb-jar.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/container/event/ejb-jar.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/faces-config.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/faces-config.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/faces-config.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionPoint/ee/faces-config.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestLibrary.tld b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestLibrary.tld similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestLibrary.tld rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/TestLibrary.tld diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/faces-config.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/faces-config.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/faces-config.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/faces-config.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/index.jsp b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/index.jsp similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/index.jsp rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/extensions/lifecycle/processInjectionTarget/index.jsp diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/full/interceptors/definition/interceptorNotListedInBeansXml/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/full/interceptors/definition/interceptorNotListedInBeansXml/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/full/interceptors/definition/interceptorNotListedInBeansXml/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/full/interceptors/definition/interceptorNotListedInBeansXml/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ejb-jar.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ejb-jar.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ejb-jar.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/enterprise/definition/ejb-jar.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/producer/method/lifecycle/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/producer/method/lifecycle/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/producer/method/lifecycle/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/producer/method/lifecycle/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/lifecycle/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/lifecycle/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/lifecycle/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/lifecycle/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/env/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/persistence.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/persistence.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/persistence.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/persistenceContext/persistence.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/implementation/simple/resource/resource/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/realization/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/realization/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/realization/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/realization/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/names/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/names/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/names/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/names/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend1/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend1/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend1/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend1/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend2/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend2/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend2/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend2/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend3/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend3/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend3/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/noextend3/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/two/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/two/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/two/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/inheritance/specialization/simple/broken/two/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/custom/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/custom/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/custom/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/custom/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/interceptorOrder/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/enterprise/nonContextualReference/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/interceptors/definition/interceptorCalledBeforeDecorator/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/clientProxy/incontainer/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSFTestPage.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSFTestPage.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSFTestPage.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSFTestPage.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSPTestPage.jsp b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSPTestPage.jsp similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSPTestPage.jsp rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/JSPTestPage.jsp diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/faces-config.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/faces-config.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/faces-config.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/faces-config.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/el/integration/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.xhtml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.xhtml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.xhtml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/ManagedBeanTestPage.xhtml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagPage.jsp b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagPage.jsp similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagPage.jsp rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TagPage.jsp diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestLibrary.tld b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestLibrary.tld similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestLibrary.tld rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/TestLibrary.tld diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Translator_schema1.xsd b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Translator_schema1.xsd similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Translator_schema1.xsd rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/Translator_schema1.xsd diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web2.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web2.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web2.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injection/non/contextual/web2.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/web.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/web.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/web.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/injectionpoint/broken/not/bean/web.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/decorator/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/decorator/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/decorator/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/lookup/typesafe/resolution/decorator/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/se/discovery/trimmed/beans.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/se/discovery/trimmed/beans.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/se/discovery/trimmed/beans.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/org/jboss/cdi/tck/tests/se/discovery/trimmed/beans.xml diff --git a/cdi-ee-tck/tck/src/main/resources/tck-audit-cdi.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-cdi.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/tck-audit-cdi.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-cdi.xml diff --git a/cdi-ee-tck/tck/src/main/resources/tck-audit-int.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-int.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/tck-audit-int.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-int.xml diff --git a/cdi-ee-tck/tck/src/main/resources/tck-audit-mb.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-mb.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/tck-audit-mb.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-audit-mb.xml diff --git a/cdi-ee-tck/tck/src/main/resources/tck-tests.xml b/tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-tests.xml similarity index 100% rename from cdi-ee-tck/tck/src/main/resources/tck-tests.xml rename to tcks/apis/cdi-ee-tck/tck/src/main/resources/tck-tests.xml diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/ExclusionListsTest.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/ExclusionListsTest.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/ExclusionListsTest.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/ExclusionListsTest.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/ConfigurationTest.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/ConfigurationTest.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/ConfigurationTest.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/ConfigurationTest.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyBeans.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyBeans.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyBeans.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyBeans.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContexts.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContexts.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContexts.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContexts.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContextuals.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContextuals.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContextuals.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyContextuals.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyCreationalContexts.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyCreationalContexts.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyCreationalContexts.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyCreationalContexts.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyEL.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyEL.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyEL.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/porting/DummyEL.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/EjbJarDescriptorBuilderTest.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/EjbJarDescriptorBuilderTest.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/EjbJarDescriptorBuilderTest.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/EjbJarDescriptorBuilderTest.java diff --git a/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/Input.java b/tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/Input.java similarity index 100% rename from cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/Input.java rename to tcks/apis/cdi-ee-tck/tck/src/test/java/org/jboss/cdi/tck/test/shrinkwrap/descriptors/ejb/Input.java diff --git a/cdi-ee-tck/tck/src/test/resources/META-INF/cdi-tck.properties b/tcks/apis/cdi-ee-tck/tck/src/test/resources/META-INF/cdi-tck.properties similarity index 100% rename from cdi-ee-tck/tck/src/test/resources/META-INF/cdi-tck.properties rename to tcks/apis/cdi-ee-tck/tck/src/test/resources/META-INF/cdi-tck.properties diff --git a/cdi-ee-tck/tck/src/test/resources/xsd/ejb-jar_3_1.xsd b/tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/ejb-jar_3_1.xsd similarity index 100% rename from cdi-ee-tck/tck/src/test/resources/xsd/ejb-jar_3_1.xsd rename to tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/ejb-jar_3_1.xsd diff --git a/cdi-ee-tck/tck/src/test/resources/xsd/javaee_6.xsd b/tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/javaee_6.xsd similarity index 100% rename from cdi-ee-tck/tck/src/test/resources/xsd/javaee_6.xsd rename to tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/javaee_6.xsd diff --git a/cdi-ee-tck/tck/src/test/resources/xsd/javaee_web_services_client_1_3.xsd b/tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/javaee_web_services_client_1_3.xsd similarity index 100% rename from cdi-ee-tck/tck/src/test/resources/xsd/javaee_web_services_client_1_3.xsd rename to tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/javaee_web_services_client_1_3.xsd diff --git a/cdi-ee-tck/tck/src/test/resources/xsd/xml.xsd b/tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/xml.xsd similarity index 100% rename from cdi-ee-tck/tck/src/test/resources/xsd/xml.xsd rename to tcks/apis/cdi-ee-tck/tck/src/test/resources/xsd/xml.xsd diff --git a/connector/pom.xml b/tcks/apis/connector/pom.xml similarity index 98% rename from connector/pom.xml rename to tcks/apis/connector/pom.xml index 7efaf9140d..0348f3f502 100644 --- a/connector/pom.xml +++ b/tcks/apis/connector/pom.xml @@ -23,6 +23,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../pom.xml connector jar diff --git a/connector/rewrite-pom.xml b/tcks/apis/connector/rewrite-pom.xml similarity index 100% rename from connector/rewrite-pom.xml rename to tcks/apis/connector/rewrite-pom.xml diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDActivationSpec.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDAdminObject.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDManagedConnectionFactory.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageListener.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDMessageWork.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDResourceAdapterImpl.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/CRDWorkManager.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/MsgXAResource.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/NestedWorkXid1.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/RADeployment.java diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/README.txt diff --git a/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/common/connector/embedded/adapter1/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotationClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/annotations_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/anno/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/mdcomplete_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/mdcomplete/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/paClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/partialanno_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/annotations/partialanno/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManagerClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/connManager_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/connManager/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/connManager/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/connManager/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/Deployment.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/Deployment.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/Deployment.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/Deployment.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/DeploymentEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/ejb_Deployment_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/deployment/sun-ra.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/sun-ra.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/deployment/sun-ra.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/deployment/sun-ra.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/connectionClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/localTx_conn_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/connection/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/eventClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/localTx_event_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/event/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/event/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/lifecycleClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/localTx_lifecycle_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/lifecycle/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/MDBClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/msginflow_mdb_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/msginflow/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/localTx_security_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/securityClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/security/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/security/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanA.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanA.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanA.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanA.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanAEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanAEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanAEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanAEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanBEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanBEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanBEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/BeanBEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/README b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/README similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/README rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/README diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBean.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBean.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBean.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBean.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBeanEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBeanEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBeanEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/TestBeanEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing2/ejb_txTran_conSharing2_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanA.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanA.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanA.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanA.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanAEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanAEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanAEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanAEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanBEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanBEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanBEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/BeanBEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/README b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/README similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/README rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/README diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBean.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBean.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBean.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBean.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBeanEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBeanEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBeanEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/TestBeanEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transaction/conSharing3/ejb_txTran_conSharing3_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflowClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/transinflow/transinflow_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/WorkContextClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workcontext/workcontext_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle.props b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle.props similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle.props rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle.props diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle.webprops b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle.webprops similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle.webprops rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle.webprops diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/localTx_workmgt_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle.webprops b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle.webprops similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle.webprops rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle.webprops diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/localTx/workmgt/workmgtClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/JCAMessageBean.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/JCAMessageBean.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/JCAMessageBean.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/JCAMessageBean.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBean.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBean.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBean.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBean.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBeanOne.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBeanOne.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBeanOne.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/MessageBeanOne.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow1_mdb_msginflow_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_jca_msginflow_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/mdb/msginflow_mdb_msginflow_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connectionClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/connection_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/connection/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/eventClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/event_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/event/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/event/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycleClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/lifecycle_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/lifecycle/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/securityClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/security_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/security/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/security/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgtClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/noTx/workmgt/workmgt_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientEjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientEjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientEjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientEjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientJspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientJspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientJspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientJspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ClientServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/permissiondd_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/permissiondd/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/permissiondd/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/AODTestServlet.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/AODTestServlet.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/AODTestServlet.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/AODTestServlet.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/CRDTestServlet.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/CRDTestServlet.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/CRDTestServlet.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/CRDTestServlet.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestAdminObjStatelessEjb.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestAdminObjStatelessEjb.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestAdminObjStatelessEjb.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestAdminObjStatelessEjb.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestStatelessEjb.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestStatelessEjb.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestStatelessEjb.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/ITestStatelessEjb.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestAdminObjStatelessEjb.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestAdminObjStatelessEjb.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestAdminObjStatelessEjb.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestAdminObjStatelessEjb.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestStatelessEjb.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestStatelessEjb.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestStatelessEjb.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/TestStatelessEjb.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/application.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/application.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/application.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/application.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/ejb/conn_resourcedefs_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/AODTestServlet.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/AODTestServlet.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/AODTestServlet.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/AODTestServlet.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/CRDTestServlet.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/CRDTestServlet.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/CRDTestServlet.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/CRDTestServlet.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/Client.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/Client.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/Client.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/Client.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs.ear.sun-application.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs.ear.sun-application.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs.ear.sun-application.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs.ear.sun-application.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/resourceDefs/servlet/servlet_resourcedefs_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/util/DBSupport.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/util/DBSupport.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/util/DBSupport.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/util/DBSupport.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/util/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/util/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/util/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/util/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/connectionClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/connection/xa_connection_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/eventClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/event/xa_event_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/lifecycleClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/lifecycle/xa_lifecycle_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/securityClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/security/xa_security_servlet_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ClientTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ClientTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ClientTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ClientTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestClient.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestClient.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestClient.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestClient.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestEJB.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestEJB.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestEJB.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/JTATestEJB.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/transaction/jta/ejb_JTATest_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/build.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/build.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/build.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/build.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/servlet_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/servlet_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/servlet_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/servlet_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1EjbTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1EjbTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1EjbTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1EjbTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1JspTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1JspTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1JspTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1JspTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1ServletTest.java b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1ServletTest.java similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1ServletTest.java rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/workmgtClient1ServletTest.java diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_client.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_ejb_vehicle_ejb.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.war.sun-web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_jsp_vehicle_web.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_servlet.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_servlet.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_servlet.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_servlet.xml diff --git a/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/connector/src/main/java/com/sun/ts/tests/connector/xa/workmgt/xa_workmgt_servlet_vehicle_web.war.sun-web.xml diff --git a/ejb30/pom.xml b/tcks/apis/enterprise-beans/ejb30/pom.xml similarity index 96% rename from ejb30/pom.xml rename to tcks/apis/enterprise-beans/ejb30/pom.xml index 933ca2781a..1867f0eaed 100644 --- a/ejb30/pom.xml +++ b/tcks/apis/enterprise-beans/ejb30/pom.xml @@ -1,8 +1,7 @@ - ${project.groupId} - common - 11.0.0-SNAPSHOT - - - ${project.groupId} - runtime - 11.0.0-SNAPSHOT - - - ${project.groupId} - libutil - 11.0.0-SNAPSHOT + jakarta.servlet.jsp.jstl + jakarta.servlet.jsp.jstl-api + 3.0.2 jakarta.servlet.jsp jakarta.servlet.jsp-api - ${jakarta.servlet.jsp-api.version} + 4.0.0 jakarta.servlet jakarta.servlet-api - ${jakarta.servlet.api.version} - - - jakarta.servlet.jsp.jstl - jakarta.servlet.jsp.jstl-api - 3.0.0 + 6.1.0 jakarta.transaction jakarta.transaction-api 2.0.1 + + + + jakarta.tck + common + ${jakarta.tck.tools.version} + + + jakarta.tck + runtime + ${jakarta.tck.tools.version} + + + jakarta.tck + libutil + ${jakarta.tck.tools.version} + + commons-httpclient commons-httpclient + 3.1 org.junit.jupiter junit-jupiter - ${junit.jupiter.version} + 5.11.3 org.jboss.arquillian.junit5 arquillian-junit5-container - - - org.jboss.arquillian.junit5 - arquillian-junit5-core + 1.9.1.Final ${bundle-name}-${project.version} + src/main/resources @@ -105,19 +127,35 @@ - + - maven-deploy-plugin - - true - + maven-enforcer-plugin + + + enforce-maven + + enforce + + + + + 3.8.6 + + + + + + - maven-javadoc-plugin + maven-compiler-plugin + 3.13.0 - none + 17 + + org.apache.maven.plugins maven-source-plugin @@ -130,6 +168,42 @@ + + + + maven-javadoc-plugin + + none + + + + + + org.codehaus.mojo + flatten-maven-plugin + 1.6.0 + + ossrh + + + + + flatten + process-resources + + flatten + + + + + flatten.clean + clean + + clean + + + + diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/JstlTckConstants.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/JstlTckConstants.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/JstlTckConstants.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/JstlTckConstants.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/beans/SimpleBean.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/beans/SimpleBean.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/beans/SimpleBean.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/beans/SimpleBean.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/AbstractUrlClient.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/BaseUrlClient.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/BaseUrlClient.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/client/BaseUrlClient.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/BaseUrlClient.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/CompatAbstractUrlClient.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/client/SqlUrlClient.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/FormatFilter.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/FormatFilter.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/FormatFilter.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/FormatFilter.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/JstlDbFilter.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/JstlDbFilter.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/JstlDbFilter.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/JstlDbFilter.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/SimpleXmlFilter.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/SimpleXmlFilter.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/filters/SimpleXmlFilter.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/filters/SimpleXmlFilter.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/listeners/SQLContextListener.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/listeners/SQLContextListener.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/listeners/SQLContextListener.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/listeners/SQLContextListener.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en_GB.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en_GB.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en_GB.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_en_GB.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_fr_CA.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_fr_CA.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_fr_CA.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources2_fr_CA.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources3_en.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources3_en.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources3_en.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources3_en.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_GB.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_GB.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_GB.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_GB.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_US.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_US.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_US.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_en_US.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_fr.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_fr.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_fr.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources4_fr.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_en.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_en.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_en.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_en.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_fr_CA.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_fr_CA.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_fr_CA.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_fr_CA.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_sw.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_sw.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_sw.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources5_sw.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources6_fr_CA.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources6_fr_CA.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources6_fr_CA.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources6_fr_CA.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources1_en_US.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources1_en_US.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources1_en_US.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources1_en_US.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources_en.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources_en.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources_en.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/resources/Resources_en.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/CheckRuntime.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/CheckRuntime.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/CheckRuntime.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/CheckRuntime.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ConfigTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ConfigTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ConfigTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ConfigTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/DisplayTypeTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/DisplayTypeTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/DisplayTypeTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/DisplayTypeTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ExceptionCheckTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ExceptionCheckTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ExceptionCheckTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ExceptionCheckTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/GetLocalUrlTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/GetLocalUrlTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/GetLocalUrlTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/GetLocalUrlTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/SaveTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/SaveTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/SaveTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/SaveTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ScopeCheckTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ScopeCheckTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ScopeCheckTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ScopeCheckTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/TestTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/TestTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/TestTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/TestTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ThrowTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ThrowTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/ThrowTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/ThrowTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/TypeCheckTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/TypeCheckTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/TypeCheckTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/TypeCheckTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatRequestWrapper.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatRequestWrapper.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatRequestWrapper.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatRequestWrapper.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatResponseWrapper.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatResponseWrapper.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatResponseWrapper.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/FormatResponseWrapper.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java.6 b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java.6 similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java.6 rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckConnectionWrapper.java.6 diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java.6 b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java.6 similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java.6 rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/common/wrappers/TckDataSourceWrapper.java.6 diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.war diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/lib/implementation/sun/common/SunRIURL.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/cwo/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/conditional/iftag/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/ResultSetQueryTag.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/ResultSetQueryTag.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/ResultSetQueryTag.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/ResultSetQueryTag.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/JSTLClientIT.java diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/build.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/build.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/build.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/build.xml diff --git a/jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml b/tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml similarity index 100% rename from jstl/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml rename to tcks/apis/tags/src/main/java/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources.properties diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/resources/AlgoResources_en_IE_EURO.properties diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/jstltck-util.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/permitted.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nodecl.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noexpr.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_nortexpr.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/common/tags/tlds/scrfree_noscr.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltck_1_0.jar diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/WEB-INF/lib/jstltcktlv_1_0.jar diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/import.txt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/jstl_1_0_compat_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/negativeScriptFreeTlvNoDeclTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/param.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveBundleLocalizationScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCWOTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveCatchVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDateParamQueryTimestampTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveDefaultEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFDValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFNScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForEachVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveForTokensTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveFormatLocalizationContextI18NTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveIfScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveImportAbsUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveItemsObjArrayTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveJSTLURITest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveMessageKeyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveOutEscXmlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePDValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePNValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamNameValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParamValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveParseVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positivePermittedTlvTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveQueryScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRedirectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveRemoveScopeVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveResultGetRowsCountTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetBundleScopeVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetDataSourceScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetLocaleValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetSelectVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveSetTimezoneValueTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTimezoneValueTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTransformVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveTxQueryCommitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUpdateBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveUrlScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/positiveXParamNameTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/simple2.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/compat/onedotzero/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/jstl_core_cond_cwo_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWONoWhenActionsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOOtherwiseNoParentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenBeforeOtherwiseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenNoParentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTestReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/negativeCWOWhenTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/cwo/positiveCWOTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/jstl_core_cond_if_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/negativeIfTestTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfBodyBehaviorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfExportedVarTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/conditional/iftag/positiveIfTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/jstl_core_gen_catch_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/catchtag/positiveCatchVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/jstl_core_gen_out_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/negativeOutBodyContentExcTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutBodyBehaviorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutDefaultAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlDefaultTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutEscXmlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutReaderTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/outtag/positiveOutValueAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/jstl_core_gen_rem_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/remove/positiveRemoveScopeVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/jstl_core_gen_set_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetBodyContentExcTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/negativeSetTargetNullInvalidObjTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetBodyBehaviorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetDeferredValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetNullValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetPropertyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/general/set/positiveSetTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/jstl_core_iter_foreach_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEBeginTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEEndTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEItemsTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/negativeFEStepTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveBodyBehaviorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest1.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest2.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachDeferredValueTest3.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveForEachEndLTBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCollectionTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsCommaSepStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEndTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsEnumerationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsIteratorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsMapTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsObjArrayTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsPrimArrayTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveItemsStepTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveNoItemsIterationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarStatusTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/foreach/positiveVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/jstl_core_iter_fortok_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTBeginTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTEndTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/negativeFTStepTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveBodyBehaviorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveDelimsNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveEndTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensDeferredValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensEndLTBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveForTokensTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsDelimsNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveItemsNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveStepTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/fortokens/positiveVarStatusTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/jstl_core_iter_lstat_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/iteration/loopstatus/positiveLoopTagStatusTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/IOException.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseInternalServerError.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScCreated.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseScGone.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ResponseSendRedirect.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/RuntimeException.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletException.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/ServletExceptionRootCause.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/encoding/Encoding.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/env.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import-encoded.txt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/import.txt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/jstl_core_url_import_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportAbsResourceNon2xxTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxInvalidValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportCtxUrlInvalidValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherNon2xxTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherRTIOExceptionTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportRequestDispatcherServletExceptionTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlInvalidTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/negativeImportUrlNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlEnvPropTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportAbsUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportBodyParamTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCharEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportCtxRelUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportEncodingNotSpecifiedTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportFollowRedirectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportPageRelUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportRelUrlEnvPropTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarReaderTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/importtag/positiveImportVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/import.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/jstl_core_url_param_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/negativeParamExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamAggregationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamBodyValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamNameValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/param/positiveParamValueNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/jstl_core_url_redirect_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectContextUrlInvalidValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/negativeRedirectExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectParamsBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/redirect/positiveRedirectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/jstl_core_url_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlContextUrlInvalidValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/negativeUrlExcBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlAbsUrlNotRewrittenTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlDisplayUrlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlNoCharEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlParamsBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlRelUrlRewrittenTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/core/urlresource/url/positiveUrlValueVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/jstl_etu_config_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigFindTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveApplicationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemovePageContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveRequestTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigGetSetRemoveSessionTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/config/positiveConfigStaticMemebersTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseNullSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseStringSubstringEqualTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsIgnoreCaseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsNullSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsStringSubstringEqualTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsContainsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithEmptySuffixStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithNullSuffixTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithSuffixStringEqualTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEndsWithTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsEscapeXmlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfEmptySubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullEmptyStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfNullSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsIndexOfTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinEmptySeparatorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullArrayTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinNullSeparatorTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsJoinTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthEmptyStringInputTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthNullInputTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsLengthTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyAfterStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyBeforeStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceEmptyInputStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullAfterStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullBeforeStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceNullInputStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsReplaceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyDelimiterTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitEmptyInputStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullDelimiterTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitNullInputStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSplitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithEmptyPrefixStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullPrefixTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithPrefixStringEqualTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsStartsWithTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterEmptySubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterNullSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringAfterTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeEmptySubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeNullSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeforeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringBeginIndexGTLastIndexTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexGTStringLengthTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringEndIndexLTBeginIndexTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeBeginIndexTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNegativeEndIndexTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsSubstringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToLowerCaseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsToUpperCaseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimNullStringTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/functionsTrimTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/functions/jstl_etu_func_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/jstl_etu_tlv_perm_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/negativePermittedTlvTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/permitted/positivePermittedTlvTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/jstl_etu_tlv_scrfree_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoDeclTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoExprTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoRTExprTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/negativeScriptFreeTlvNoScrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoDeclTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoExprTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoRTExprTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/tlv/scrfree/positiveScriptFreeTlvNoScrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/jstl_etu_uri_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/etu/uri/positiveJSTLURITest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/jstl_fmt_fmtdate_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/negativeFDScopeNoVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDDateStyleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDFallbackLocaleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDLocalizationContextTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDPatternTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeStyleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneNullEmptyTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZonePrecedenceTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTimeZoneTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDTypeTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtdate/positiveFDVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/jstl_fmt_fmtnum_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNScopeNoVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/negativeFNUnableToParseValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNBodyValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCodeSymbolTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencyCodeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNCurrencySymbolTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNGroupingUsedTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNLocalizationContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxFracDigitsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMaxIntDigitsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinFracDigitsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNMinIntDigitsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNPatternTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/fmtnum/positiveFNVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/jstl_fmt_locctx_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBrowserLocaleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextBundleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextI18NTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/localecontext/positiveFormatLocalizationContextLocaleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/jstl_fmt_psdate_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDScopeNoVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/negativePDUnableToParseValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDBodyValueTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDDateStyleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDFallbackLocaleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDLocalizationContextTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDParseLocaleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDPatternTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeStyleTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneNullEmptyTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZonePrecedenceTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTimeZoneTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDTypeTestJava20Plus.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsedate/positivePDVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/jstl_fmt_psnum_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNScopeNoVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/negativePNUnableToParseValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNBodyValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNIntegerOnlyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNLocalizationContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNParseLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNPatternTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/parsenum/positivePNVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/jstl_fmt_stz_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneAttrScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneSetAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueNullEmptyTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneValueTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/settimezone/positiveSetTimezoneVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/jstl_fmt_tz_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueNullEmptyTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTestJava20Plus.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTestJava20Plus.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTestJava20Plus.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/format/timezone/positiveTimezoneValueTestJava20Plus.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/jstl_fmt_bundle_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleBasenameTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocaleConfigurationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundleLocalizationScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/bundle/positiveBundlePrefixTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/jstl_fmt_message_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/localeSupportTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/negativeLocaleSupportTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleOverrideTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageBundleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageCompoundNoParamTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNotFoundTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyParamBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageKeyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageLocaleConfigurationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageNoLocalizationContextTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageParamBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessagePrefixTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/message/positiveMessageVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/jstl_fmt_param_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/param/positiveParamValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/jstl_fmt_reqenc_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveContentTypeEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveDefaultEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveReqEncodingValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/requestencoding/positiveScopedAttrEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatBundleResourceLookup.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/formatSetBundleResourceLookup.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/resourcelookup/jstl_fmt_reslook_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/jstl_fmt_resenc_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseEncodingTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/responseencoding/positiveResponseSetCharEncodingAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/jstl_fmt_setbundle_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleBasenameTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleFallbackLocaleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleLocaleConfigurationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeLocCtxTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleScopeVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setbundle/positiveSetBundleVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/jstl_fmt_setlocale_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleOverrideTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantIgnoreTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/fmt/i18n/setlocale/positiveSetLocaleVariantTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/jstl_sql_param_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeDateParamTypeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQueryBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamQuerySQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeParamUpdateSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/negativeSetDataSourceDataSourceAttributeEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryDateTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryNoTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamQueryTimestampTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateDateTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateNoTypeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveDateParamUpdateTimestampTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentQueryTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamBodyContentUpdateTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQueryMultiSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamQuerySQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateMultiSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/positiveParamUpdateSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/param/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/WEB-INF/resultSetQuery.tld diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/jstl_sql_query_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryDataSourceNullAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsAttributeTest2.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryMaxRowsConfigTest2.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryNoVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQuerySQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryStartRowTestAttribute.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/negativeQueryVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryDataSourceConfigPrecedenceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryEmptyResultTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsConfigTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryMaxRowsIntegerConfigTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQuerySQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryStartRowAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveQueryVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/positiveResultSupportTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/query/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/jstl_sql_result_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesCountTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetColumnNamesTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexCountTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsByIndexTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsCountTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsLowerCaseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultGetRowsUpperCaseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/positiveResultIsLimitedByMaxRowsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/result/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/jstl_sql_setdatasource_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceAttributeEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceDataSourceNullAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/negativeSetDataSourceScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryNoVarAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceQueryURLTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeNoVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceScopeVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxNoVarAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceTxURLTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateNoVarAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/positiveSetDataSourceUpdateURLTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/setdatasource/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/jstl_sql_transaction_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxDataSourceNullAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxIsolationLevelAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxQueryDataSourceAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/negativeTxUpdateDataSourceAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxCommitLifeCycleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxDataSourceConfigPrecedenceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_CommittedTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRead_UnCommittedTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeRepeatable_Read.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxIsolationAttributeSerializable.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryCommitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxQueryParamCommitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxRollbackLifeCycleTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateCommitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateParamCommitTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/positiveTxUpdateRollbackTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/transaction/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/jstl_sql_update_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateDataSourceNullAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateSQLAttributeTest2.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateScopeVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativeUpdateVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/negativesetDataSourceScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateBodyContentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceAttributeDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDataSourceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigDriverManagerTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateDataSourceConfigPrecedenceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoRowsResultTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateNoVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateRowsResultTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateSQLAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateScopeAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/positiveUpdateVarAttributeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/sql/update/tssql.stmt diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/jstl_xml_xcwo_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWONoWhenActionsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOOtherwiseNoParentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenBeforeOtherwiseTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenNoParentTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectFailureTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/negativeCWOWhenSelectReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xcwo/positiveCWOWhiteSpaceTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/jstl_xml_xforeach_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectFailureTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/negativeForEachSelectReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndLTBeginTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachEndTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachSelectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachStepTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarStatusTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xforeach/positiveForEachVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/jstl_xml_xif_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfInvalidScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfScopeVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectFailureTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/negativeIfSelectReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfSelectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xconditional/xif/positiveIfVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/jstl_xml_bindings_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/bindings/positiveXPathVariableBindingsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/import.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/jstl_xml_parse_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseDocNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseInvalidScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarDomSyntaxTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/negativeParseScopeVarSyntaxTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterNullTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseFilterTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseNoDTDValidationTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeDomTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseSystemIdTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarDomTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/positiveParseXmlInputTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/parse/xfiles/resolve.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/jstl_xml_types_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveJavaToXPathTypesTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/types/positiveXPathToJavaTypesTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/jstl_xml_xout_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectFailureTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/negativeOutSelectReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutEscXmlTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xout/positiveOutSelectTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/jstl_xml_xset_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetInvalidScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectFailureTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetSelectReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/negativeSetVarReqAttrTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xmlcore/xset/positiveSetSelectVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/jstl_xml_xformparam_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/param.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamBodyValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamNameTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/param/positiveXParamValueTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/import.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/jstl_xml_xform_web.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/negativeTransformXmlXsltNullEmptyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/param.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyParamsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformBodyXmlParamsTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformDocSystemIdTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformResultTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformScopeTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformVarTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlAndXmlSystemIdTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlBodyTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXmlInputTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltInputTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.gf diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/positiveTransformXsltSystemIdTest.jsp diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple2.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/simple3.xsl diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xml diff --git a/jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl b/tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl similarity index 100% rename from jstl/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl rename to tcks/apis/tags/src/main/resources/com/sun/ts/tests/jstl/spec/xml/xtransform/transform/xfiles/resolve.xsl diff --git a/jta/pom.xml b/tcks/apis/transactions/pom.xml similarity index 99% rename from jta/pom.xml rename to tcks/apis/transactions/pom.xml index 1c17c588af..983b9a03de 100644 --- a/jta/pom.xml +++ b/tcks/apis/transactions/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../pom.xml jta-tck diff --git a/jta/src/main/java/com/sun/ts/tests/jta/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/common/InitFailedException.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/InitFailedException.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/common/InitFailedException.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/InitFailedException.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/common/InvalidStatusException.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/InvalidStatusException.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/common/InvalidStatusException.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/InvalidStatusException.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/common/Transact.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/Transact.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/common/Transact.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/Transact.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/common/TransactionStatus.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/TransactionStatus.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/common/TransactionStatus.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/TransactionStatus.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/common/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/common/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/common/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSDontRollbackException.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSDontRollbackException.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSDontRollbackException.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSDontRollbackException.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSRollbackException.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSRollbackException.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSRollbackException.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/CTSRollbackException.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/Client.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/Client.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/Client.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/Client.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejsfTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejsfTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejsfTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejsfTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjblitejspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservlet2Test.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservlet2Test.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservlet2Test.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservlet2Test.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/ClientEjbliteservletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteJSPTag.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteJSPTag.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteJSPTag.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteJSPTag.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServlet2Filter.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServlet2Filter.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServlet2Filter.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServlet2Filter.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServletVehicle.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServletVehicle.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServletVehicle.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/EJBLiteServletVehicle.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/Helper.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/Helper.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/Helper.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/Helper.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/HttpServletDelegate.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/HttpServletDelegate.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/HttpServletDelegate.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/HttpServletDelegate.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/JsfClient.java.txt b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/JsfClient.java.txt similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/JsfClient.java.txt rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/JsfClient.java.txt diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedBean.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedBean.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedBean.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedBean.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedQualifier.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedQualifier.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedQualifier.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/OneManagedQualifier.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TransactionScopedBean.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TransactionScopedBean.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TransactionScopedBean.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TransactionScopedBean.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedBean.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedBean.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedBean.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedBean.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedQualifier.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedQualifier.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedQualifier.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/TwoManagedQualifier.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/beans.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/beans.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/beans.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/beans.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/transactional/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/transactional/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/Client.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/Client.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/Client.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/Client.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/ClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/DBSupport.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/DBSupport.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/DBSupport.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/DBSupport.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBean.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBean.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBean.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBean.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBeanEJB.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBeanEJB.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBeanEJB.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/TxBeanEJB.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/txpropagationtest/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/UserBeginClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/begin/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/UserCommitClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/commit/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/UserGetStatusClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/getstatus/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/UserRollbackClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/rollback/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/UserSetRollbackOnlyClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/build.xml diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClient.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClient.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClient.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClient.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientEjbTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientJspTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientJspTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientJspTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientJspTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientServletTest.java b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientServletTest.java similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientServletTest.java rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/UserSetTransactionTimeoutClientServletTest.java diff --git a/jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/build.xml b/tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/build.xml similarity index 100% rename from jta/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/build.xml rename to tcks/apis/transactions/src/main/java/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/build.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate1_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate2_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ee_txpropagate3_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/jta_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/txpropagationtest/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_servlet_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/appclient_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/appclient_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/appclient_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/appclient_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/ejb_vehicle_ejb.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/jsp_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/jsp_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/jsp_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/jsp_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/servlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/servlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/servlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/servlet_vehicle_web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_jsp_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_jsp_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_servlet_vehicle_web.war.sun-web.xml b/tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_servlet_vehicle_web.war.sun-web.xml rename to tcks/apis/transactions/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_servlet_vehicle_web.war.sun-web.xml diff --git a/jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_client.jar.sun-application-client.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_client.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_client.xml diff --git a/jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_ejb.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.xml similarity index 100% rename from jsonp/src/main/resources/com/sun/ts/tests/jsonp/pluggability/jsonprovidertests/ejb_vehicle_ejb.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.xml diff --git a/jaxrs/src/main/java/com/sun/ts/tests/jaxrs/spec/resourceconstructor/beans.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/beans.xml similarity index 100% rename from jaxrs/src/main/java/com/sun/ts/tests/jaxrs/spec/resourceconstructor/beans.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/beans.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/faces-config.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsf/faces-config.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt diff --git a/jta/src/main/resources/vehicle/ejblitejsf/beans.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/beans.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsf/beans.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/beans.xml diff --git a/jta/src/main/resources/vehicle/ejblitejsp/ejblitejsp.tld b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/ejblitejsp.tld similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsp/ejblitejsp.tld rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/ejblitejsp.tld diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp b/tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp rename to tcks/apis/transactions/src/main/resources/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/HttpServletDelegate.java.txt b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/HttpServletDelegate.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/HttpServletDelegate.java.txt rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/HttpServletDelegate.java.txt diff --git a/jta/src/main/resources/vehicle/ejblitejsp/beans.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/beans.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsp/beans.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/beans.xml diff --git a/jta/src/main/resources/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt diff --git a/jta/src/main/resources/vehicle/ejbliteservlet/beans.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/beans.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet/beans.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/beans.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp diff --git a/jta/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml b/tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml rename to tcks/apis/transactions/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml diff --git a/jsonp/src/main/resources/vehicle/jsp/contentRoot/client.html b/tcks/apis/transactions/src/main/resources/vehicle/jsp/contentRoot/client.html similarity index 100% rename from jsonp/src/main/resources/vehicle/jsp/contentRoot/client.html rename to tcks/apis/transactions/src/main/resources/vehicle/jsp/contentRoot/client.html diff --git a/jsonb/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp b/tcks/apis/transactions/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp similarity index 100% rename from jsonb/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp rename to tcks/apis/transactions/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp diff --git a/websocket/common/pom.xml b/tcks/apis/websocket/common/pom.xml similarity index 100% rename from websocket/common/pom.xml rename to tcks/apis/websocket/common/pom.xml diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/common.xml b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/common.xml similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/common.xml rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/common.xml diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java diff --git a/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java b/tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java similarity index 100% rename from websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java rename to tcks/apis/websocket/common/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java diff --git a/websocket/docs/TCK-Exclude-List.txt b/tcks/apis/websocket/docs/TCK-Exclude-List.txt similarity index 100% rename from websocket/docs/TCK-Exclude-List.txt rename to tcks/apis/websocket/docs/TCK-Exclude-List.txt diff --git a/websocket/docs/WebSocketJavadocAssertions.html b/tcks/apis/websocket/docs/WebSocketJavadocAssertions.html similarity index 100% rename from websocket/docs/WebSocketJavadocAssertions.html rename to tcks/apis/websocket/docs/WebSocketJavadocAssertions.html diff --git a/websocket/docs/WebSocketTCK2.2-ReleaseNotes.html b/tcks/apis/websocket/docs/WebSocketTCK2.2-ReleaseNotes.html similarity index 100% rename from websocket/docs/WebSocketTCK2.2-ReleaseNotes.html rename to tcks/apis/websocket/docs/WebSocketTCK2.2-ReleaseNotes.html diff --git a/websocket/docs/index.html b/tcks/apis/websocket/docs/index.html similarity index 100% rename from websocket/docs/index.html rename to tcks/apis/websocket/docs/index.html diff --git a/websocket/docs/userguide/README.md b/tcks/apis/websocket/docs/userguide/README.md similarity index 100% rename from websocket/docs/userguide/README.md rename to tcks/apis/websocket/docs/userguide/README.md diff --git a/websocket/docs/userguide/pom.xml b/tcks/apis/websocket/docs/userguide/pom.xml similarity index 97% rename from websocket/docs/userguide/pom.xml rename to tcks/apis/websocket/docs/userguide/pom.xml index 3df43aa52f..8d6c916b26 100644 --- a/websocket/docs/userguide/pom.xml +++ b/tcks/apis/websocket/docs/userguide/pom.xml @@ -23,7 +23,7 @@ jakarta.tck jakarta.tck.user-guide 11.0.0-SNAPSHOT - ../../../user_guides/parent/pom.xml + ../../../../../user_guides/parent/pom.xml jakarta.websocket diff --git a/websocket/docs/userguide/src/main/jbake/assets/README.md b/tcks/apis/websocket/docs/userguide/src/main/jbake/assets/README.md similarity index 100% rename from websocket/docs/userguide/src/main/jbake/assets/README.md rename to tcks/apis/websocket/docs/userguide/src/main/jbake/assets/README.md diff --git a/websocket/docs/userguide/src/main/jbake/assets/_config.yml b/tcks/apis/websocket/docs/userguide/src/main/jbake/assets/_config.yml similarity index 100% rename from websocket/docs/userguide/src/main/jbake/assets/_config.yml rename to tcks/apis/websocket/docs/userguide/src/main/jbake/assets/_config.yml diff --git a/websocket/docs/userguide/src/main/jbake/assets/css/style.css b/tcks/apis/websocket/docs/userguide/src/main/jbake/assets/css/style.css similarity index 100% rename from websocket/docs/userguide/src/main/jbake/assets/css/style.css rename to tcks/apis/websocket/docs/userguide/src/main/jbake/assets/css/style.css diff --git a/websocket/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png b/tcks/apis/websocket/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png similarity index 100% rename from websocket/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png rename to tcks/apis/websocket/docs/userguide/src/main/jbake/assets/img/eclipse_foundation_logo_tiny.png diff --git a/websocket/docs/userguide/src/main/jbake/content/README b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/README similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/README rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/README diff --git a/websocket/docs/userguide/src/main/jbake/content/attributes.conf b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/attributes.conf similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/attributes.conf rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/attributes.conf diff --git a/websocket/docs/userguide/src/main/jbake/content/config.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/config.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/config.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/config.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/config.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/config.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/config.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/config.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/debug-tips.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/debug-tips.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/debug-tips.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/debug-tips.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/debug.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/debug.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/debug.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/debug.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/defns.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/defns.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/defns.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/defns.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/faq.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/faq.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/faq.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/faq.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/install-server-vi.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/install-server-vi.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/install-server-vi.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/install-server-vi.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/install-server.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/install-server.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/install-server.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/install-server.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/install.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/install.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/install.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/install.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/intro.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/intro.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/intro.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/intro.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/intro.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/intro.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/intro.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/intro.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/packages.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/packages.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/packages.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/packages.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/platforms.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/platforms.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/platforms.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/platforms.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/preface.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/preface.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/preface.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/preface.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/rebuild.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/rebuild.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/rebuild.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/rebuild.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/rebuild.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/rebuild.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/rebuild.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/rebuild.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/req-software.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/req-software.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/req-software.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/req-software.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/rules.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/rules.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/rules.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/rules.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/rules.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/rules.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/rules.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/rules.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/tck-packages.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/tck-packages.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/tck-packages.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/tck-packages.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/title.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/title.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/title.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/title.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/title.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/title.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/title.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/title.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/using-examples.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/using-examples.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/using-examples.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/using-examples.inc diff --git a/websocket/docs/userguide/src/main/jbake/content/using.adoc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/using.adoc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/using.adoc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/using.adoc diff --git a/websocket/docs/userguide/src/main/jbake/content/using.inc b/tcks/apis/websocket/docs/userguide/src/main/jbake/content/using.inc similarity index 100% rename from websocket/docs/userguide/src/main/jbake/content/using.inc rename to tcks/apis/websocket/docs/userguide/src/main/jbake/content/using.inc diff --git a/websocket/docs/userguide/src/main/jbake/jbake.properties b/tcks/apis/websocket/docs/userguide/src/main/jbake/jbake.properties similarity index 100% rename from websocket/docs/userguide/src/main/jbake/jbake.properties rename to tcks/apis/websocket/docs/userguide/src/main/jbake/jbake.properties diff --git a/websocket/docs/userguide/src/main/jbake/templates/footer.ftl b/tcks/apis/websocket/docs/userguide/src/main/jbake/templates/footer.ftl similarity index 100% rename from websocket/docs/userguide/src/main/jbake/templates/footer.ftl rename to tcks/apis/websocket/docs/userguide/src/main/jbake/templates/footer.ftl diff --git a/websocket/docs/userguide/src/main/jbake/templates/header.ftl b/tcks/apis/websocket/docs/userguide/src/main/jbake/templates/header.ftl similarity index 100% rename from websocket/docs/userguide/src/main/jbake/templates/header.ftl rename to tcks/apis/websocket/docs/userguide/src/main/jbake/templates/header.ftl diff --git a/websocket/docs/userguide/src/main/jbake/templates/menu.ftl b/tcks/apis/websocket/docs/userguide/src/main/jbake/templates/menu.ftl similarity index 100% rename from websocket/docs/userguide/src/main/jbake/templates/menu.ftl rename to tcks/apis/websocket/docs/userguide/src/main/jbake/templates/menu.ftl diff --git a/websocket/docs/userguide/src/main/jbake/templates/page.ftl b/tcks/apis/websocket/docs/userguide/src/main/jbake/templates/page.ftl similarity index 100% rename from websocket/docs/userguide/src/main/jbake/templates/page.ftl rename to tcks/apis/websocket/docs/userguide/src/main/jbake/templates/page.ftl diff --git a/websocket/docs/userguide/src/theme/jakartaee-theme.yml b/tcks/apis/websocket/docs/userguide/src/theme/jakartaee-theme.yml similarity index 100% rename from websocket/docs/userguide/src/theme/jakartaee-theme.yml rename to tcks/apis/websocket/docs/userguide/src/theme/jakartaee-theme.yml diff --git a/websocket/platform-tests/pom.xml b/tcks/apis/websocket/platform-tests/pom.xml similarity index 100% rename from websocket/platform-tests/pom.xml rename to tcks/apis/websocket/platform-tests/pom.xml diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSClientIT.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSClientIT.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSClientIT.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSClientIT.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSConstructorServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSConstructorServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSConstructorServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSConstructorServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSFieldServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSFieldServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSFieldServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSFieldServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSInjectableServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSInjectableServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSInjectableServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSInjectableServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSMethodServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSMethodServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSMethodServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/cdi/WSMethodServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/AppConfig.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/AppConfig.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/AppConfig.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/AppConfig.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/GetUserPrincipalConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/GetUserPrincipalConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/GetUserPrincipalConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/GetUserPrincipalConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/IsUserInRoleConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/IsUserInRoleConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/IsUserInRoleConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/IsUserInRoleConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCClientIT.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCClientIT.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCClientIT.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCClientIT.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCGetUserPrincipalServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCGetUserPrincipalServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCGetUserPrincipalServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCGetUserPrincipalServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCIsUserInRoleServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCIsUserInRoleServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCIsUserInRoleServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCIsUserInRoleServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCPostUnauthEchoServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCPostUnauthEchoServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCPostUnauthEchoServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCPostUnauthEchoServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCUnauthEchoServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCUnauthEchoServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCUnauthEchoServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/WSCUnauthEchoServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/CloseHttpSessionConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/CloseHttpSessionConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/CloseHttpSessionConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/CloseHttpSessionConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/TCKRequestListener.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/TCKRequestListener.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/TCKRequestListener.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/TCKRequestListener.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCClientIT.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCClientIT.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCClientIT.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCClientIT.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCCloseHttpSessionServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCCloseHttpSessionServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCCloseHttpSessionServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/WSCCloseHttpSessionServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/AppConfig.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/AppConfig.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/AppConfig.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/AppConfig.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/GetUserPrincipalConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/GetUserPrincipalConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/GetUserPrincipalConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/GetUserPrincipalConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/IsUserInRoleConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/IsUserInRoleConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/IsUserInRoleConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/IsUserInRoleConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCClientIT.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCClientIT.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCClientIT.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCClientIT.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCGetUserPrincipalServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCGetUserPrincipalServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCGetUserPrincipalServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCGetUserPrincipalServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCIsUserInRoleServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCIsUserInRoleServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCIsUserInRoleServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/WSCIsUserInRoleServer.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/GetHttpSessionConfigurator.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/GetHttpSessionConfigurator.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/GetHttpSessionConfigurator.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/GetHttpSessionConfigurator.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/TCKRequestListener.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/TCKRequestListener.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/TCKRequestListener.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/TCKRequestListener.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCClientIT.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCClientIT.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCClientIT.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCClientIT.java diff --git a/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCGetHttpSessionServer.java b/tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCGetHttpSessionServer.java similarity index 100% rename from websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCGetHttpSessionServer.java rename to tcks/apis/websocket/platform-tests/src/main/java/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/session/WSCGetHttpSessionServer.java diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/cdi/beans.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/cdi/beans.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/cdi/beans.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/cdi/beans.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/web.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_web.war.sun-web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_web.war.sun-web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_web.war.sun-web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticated/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_web.war.sun-web.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/web.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_logoff_web.war.sun-web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_logoff_web.war.sun-web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_logoff_web.war.sun-web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedlogoff/wsc_platform_jakarta_websocket_handshakeresponse_authenticated_logoff_web.war.sun-web.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/web.xml diff --git a/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/wsc_platform_jakarta_websocket_handshakeresponse_ssl_web.war.sun-web.xml b/tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/wsc_platform_jakarta_websocket_handshakeresponse_ssl_web.war.sun-web.xml similarity index 100% rename from websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/wsc_platform_jakarta_websocket_handshakeresponse_ssl_web.war.sun-web.xml rename to tcks/apis/websocket/platform-tests/src/main/resources/com/sun/ts/tests/websocket/platform/jakarta/websocket/server/handshakerequest/authenticatedssl/wsc_platform_jakarta_websocket_handshakeresponse_ssl_web.war.sun-web.xml diff --git a/websocket/pom.xml b/tcks/apis/websocket/pom.xml similarity index 100% rename from websocket/pom.xml rename to tcks/apis/websocket/pom.xml diff --git a/websocket/spec-tests/pom.xml b/tcks/apis/websocket/spec-tests/pom.xml similarity index 100% rename from websocket/spec-tests/pom.xml rename to tcks/apis/websocket/spec-tests/pom.xml diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/clientendpointconfig/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/clientendpointconfig/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/clientendpointconfig/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/clientendpointconfig/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/closereason/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/closereason/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/closereason/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/closereason/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/decodeexception/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/decodeexception/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/decodeexception/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/decodeexception/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/deploymentException/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/deploymentException/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/deploymentException/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/deploymentException/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/encodeexception/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/encodeexception/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/encodeexception/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/encodeexception/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/TCKEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/TCKEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/TCKEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/TCKEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/server/serverendpointconfig/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/websocketcontainer/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/websocketcontainer/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/websocketcontainer/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/api/jakarta/websocket/websocketcontainer/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/TCKExtension.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedByteBufferClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/AnnotatedStringClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheRequestAdapter.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ApacheResponseAdapter.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/BinaryAndTextClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ByteBufferClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/ClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/EndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/SendMessageCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/StringClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/TextCaser.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketCommonClient.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/client/WebSocketTestCase.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/common.xml b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/common.xml similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/common.xml rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/common.xml diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ClientConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionImpl.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/ExtensionParameterImpl.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPingMessage.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/StringPongMessage.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/impl/WaitingSendHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringInputStream.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/io/StringReader.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBean.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/stringbean/StringBeanTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/BooleanEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ByteDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/ErrorEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/IOUtil.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/MessageValidator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/SessionUtil.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/common/util/StringUtil.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/ClientConfiguratorHolderClientConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/ClientConfiguratorHolderClientConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/ClientConfiguratorHolderClientConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/ClientConfiguratorHolderClientConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/GetNegotiatedSubprotocolConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/GetNegotiatedSubprotocolConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/GetNegotiatedSubprotocolConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/GetNegotiatedSubprotocolConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCCloseClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCCloseClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCCloseClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCCloseClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCConfiguratedClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCConfiguratedClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCConfiguratedClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCConfiguratedClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCErrorClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCErrorClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCErrorClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCErrorClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCMatchedSubprotocolClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCMatchedSubprotocolClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCMatchedSubprotocolClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCMatchedSubprotocolClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCSubprotocolServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCSubprotocolServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCSubprotocolServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCSubprotocolServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCUnmatchedSubprotocolClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCUnmatchedSubprotocolClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCUnmatchedSubprotocolClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSCUnmatchedSubprotocolClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpoint/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryDecoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSBinaryStreamDecoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteArrayPartialClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSByteBufferPartialClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSDefaultMaxLengthClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSDefaultMaxLengthClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSDefaultMaxLengthClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSDefaultMaxLengthClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullBooleanClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullByteClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullCharClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullDoubleClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullFloatClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullIntClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullLongClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSFullShortClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSInputStreamClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSMaxLengthClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSMaxLengthClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSMaxLengthClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSMaxLengthClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPongMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveBooleanClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveByteClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveCharClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveDoubleClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveFloatClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveIntClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveLongClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSPrimitiveShortClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSReaderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSStringPartialClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextDecoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderAndSessionClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderAndSessionClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderAndSessionClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderAndSessionClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointonmessage/WSTextStreamDecoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryEncoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryEncoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryEncoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryEncoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryStreamEncoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryStreamEncoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryStreamEncoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCBinaryStreamEncoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteArrayClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteArrayClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteArrayClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteArrayClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteBufferClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteBufferClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteBufferClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCByteBufferClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullBooleanClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullBooleanClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullBooleanClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullBooleanClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullByteClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullByteClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullByteClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullByteClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullCharClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullCharClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullCharClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullCharClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullDoubleClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullDoubleClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullDoubleClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullDoubleClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullFloatClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullFloatClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullFloatClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullFloatClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullIntClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullIntClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullIntClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullIntClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullLongClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullLongClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullLongClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullLongClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullShortClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullShortClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullShortClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCFullShortClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveBooleanClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveBooleanClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveBooleanClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveBooleanClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveByteClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveByteClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveByteClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveByteClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveCharClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveCharClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveCharClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveCharClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveDoubleClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveDoubleClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveDoubleClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveDoubleClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveFloatClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveFloatClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveFloatClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveFloatClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveIntClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveIntClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveIntClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveIntClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveLongClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveLongClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveLongClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveLongClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveShortClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveShortClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveShortClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCPrimitiveShortClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextEncoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextEncoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextEncoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextEncoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextStreamEncoderClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextStreamEncoderClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextStreamEncoderClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSCTextStreamEncoderClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointreturntype/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/InitDestroyTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/Logger.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/Logger.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/Logger.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/Logger.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoders.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoders.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoders.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryDecoders.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoders.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoders.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoders.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextDecoders.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCEndpointWithTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCIDTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCLoggerServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCLoggerServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCLoggerServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCLoggerServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleBinaryEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleBinaryEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleBinaryEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleBinaryEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSCSimpleEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSIDTextEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSIDTextEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSIDTextEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSIDTextEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WSWillDecodeTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeFirstTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/coder/WillDecodeSecondTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/LibrariedQuestionaire.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/LibrariedQuestionaire.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/LibrariedQuestionaire.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/LibrariedQuestionaire.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKClassLoader.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKClassLoader.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKClassLoader.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKClassLoader.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKContainerProvider.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKContainerProvider.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKContainerProvider.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKContainerProvider.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKWebSocketContainer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKWebSocketContainer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKWebSocketContainer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/TCKWebSocketContainer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/vi/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCCloseClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCCloseClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCCloseClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCCloseClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCErrorClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCErrorClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCErrorClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSCErrorClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/client/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCCloseServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCCloseServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCCloseServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCCloseServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCErrorServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCErrorServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCErrorServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCErrorServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCMsgServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCMsgServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCMsgServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSCMsgServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/endpoint/server/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/EchoConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/EchoConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/EchoConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/EchoConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/SetHeadersConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/SetHeadersConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/SetHeadersConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/SetHeadersConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCSetHeadersServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCSetHeadersServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCSetHeadersServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/handshakeresponse/WSCSetHeadersServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryEncoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryEncoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryEncoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryEncoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamEncoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamEncoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamEncoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/BinaryStreamEncoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextEncoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextEncoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextEncoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextEncoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamEncoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamEncoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamEncoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/TextStreamEncoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSCWillDecodeTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSProgramaticClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSProgramaticClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSProgramaticClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WSProgramaticClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeBinaryDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeBinaryDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeBinaryDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeBinaryDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeTextDecoderEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeTextDecoderEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeTextDecoderEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/programaticcoder/WillDecodeTextDecoderEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/PongMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/PongMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/PongMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/PongMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/AsyncEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/AsyncEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/AsyncEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/AsyncEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/PokingEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/PokingEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/PokingEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/PokingEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingBinaryCoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingBinaryCoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingBinaryCoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingBinaryCoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBean.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBean.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBean.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBean.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBeanEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBeanEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBeanEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingStringBeanEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingTextCoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingTextCoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingTextCoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/ThrowingTextCoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCOtherSideServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCOtherSideServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCOtherSideServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCOtherSideServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCServerSideServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCServerSideServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCServerSideServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCServerSideServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCThrowingServerSideServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCThrowingServerSideServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCThrowingServerSideServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSCThrowingServerSideServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/async/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/BasicEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/BasicEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/BasicEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/BasicEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/HolderForThrowingEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/HolderForThrowingEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/HolderForThrowingEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/HolderForThrowingEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/PokingEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/PokingEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/PokingEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/PokingEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/ThrowingEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/ThrowingEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/ThrowingEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/ThrowingEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCOtherSideServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCOtherSideServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCOtherSideServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCOtherSideServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCServerSideServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCServerSideServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCServerSideServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSCServerSideServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/basic/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderBool.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderBool.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderBool.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderBool.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderChar.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderChar.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderChar.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderChar.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderDouble.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderDouble.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderDouble.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderDouble.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderFloat.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderFloat.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderFloat.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderFloat.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderInt.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderInt.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderInt.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderInt.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderLong.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderLong.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderLong.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderLong.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderShort.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderShort.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderShort.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryCoderShort.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderBool.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderBool.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderBool.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderBool.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderChar.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderChar.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderChar.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderChar.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderDouble.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderDouble.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderDouble.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderDouble.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderFloat.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderFloat.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderFloat.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderFloat.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderInt.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderInt.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderInt.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderInt.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderLong.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderLong.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderLong.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderLong.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderShort.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderShort.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderShort.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/BinaryStreamCoderShort.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClass.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClass.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClass.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClass.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinary.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinary.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinary.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinary.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinaryStream.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinaryStream.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinaryStream.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassBinaryStream.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassText.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassText.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassText.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassText.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassTextStream.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassTextStream.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassTextStream.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/CoderSuperClassTextStream.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderBool.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderBool.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderBool.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderBool.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderChar.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderChar.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderChar.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderChar.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderDouble.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderDouble.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderDouble.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderDouble.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderFloat.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderFloat.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderFloat.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderFloat.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderInt.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderInt.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderInt.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderInt.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderLong.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderLong.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderLong.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderLong.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderShort.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderShort.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderShort.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextCoderShort.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderBool.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderBool.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderBool.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderBool.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderChar.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderChar.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderChar.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderChar.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderDouble.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderDouble.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderDouble.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderDouble.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderFloat.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderFloat.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderFloat.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderFloat.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderInt.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderInt.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderInt.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderInt.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderLong.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderLong.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderLong.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderLong.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderShort.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderShort.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderShort.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/TextStreamCoderShort.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryStreamClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryStreamClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryStreamClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCBinaryStreamClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCSuperEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCSuperEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCSuperEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCSuperEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextStreamClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextStreamClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextStreamClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/WSCTextStreamClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/AsyncEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/AsyncEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/AsyncEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/AsyncEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCBinaryStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCCommonServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCCommonServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCCommonServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCCommonServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSCTextStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/async/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/AsyncEndpointCallback.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/AsyncEndpointCallback.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/AsyncEndpointCallback.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/AsyncEndpointCallback.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCBinaryStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCCommonServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCCommonServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCCommonServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCCommonServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSCTextStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/asyncwithhandler/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCBinaryStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCCommonServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCCommonServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCCommonServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCCommonServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSCTextStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/remoteendpoint/usercoder/basic/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/CaseInsensitiveHeaderNamesConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/CaseInsensitiveHeaderNamesConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/CaseInsensitiveHeaderNamesConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/CaseInsensitiveHeaderNamesConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetQueryStringConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetQueryStringConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetQueryStringConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetQueryStringConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetRequestUriConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetRequestUriConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetRequestUriConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetRequestUriConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetUserPrincipalNotAuthenticatedConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetUserPrincipalNotAuthenticatedConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetUserPrincipalNotAuthenticatedConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/GetUserPrincipalNotAuthenticatedConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/IsUserInRoleNotAuthenticatedConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/IsUserInRoleNotAuthenticatedConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/IsUserInRoleNotAuthenticatedConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/IsUserInRoleNotAuthenticatedConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/PathParamConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/PathParamConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/PathParamConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/PathParamConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetHeadersConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetHeadersConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetHeadersConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetHeadersConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetParamsConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetParamsConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetParamsConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/ReadonlyGetParamsConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCCaseInsensitiveHeaderNamesServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCCaseInsensitiveHeaderNamesServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCCaseInsensitiveHeaderNamesServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCCaseInsensitiveHeaderNamesServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetOneParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetOneParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetOneParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetOneParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetQueryStringServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetQueryStringServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetQueryStringServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetQueryStringServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetTwoParamsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetTwoParamsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetTwoParamsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetTwoParamsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetUserPrincipalServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetUserPrincipalServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetUserPrincipalServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCGetUserPrincipalServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCIsUserInRoleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCIsUserInRoleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCIsUserInRoleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCIsUserInRoleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetHeadersServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetHeadersServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetHeadersServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetHeadersServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetParameterMapServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetParameterMapServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetParameterMapServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCReadOnlyGetParameterMapServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCRequestUriServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCRequestUriServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCRequestUriServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/handshakerequest/WSCRequestUriServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/OPS.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/OPS.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/OPS.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/OPS.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS0StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS0StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS0StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS0StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS10StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS10StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS10StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS10StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS11StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS11StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS11StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS11StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS1StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS1StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS1StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS1StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2DifferentPathParamsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2DifferentPathParamsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2DifferentPathParamsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2DifferentPathParamsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2FullDifferentPathParamsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2FullDifferentPathParamsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2FullDifferentPathParamsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2FullDifferentPathParamsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS2StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS3StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS3StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS3StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS3StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS4StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS4StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS4StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS4StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS5StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS5StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS5StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS5StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS6StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS6StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS6StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS6StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS7StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS7StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS7StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS7StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS8StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS8StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS8StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS8StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS9StringPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS9StringPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS9StringPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WS9StringPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSDirectLongPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSDirectLongPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSDirectLongPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSDirectLongPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSOnClosePathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSOnClosePathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSOnClosePathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/pathparam/WSOnClosePathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/OtherAppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/OtherAppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/OtherAppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/OtherAppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UnusedServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UnusedServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UnusedServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UnusedServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UsedServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UsedServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UsedServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/UsedServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSConfiguredServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSConfiguredServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSConfiguredServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSConfiguredServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSOtherUsedServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSOtherUsedServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSOtherUsedServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSOtherUsedServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUnusedServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUnusedServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUnusedServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUnusedServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUsedServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUsedServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUsedServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfig/WSUsedServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/OtherAppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/OtherAppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/OtherAppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/OtherAppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/WSLibClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/WSLibClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/WSLibClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverapplicationconfiginlib/WSLibClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/CountingConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/CountingConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/CountingConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/CountingConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/SimpleConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/SimpleConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/SimpleConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/SimpleConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSAbstractServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSAbstractServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSAbstractServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSAbstractServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSConfiguredServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSConfiguredServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSConfiguredServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSConfiguredServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesFirstServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesFirstServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesFirstServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesFirstServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesSecondServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesSecondServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesSecondServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSCountConfiguratorInstancesSecondServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDecodedServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDecodedServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDecodedServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDecodedServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDefaultServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDefaultServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDefaultServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSDefaultServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSEncodedServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSEncodedServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSEncodedServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSEncodedServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSSubprotocoledServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSSubprotocoledServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSSubprotocoledServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpoint/WSSubprotocoledServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ConfiguratorServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ConfiguratorServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ConfiguratorServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ConfiguratorServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ExtensionsServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ExtensionsServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ExtensionsServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ExtensionsServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ServerEndpointConfigConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ServerEndpointConfigConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ServerEndpointConfigConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/ServerEndpointConfigConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/SubprotocolsServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/SubprotocolsServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/SubprotocolsServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/SubprotocolsServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/UserPropertiesServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedConfiguratorServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedConfiguratorServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedConfiguratorServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedConfiguratorServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedSubprotocolsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedSubprotocolsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedSubprotocolsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSAnnotatedSubprotocolsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticConfiguratorServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticConfiguratorServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticConfiguratorServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticConfiguratorServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticExtensionsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticExtensionsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticExtensionsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticExtensionsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticSubprotocolsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticSubprotocolsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticSubprotocolsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticSubprotocolsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticUserPropertiesServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticUserPropertiesServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticUserPropertiesServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/WSProgramaticUserPropertiesServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSCommonServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSCommonServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSCommonServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/builder/WSCommonServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorA.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorA.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorA.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorA.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorB.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorB.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorB.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ContainerDefaultConfiguratorB.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ExtensionsServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetEndpointInstanceConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetEndpointInstanceConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetEndpointInstanceConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetEndpointInstanceConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetNegotiatedSubprotocolConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetNegotiatedSubprotocolConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetNegotiatedSubprotocolConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/GetNegotiatedSubprotocolConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ModifyHandshakeConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ModifyHandshakeConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ModifyHandshakeConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/ModifyHandshakeConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfiguratorReturningFalse.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfiguratorReturningFalse.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfiguratorReturningFalse.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/OriginConfiguratorReturningFalse.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/SubprotocolsServerEndpointConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/SubprotocolsServerEndpointConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/SubprotocolsServerEndpointConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/SubprotocolsServerEndpointConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCExtensionsServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCExtensionsServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCExtensionsServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCExtensionsServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerA.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerA.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerA.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerA.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerB.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerB.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerB.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetContainerDefaultConfiguratorServerB.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetEndpointInstanceServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetEndpointInstanceServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetEndpointInstanceServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCGetEndpointInstanceServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCModifyHandshakeServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCModifyHandshakeServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCModifyHandshakeServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCModifyHandshakeServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalse.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalse.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalse.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalse.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalseConfigurator.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalseConfigurator.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalseConfigurator.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCOriginServerReturningFalseConfigurator.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCSubprotocolServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCSubprotocolServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCSubprotocolServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/server/serverendpointconfig/configurator/WSCSubprotocolServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer1.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer1.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer1.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer1.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer2.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer2.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer2.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSCloseTestServer2.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerPathParam.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerPathParam.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerPathParam.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerPathParam.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerString.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerString.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerString.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/WSTestServerString.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedBinaryClient.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedBinaryClient.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedBinaryClient.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedBinaryClient.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedTextClient.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedTextClient.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedTextClient.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedTextClient.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedThrowingClient.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedThrowingClient.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedThrowingClient.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/AnnotatedThrowingClient.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteArrayPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ByteBufferPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/InputStreamMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/InputStreamMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/InputStreamMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/InputStreamMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/LinkedListHashSetMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/LinkedListHashSetMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/LinkedListHashSetMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/LinkedListHashSetMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/MixedProgramaticEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/MixedProgramaticEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/MixedProgramaticEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/MixedProgramaticEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/PongMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/PongMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/PongMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/PongMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ReaderMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ReaderMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ReaderMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/ReaderMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringBeanMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringBeanMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringBeanMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringBeanMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringListWholeMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringListWholeMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringListWholeMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringListWholeMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringTextMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringTextMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringTextMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/StringTextMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCBinaryEchoServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCBinaryEchoServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCBinaryEchoServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCBinaryEchoServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCEchoServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCEchoServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCEchoServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/client/WSCEchoServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeInputStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeInputStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeInputStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeInputStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeReaderDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeReaderDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeReaderDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/AlternativeReaderDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/LinkedListHashSetTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/LinkedListHashSetTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/LinkedListHashSetTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/LinkedListHashSetTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/ListHashSetTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/ListHashSetTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/ListHashSetTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/ListHashSetTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringLinkedList.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringLinkedList.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringLinkedList.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringLinkedList.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringList.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringList.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringList.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringList.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringListTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringListTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringListTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/StringListTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/TypeEnum.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/TypeEnum.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/TypeEnum.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/common/TypeEnum.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteArrayPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ByteBufferPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/InputStreamMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/InputStreamMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/InputStreamMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/InputStreamMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/LinkedListHashSetMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/LinkedListHashSetMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/LinkedListHashSetMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/LinkedListHashSetMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/PongMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/PongMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/PongMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/PongMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ReaderMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ReaderMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ReaderMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/ReaderMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringBeanMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringBeanMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringBeanMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringBeanMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringListWholeMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringListWholeMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringListWholeMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringListWholeMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringPartialMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringPartialMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringPartialMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringPartialMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringWholeMessageHandler.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringWholeMessageHandler.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringWholeMessageHandler.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/StringWholeMessageHandler.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedBinaryServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedBinaryServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedBinaryServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedBinaryServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedMixedServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedMixedServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedMixedServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedMixedServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedTextServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedTextServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedTextServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCAnnotatedTextServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/session11/server/WSCServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingIOTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/ThrowingTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithIOTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamDecoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamDecoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamDecoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamDecoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCClientEndpointWithTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCIOTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOBinaryStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOBinaryStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOBinaryStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOBinaryStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithIOTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextStreamEncoder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextStreamEncoder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextStreamEncoder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningClientEndpointWithTextStreamEncoder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningIOTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCReturningTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleBinaryEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleBinaryEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleBinaryEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleBinaryEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleEchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleEchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleEchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCSimpleEchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSCTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/throwingcoder/annotated/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSBinaryStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayPartialServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteArrayServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferPartialServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSByteBufferServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSDefaultMaxLengthServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSDefaultMaxLengthServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSDefaultMaxLengthServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSDefaultMaxLengthServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullBooleanServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullByteServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullCharServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullDoubleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullFloatServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullIntServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullLongServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSFullShortServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSInputStreamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSMaxLengthServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSMaxLengthServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSMaxLengthServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSMaxLengthServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPongMessageServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveBooleanServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveByteServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndPatahParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndPatahParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndPatahParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndPatahParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveCharServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveDoubleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveFloatServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveIntServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveLongServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSPrimitiveShortServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSReaderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringPartialServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSStringServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionAndPathParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionAndPathParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionAndPathParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionAndPathParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderAndSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessage/WSTextStreamDecoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSBinaryStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteArrayServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteArrayServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteArrayServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteArrayServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteBufferServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteBufferServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteBufferServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSByteBufferServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSDirectByteBufferServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSDirectByteBufferServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSDirectByteBufferServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSDirectByteBufferServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullBooleanServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullBooleanServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullBooleanServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullBooleanServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullByteServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullByteServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullByteServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullByteServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullCharServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullCharServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullCharServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullCharServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullDoubleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullDoubleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullDoubleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullDoubleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullFloatServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullFloatServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullFloatServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullFloatServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullIntServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullIntServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullIntServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullIntServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullLongServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullLongServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullLongServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullLongServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullShortServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullShortServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullShortServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSFullShortServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveBooleanServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveBooleanServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveBooleanServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveBooleanServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveByteServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveByteServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveByteServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveByteServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveCharServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveCharServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveCharServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveCharServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveDoubleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveDoubleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveDoubleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveDoubleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveFloatServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveFloatServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveFloatServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveFloatServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveIntServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveIntServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveIntServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveIntServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveLongServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveLongServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveLongServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveLongServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveShortServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveShortServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveShortServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSPrimitiveShortServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextStreamEncoderServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextStreamEncoderServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextStreamEncoderServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketmessagereturntype/WSTextStreamEncoderServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/lib/implementation/sun/common/SunRIURL.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/lib/implementation/sun/common/SunRIURL.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/lib/implementation/sun/common/SunRIURL.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/lib/implementation/sun/common/SunRIURL.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/EchoServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/EchoServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/EchoServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/EchoServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/NegativeDeploymentClient.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/NegativeDeploymentClient.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/NegativeDeploymentClient.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/NegativeDeploymentClient.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/StringHolder.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/StringHolder.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/StringHolder.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/StringHolder.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/OnCloseStringHolderServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/OnCloseStringHolderServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/OnCloseStringHolderServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/OnCloseStringHolderServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onclose/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/OnErrorServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/OnErrorServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/OnErrorServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/OnErrorServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onerror/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onmessage/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/OnOpenServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/OnOpenServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/OnOpenServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/OnOpenServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/pasrv/onopen/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/OnCloseStringHolderServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/OnCloseStringHolderServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/OnCloseStringHolderServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/OnCloseStringHolderServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onclose/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/OnErrorStringHolderServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/OnErrorStringHolderServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/OnErrorStringHolderServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/OnErrorStringHolderServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onerror/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/OnMessageStringHolderServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/OnMessageStringHolderServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/OnMessageStringHolderServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/OnMessageStringHolderServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onmessage/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/OnOpenStringHolderServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/OnOpenStringHolderServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/OnOpenStringHolderServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/OnOpenStringHolderServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/invalidpathparamtype/srv/onopen/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/MalformedPathServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/MalformedPathServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/MalformedPathServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/MalformedPathServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/malformedpath/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint1.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint1.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint1.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint1.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint2.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint2.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint2.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/SamePathServerEndpoint2.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/multiplepaths/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/AnnotatedOnCloseClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/AnnotatedOnCloseClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/AnnotatedOnCloseClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/AnnotatedOnCloseClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/AnnotatedOnCloseClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/AnnotatedOnCloseClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/AnnotatedOnCloseClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/AnnotatedOnCloseClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/client/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/OnCloseServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/OnCloseServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/OnCloseServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/OnCloseServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/OnCloseServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/OnCloseServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/OnCloseServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/OnCloseServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onclose/srv/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/AnnotatedOnErrorClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/AnnotatedOnErrorClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/AnnotatedOnErrorClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/AnnotatedOnErrorClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/AnnotatedOnErrorClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/AnnotatedOnErrorClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/AnnotatedOnErrorClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/AnnotatedOnErrorClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/client/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/OnErrorServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/OnErrorServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/OnErrorServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/OnErrorServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/OnErrorServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/OnErrorServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/OnErrorServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/OnErrorServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onerror/srv/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binarybytebufferint/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/binaryinputstreamboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/nodecoder/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/pongduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textbigdecimal/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textreaderboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/OnMessageClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/OnMessageClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/OnMessageClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/OnMessageClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/client/textstringint/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/pasrv/nomoreendpoints/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/EchoServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/ppsrv/nomoreendpoints/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarybytebufferint/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binaryinputstreamboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/binarynodecoder/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/pongduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textbigdecimal/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textduplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textnodecoder/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textreaderboolean/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/OnMessageServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/OnMessageServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/OnMessageServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/OnMessageServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onmessage/srv/textstringint/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/AnnotatedOnOpenClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/AnnotatedOnOpenClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/AnnotatedOnOpenClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/AnnotatedOnOpenClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/AnnotatedOnOpenClientEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/AnnotatedOnOpenClientEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/AnnotatedOnOpenClientEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/AnnotatedOnOpenClientEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/client/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/OnOpenServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/OnOpenServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/OnOpenServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/OnOpenServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/duplicate/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/OnOpenServerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/OnOpenServerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/OnOpenServerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/OnOpenServerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/negdep/onopen/srv/toomanyargs/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/signaturetest/WebSocketSigTestIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/signaturetest/WebSocketSigTestIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/signaturetest/WebSocketSigTestIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/signaturetest/WebSocketSigTestIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSubclassWithOverrideAndAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSubclassWithOverrideAndAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSubclassWithOverrideAndAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSubclassWithOverrideAndAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSuperclassWithAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSuperclassWithAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSuperclassWithAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointSuperclassWithAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnCloseAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnCloseAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnCloseAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnCloseAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnErrorAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnErrorAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnErrorAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnErrorAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnMessageAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnMessageAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnMessageAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnMessageAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnOpenAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnOpenAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnOpenAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedClientEndpointWithMultipleOnOpenAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedSubclassEndpointWithoutAnnotations.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedSubclassEndpointWithoutAnnotations.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedSubclassEndpointWithoutAnnotations.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/AnnotatedSubclassEndpointWithoutAnnotations.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/EchoServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/EchoServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/EchoServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/EchoServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/annotation/inheritance/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCCloseSessionServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCCloseSessionServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCCloseSessionServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/closing/WSCCloseSessionServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/containers/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/InnerEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/InnerEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/InnerEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/InnerEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/OuterEndpoint.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/OuterEndpoint.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/OuterEndpoint.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/OuterEndpoint.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCServerLifecycleServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCServerLifecycleServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCServerLifecycleServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/application/lifecycle/WSCServerLifecycleServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ExactServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ExactServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ExactServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ExactServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ParamServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ParamServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ParamServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL1ParamServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2CParamDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2CParamDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2CParamDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2CParamDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2DParamCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2DParamCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2DParamCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2DParamCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ExactCDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ExactCDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ExactCDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ExactCDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ParamCDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ParamCDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ParamCDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL2ParamCDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACDExactServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACDExactServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACDExactServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACDExactServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACParamDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACParamDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACParamDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ACParamDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ADParamCServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ADParamCServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ADParamCServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ADParamCServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3AParamCDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3AParamCDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3AParamCDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3AParamCDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CDParamAServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CDParamAServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CDParamAServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CDParamAServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CParamADServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CParamADServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CParamADServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3CParamADServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3DParamACServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3DParamACServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3DParamACServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3DParamACServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ParamACDServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ParamACDServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ParamACDServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/configuration/urimatching/WSL3ParamACDServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/AppConfig.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/AppConfig.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/AppConfig.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/AppConfig.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TCKWebSocketContainerInitializer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TCKWebSocketContainerInitializer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TCKWebSocketContainerInitializer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TCKWebSocketContainerInitializer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TestListener.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TestListener.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TestListener.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/TestListener.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer1.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer1.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer1.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer1.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer2.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer2.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer2.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSCloseTestServer2.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerByte.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerByte.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerByte.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerByte.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerPathParam.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerPathParam.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerPathParam.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerPathParam.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerString.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerString.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerString.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/WSTestServerString.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServer.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServlet.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServlet.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServlet.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/servercontainer/upgradehttptowebsocket/WSTestServlet.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSClientIT.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSClientIT.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSClientIT.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSClientIT.java diff --git a/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSTestServer.java b/tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSTestServer.java similarity index 100% rename from websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSTestServer.java rename to tcks/apis/websocket/spec-tests/src/main/java/com/sun/ts/tests/websocket/spec/session/sessionid/WSTestServer.java diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/web.xml b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/web.xml similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/web.xml rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/clientendpointconfig/web.xml diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/jakarta.websocket.ContainerProvider b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/jakarta.websocket.ContainerProvider similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/jakarta.websocket.ContainerProvider rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/containerprovider/metainf/jakarta.websocket.ContainerProvider diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/web.xml b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/web.xml similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/web.xml rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/session/web.xml diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/web.xml b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/web.xml similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/web.xml rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/sessionexception/web.xml diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/web.xml b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/web.xml similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/web.xml rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/ee/jakarta/websocket/websocketcontainer/web.xml diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/jakarta.websocket.sig_2.2 b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/jakarta.websocket.sig_2.2 similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/jakarta.websocket.sig_2.2 rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/jakarta.websocket.sig_2.2 diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test-pkg-list.txt b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test-pkg-list.txt similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test-pkg-list.txt rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test-pkg-list.txt diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test.map b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test.map similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test.map rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/signaturetest/sig-test.map diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/jakarta.servlet.ServletContainerInitializer b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/jakarta.servlet.ServletContainerInitializer similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/jakarta.servlet.ServletContainerInitializer rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/servercontainer/addendpoint/jakarta.servlet.ServletContainerInitializer diff --git a/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/session/sessionid/web.xml b/tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/session/sessionid/web.xml similarity index 100% rename from websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/session/sessionid/web.xml rename to tcks/apis/websocket/spec-tests/src/main/resources/com/sun/ts/tests/websocket/spec/session/sessionid/web.xml diff --git a/websocket/tck-dist/artifact-install.sh b/tcks/apis/websocket/tck-dist/artifact-install.sh similarity index 100% rename from websocket/tck-dist/artifact-install.sh rename to tcks/apis/websocket/tck-dist/artifact-install.sh diff --git a/websocket/tck-dist/pom.xml b/tcks/apis/websocket/tck-dist/pom.xml similarity index 100% rename from websocket/tck-dist/pom.xml rename to tcks/apis/websocket/tck-dist/pom.xml diff --git a/websocket/tck-dist/src/main/assembly/assembly.xml b/tcks/apis/websocket/tck-dist/src/main/assembly/assembly.xml similarity index 100% rename from websocket/tck-dist/src/main/assembly/assembly.xml rename to tcks/apis/websocket/tck-dist/src/main/assembly/assembly.xml diff --git a/websocket/tck-dist/src/main/resources/eftl-1.1.adoc b/tcks/apis/websocket/tck-dist/src/main/resources/eftl-1.1.adoc similarity index 100% rename from websocket/tck-dist/src/main/resources/eftl-1.1.adoc rename to tcks/apis/websocket/tck-dist/src/main/resources/eftl-1.1.adoc diff --git a/core-profile-tck/.gitignore b/tcks/profiles/core-profile-tck/.gitignore similarity index 100% rename from core-profile-tck/.gitignore rename to tcks/profiles/core-profile-tck/.gitignore diff --git a/core-profile-tck/LICENSE b/tcks/profiles/core-profile-tck/LICENSE similarity index 100% rename from core-profile-tck/LICENSE rename to tcks/profiles/core-profile-tck/LICENSE diff --git a/core-profile-tck/README.adoc b/tcks/profiles/core-profile-tck/README.adoc similarity index 100% rename from core-profile-tck/README.adoc rename to tcks/profiles/core-profile-tck/README.adoc diff --git a/core-profile-tck/ca-sigtest/pom.xml b/tcks/profiles/core-profile-tck/ca-sigtest/pom.xml similarity index 100% rename from core-profile-tck/ca-sigtest/pom.xml rename to tcks/profiles/core-profile-tck/ca-sigtest/pom.xml diff --git a/core-profile-tck/ca-sigtest/src/main/resources/common-annotations-api.sig b/tcks/profiles/core-profile-tck/ca-sigtest/src/main/resources/common-annotations-api.sig similarity index 100% rename from core-profile-tck/ca-sigtest/src/main/resources/common-annotations-api.sig rename to tcks/profiles/core-profile-tck/ca-sigtest/src/main/resources/common-annotations-api.sig diff --git a/core-profile-tck/cdi-tck-suite/pom.xml b/tcks/profiles/core-profile-tck/cdi-tck-suite/pom.xml similarity index 100% rename from core-profile-tck/cdi-tck-suite/pom.xml rename to tcks/profiles/core-profile-tck/cdi-tck-suite/pom.xml diff --git a/core-profile-tck/cdi-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/util/SuiteLogger.java b/tcks/profiles/core-profile-tck/cdi-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/util/SuiteLogger.java similarity index 100% rename from core-profile-tck/cdi-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/util/SuiteLogger.java rename to tcks/profiles/core-profile-tck/cdi-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/util/SuiteLogger.java diff --git a/core-profile-tck/cdi-tck-suite/src/main/resources/cdi-lite-tck-suite.xml b/tcks/profiles/core-profile-tck/cdi-tck-suite/src/main/resources/cdi-lite-tck-suite.xml similarity index 100% rename from core-profile-tck/cdi-tck-suite/src/main/resources/cdi-lite-tck-suite.xml rename to tcks/profiles/core-profile-tck/cdi-tck-suite/src/main/resources/cdi-lite-tck-suite.xml diff --git a/core-profile-tck/examples/README.adoc b/tcks/profiles/core-profile-tck/examples/README.adoc similarity index 100% rename from core-profile-tck/examples/README.adoc rename to tcks/profiles/core-profile-tck/examples/README.adoc diff --git a/core-profile-tck/jsonp-tck-ext/pom.xml b/tcks/profiles/core-profile-tck/jsonp-tck-ext/pom.xml similarity index 100% rename from core-profile-tck/jsonp-tck-ext/pom.xml rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/pom.xml diff --git a/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/ArquillianExtension.java b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/ArquillianExtension.java similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/ArquillianExtension.java rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/ArquillianExtension.java diff --git a/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/MavenTestDependenciesDeploymentPackager.java b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/MavenTestDependenciesDeploymentPackager.java similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/MavenTestDependenciesDeploymentPackager.java rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/java/ee/jakarta/tck/core/jsonp/arquillian/MavenTestDependenciesDeploymentPackager.java diff --git a/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.jboss.arquillian.core.spi.LoadableExtension diff --git a/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension diff --git a/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/PropertyKeys.java b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/PropertyKeys.java similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/PropertyKeys.java rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/PropertyKeys.java diff --git a/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/Utils.java b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/Utils.java similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/Utils.java rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/maven/resolver/Utils.java diff --git a/core-profile-tck/jsonp-tck-ext/src/test/java/shrinkwrap/JsonpTckArtifactTest.java b/tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/shrinkwrap/JsonpTckArtifactTest.java similarity index 100% rename from core-profile-tck/jsonp-tck-ext/src/test/java/shrinkwrap/JsonpTckArtifactTest.java rename to tcks/profiles/core-profile-tck/jsonp-tck-ext/src/test/java/shrinkwrap/JsonpTckArtifactTest.java diff --git a/core-profile-tck/pom.xml b/tcks/profiles/core-profile-tck/pom.xml similarity index 100% rename from core-profile-tck/pom.xml rename to tcks/profiles/core-profile-tck/pom.xml diff --git a/core-profile-tck/restful-tck-suite/pom.xml b/tcks/profiles/core-profile-tck/restful-tck-suite/pom.xml similarity index 100% rename from core-profile-tck/restful-tck-suite/pom.xml rename to tcks/profiles/core-profile-tck/restful-tck-suite/pom.xml diff --git a/core-profile-tck/restful-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/rs/CoreProfileRestTCKSuite.java b/tcks/profiles/core-profile-tck/restful-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/rs/CoreProfileRestTCKSuite.java similarity index 100% rename from core-profile-tck/restful-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/rs/CoreProfileRestTCKSuite.java rename to tcks/profiles/core-profile-tck/restful-tck-suite/src/main/java/ee/jakarta/tck/coreprofile/rs/CoreProfileRestTCKSuite.java diff --git a/core-profile-tck/restful-tck-suite/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension b/tcks/profiles/core-profile-tck/restful-tck-suite/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension similarity index 100% rename from core-profile-tck/restful-tck-suite/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension rename to tcks/profiles/core-profile-tck/restful-tck-suite/src/main/resources/META-INF/services/org.junit.jupiter.api.extension.Extension diff --git a/core-profile-tck/tck-dist/EFTL.adoc b/tcks/profiles/core-profile-tck/tck-dist/EFTL.adoc similarity index 100% rename from core-profile-tck/tck-dist/EFTL.adoc rename to tcks/profiles/core-profile-tck/tck-dist/EFTL.adoc diff --git a/core-profile-tck/tck-dist/README.adoc b/tcks/profiles/core-profile-tck/tck-dist/README.adoc similarity index 100% rename from core-profile-tck/tck-dist/README.adoc rename to tcks/profiles/core-profile-tck/tck-dist/README.adoc diff --git a/core-profile-tck/tck-dist/RELEASE-NOTES.adoc b/tcks/profiles/core-profile-tck/tck-dist/RELEASE-NOTES.adoc similarity index 100% rename from core-profile-tck/tck-dist/RELEASE-NOTES.adoc rename to tcks/profiles/core-profile-tck/tck-dist/RELEASE-NOTES.adoc diff --git a/core-profile-tck/tck-dist/apl.txt b/tcks/profiles/core-profile-tck/tck-dist/apl.txt similarity index 100% rename from core-profile-tck/tck-dist/apl.txt rename to tcks/profiles/core-profile-tck/tck-dist/apl.txt diff --git a/core-profile-tck/tck-dist/pom.xml b/tcks/profiles/core-profile-tck/tck-dist/pom.xml similarity index 99% rename from core-profile-tck/tck-dist/pom.xml rename to tcks/profiles/core-profile-tck/tck-dist/pom.xml index 6590e83705..f4b21bd0a8 100644 --- a/core-profile-tck/tck-dist/pom.xml +++ b/tcks/profiles/core-profile-tck/tck-dist/pom.xml @@ -25,7 +25,7 @@ 3.1.0 - 2.3.18 + 2.3.19 3.0.0 core-profile-tck-reference-guide 11.0 diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/appeals-process.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/configuration.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/configuration.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/configuration.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/configuration.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/executing.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/executing.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/executing.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/executing.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/installation.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/installation.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/installation.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/installation.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/introduction.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/introduction.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/introduction.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/introduction.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/reporting.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/reporting.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/reporting.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/reporting.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/sigtest.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/asciidoc/tck-reference-guide.asciidoc b/tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/tck-reference-guide.asciidoc similarity index 100% rename from core-profile-tck/tck-dist/src/main/asciidoc/tck-reference-guide.asciidoc rename to tcks/profiles/core-profile-tck/tck-dist/src/main/asciidoc/tck-reference-guide.asciidoc diff --git a/core-profile-tck/tck-dist/src/main/assembly/assembly.xml b/tcks/profiles/core-profile-tck/tck-dist/src/main/assembly/assembly.xml similarity index 100% rename from core-profile-tck/tck-dist/src/main/assembly/assembly.xml rename to tcks/profiles/core-profile-tck/tck-dist/src/main/assembly/assembly.xml diff --git a/core-profile-tck/tck-dist/src/main/resources/artifacts-pom.xml b/tcks/profiles/core-profile-tck/tck-dist/src/main/resources/artifacts-pom.xml similarity index 100% rename from core-profile-tck/tck-dist/src/main/resources/artifacts-pom.xml rename to tcks/profiles/core-profile-tck/tck-dist/src/main/resources/artifacts-pom.xml diff --git a/core-profile-tck/tck/pom.xml b/tcks/profiles/core-profile-tck/tck/pom.xml similarity index 100% rename from core-profile-tck/tck/pom.xml rename to tcks/profiles/core-profile-tck/tck/pom.xml diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java similarity index 69% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java index 413912167c..04912d0064 100644 --- a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java +++ b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/common/Utils.java @@ -1,5 +1,5 @@ /* - * Copyright (c) "2022" Red Hat and others + * Copyright (c) "2022", "2025" Red Hat and others * * This program and the accompanying materials are made available under the * Apache Software License 2.0 which is available at: @@ -17,7 +17,7 @@ public class Utils { private static final Stack callStack = new Stack<>(); public static void pushMethod() { - StackWalker walker = StackWalker.getInstance(); + StackWalker walker = StackWalker.getInstance(StackWalker.Option.RETAIN_CLASS_REFERENCE); Optional methodName = walker.walk(frames -> frames .skip(1) .findFirst() @@ -25,7 +25,11 @@ public static void pushMethod() { callStack.push(methodName.get()); } private static String getMethodInfo(StackWalker.StackFrame frame) { - return frame.getMethodName() + frame.getDescriptor(); + try { + return frame.getMethodName() + frame.getDescriptor(); + } catch (Exception e) { + throw new IllegalArgumentException("Cannot access frame: " + frame, e); + } } public static String popStack() { return callStack.pop(); diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/ApplicationJsonpIT.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/ApplicationJsonpIT.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/ApplicationJsonpIT.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/ApplicationJsonpIT.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/CustomJsonProvider.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/CustomJsonProvider.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/CustomJsonProvider.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/CustomJsonProvider.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/JsonProviderProducer.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/JsonProviderProducer.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/JsonProviderProducer.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/json/JsonProviderProducer.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbBuilder.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbBuilder.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbBuilder.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbBuilder.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbProvider.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbProvider.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbProvider.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/CustomJsonbProvider.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbApplicationIT.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbApplicationIT.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbApplicationIT.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbApplicationIT.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbProviderProducer.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbProviderProducer.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbProviderProducer.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/jsonb/JsonbProviderProducer.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/JaxRsActivator.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/JaxRsActivator.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/JaxRsActivator.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/JaxRsActivator.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationContextIT.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationContextIT.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationContextIT.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationContextIT.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationResource.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationResource.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationResource.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/ApplicationResource.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/SimpleApplicationBean.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/SimpleApplicationBean.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/SimpleApplicationBean.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/context/app/SimpleApplicationBean.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/ApplicationResource.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/ApplicationResource.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/ApplicationResource.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/ApplicationResource.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbResolver.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbResolver.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbResolver.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbResolver.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbSerializationIT.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbSerializationIT.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbSerializationIT.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/CustomJsonbSerializationIT.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/KeysProducer.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/KeysProducer.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/KeysProducer.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/KeysProducer.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/SomeMessage.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/SomeMessage.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/SomeMessage.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/SomeMessage.java diff --git a/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/Utils.java b/tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/Utils.java similarity index 100% rename from core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/Utils.java rename to tcks/profiles/core-profile-tck/tck/src/main/java/ee/jakarta/tck/core/rest/jsonb/cdi/Utils.java diff --git a/core-profile-tck/tck/src/test/java/keys/KeysTest.java b/tcks/profiles/core-profile-tck/tck/src/test/java/keys/KeysTest.java similarity index 100% rename from core-profile-tck/tck/src/test/java/keys/KeysTest.java rename to tcks/profiles/core-profile-tck/tck/src/test/java/keys/KeysTest.java diff --git a/appclient/pom.xml b/tcks/profiles/platform/appclient/pom.xml similarity index 98% rename from appclient/pom.xml rename to tcks/profiles/platform/appclient/pom.xml index 032a1ddcb4..0ad82da935 100644 --- a/appclient/pom.xml +++ b/tcks/profiles/platform/appclient/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml appclient diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/application.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/META-INF/ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBean.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBean.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBean.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBean.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBeanEJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBeanEJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBeanEJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/TestBeanEJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/appclient_dep_compat9_10_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/application.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/application.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/application.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/application.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/compat9_10/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBean.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBean.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBean.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBean.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBeanEJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBeanEJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBeanEJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/CaseBeanEJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/appclient_dep_ejblink_casesens_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/casesens/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2EJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2EJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2EJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBean2EJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBeanEJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBeanEJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBeanEJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/ReferencedBeanEJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar1_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/appclient_dep_ejblink_path_jar2_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/path/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/appclient_dep_ejblink_single_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejblink/single/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBean.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBean.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBean.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBean.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBeanEJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBeanEJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBeanEJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/ReferencedBeanEJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/appclient_dep_ejbref_casesens_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/casesens/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBean.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBean.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBean.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBean.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBeanEJB.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBeanEJB.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBeanEJB.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/ReferencedBeanEJB.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_another_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/appclient_dep_ejbref_scope_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/scope/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.jar.sun-ejb-jar.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/appclient_dep_ejbref_single_ejb.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/ejbref/single/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/appclient_dep_enventry_casesens_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/appclient_dep_enventry_casesens_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/appclient_dep_enventry_casesens_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/appclient_dep_enventry_casesens_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/casesens/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_another_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_another_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_another_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_another_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/appclient_dep_enventry_scope_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/scope/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/appclient_dep_enventry_single_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/appclient_dep_enventry_single_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/appclient_dep_enventry_single_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/appclient_dep_enventry_single_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/enventry/single/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/appclient_dep_resref_casesens_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/casesens/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/TopicClient.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/TopicClient.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/TopicClient.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/TopicClient.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_another_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/appclient_dep_resref_scope_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/scope/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/Client.java b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/Client.java similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/Client.java rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/Client.java diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.jar.sun-application-client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.jar.sun-application-client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.jar.sun-application-client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.jar.sun-application-client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_client.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_jsp_web.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_jsp_web.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_jsp_web.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/appclient_dep_resref_single_jsp_web.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/build.xml b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/build.xml similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/build.xml rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/build.xml diff --git a/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/contentRoot/test.jsp b/tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/contentRoot/test.jsp similarity index 100% rename from appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/contentRoot/test.jsp rename to tcks/profiles/platform/appclient/src/main/java/com/sun/ts/tests/appclient/deploy/resref/single/contentRoot/test.jsp diff --git a/assembly/pom.xml b/tcks/profiles/platform/assembly/pom.xml similarity index 98% rename from assembly/pom.xml rename to tcks/profiles/platform/assembly/pom.xml index 963c0aa9e2..ffe33b3943 100644 --- a/assembly/pom.xml +++ b/tcks/profiles/platform/assembly/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml assembly-tck diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/PainterBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/application.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/application.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/application.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/application.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/altDD/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/altDD/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/application.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/application.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/application.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/application.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/appclient/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/MY_MANIFEST.MF b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/MY_MANIFEST.MF similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/MY_MANIFEST.MF rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/MY_MANIFEST.MF diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/TestBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/application.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/application.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/application.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/application.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/ejb/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/ClassPathUtil.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/ClassPathUtil.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/ClassPathUtil.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/ClassPathUtil.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/IndirectClassPathUtil.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/IndirectClassPathUtil.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/IndirectClassPathUtil.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/IndirectClassPathUtil.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/MY_MANIFEST.MF b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/MY_MANIFEST.MF similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/MY_MANIFEST.MF rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/MY_MANIFEST.MF diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/META-INF/ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/libs/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/libs/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/libs/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/classpath/util/libs/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/ReferencedBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/TestBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/TestBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBean.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBean.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBean.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBean.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBeanEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBeanEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBeanEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/TestBeanEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/jar/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/Client.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/Client.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/Client.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/Client.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/standalone/war/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternal.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternal.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternal.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternal.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternalEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternalEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternalEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulExternalEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternal.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternal.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternal.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternal.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternalEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternalEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternalEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatefulInternalEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternal.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternal.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternal.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternal.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternalEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternalEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternalEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessExternalEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternal.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternal.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternal.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternal.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternalEJB.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternalEJB.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternalEJB.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/StatelessInternalEJB.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/refbean/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/ReferencedBeanCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/ReferencedBeanCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/ReferencedBeanCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/ReferencedBeanCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/common/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/ejbref/single/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/casesens/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/scope/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/enventry/single/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/casesens/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/QueueCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/QueueCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/QueueCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/QueueCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/TopicCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/TopicCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/TopicCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/TopicCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/scope/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/ByteArrayDataSource.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/ByteArrayDataSource.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/ByteArrayDataSource.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/ByteArrayDataSource.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/TestCode.java b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/TestCode.java similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/TestCode.java rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/TestCode.java diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/appclient/build.xml diff --git a/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/build.xml b/tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/build.xml similarity index 100% rename from assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/build.xml rename to tcks/profiles/platform/assembly/src/main/java/com/sun/ts/tests/assembly/util/shared/resref/single/build.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/altDD_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/altDD/assembly_altDD_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/MY_MANIFEST.MF diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/appclient/assembly_classpath_appclient_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/classpath/ejb/assembly_classpath_ejb_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_another_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar1_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/cocktail/compat9_10/assembly_compat_cocktail_compat9_10_jar2_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/assembly_compat_single_compat9_10_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/single/compat9_10/ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_component_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_component_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_component_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/assembly_compat_standalone_jar_compat9_10_component_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/jar/compat9_10/ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/application.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_component_web.war.sun-web.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_component_web.war.sun-web.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_component_web.war.sun-web.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/assembly_compat_standalone_war_compat9_10_component_web.war.sun-web.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/test.jsp diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/compat/standalone/war/compat9_10/web.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.jar.sun-ejb-jar.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/jar/assembly_standalone_jar_component_ejb.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.jar.sun-application-client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.jar.sun-application-client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.jar.sun-application-client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.jar.sun-application-client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_client.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.war.sun-web.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.war.sun-web.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.war.sun-web.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.war.sun-web.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.xml b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.xml similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.xml rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/assembly_standalone_war_component_web.xml diff --git a/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/webFiles/test.jsp b/tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/webFiles/test.jsp similarity index 100% rename from assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/webFiles/test.jsp rename to tcks/profiles/platform/assembly/src/main/resources/com/sun/ts/tests/assembly/standalone/war/webFiles/test.jsp diff --git a/assembly/src/main/resources/util/META-INF/MY_MANIFEST.MF b/tcks/profiles/platform/assembly/src/main/resources/util/META-INF/MY_MANIFEST.MF similarity index 100% rename from assembly/src/main/resources/util/META-INF/MY_MANIFEST.MF rename to tcks/profiles/platform/assembly/src/main/resources/util/META-INF/MY_MANIFEST.MF diff --git a/assembly/src/main/resources/util/META-INF/ejb-jar.xml b/tcks/profiles/platform/assembly/src/main/resources/util/META-INF/ejb-jar.xml similarity index 100% rename from assembly/src/main/resources/util/META-INF/ejb-jar.xml rename to tcks/profiles/platform/assembly/src/main/resources/util/META-INF/ejb-jar.xml diff --git a/integration/pom.xml b/tcks/profiles/platform/integration/pom.xml similarity index 98% rename from integration/pom.xml rename to tcks/profiles/platform/integration/pom.xml index 84996a1287..17501bfc40 100644 --- a/integration/pom.xml +++ b/tcks/profiles/platform/integration/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml integration diff --git a/integration/rewrite-pom.xml b/tcks/profiles/platform/integration/rewrite-pom.xml similarity index 100% rename from integration/rewrite-pom.xml rename to tcks/profiles/platform/integration/rewrite-pom.xml diff --git a/integration/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java similarity index 100% rename from integration/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1EJB.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1EJB.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1EJB.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean1EJB.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2EJB.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2EJB.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2EJB.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Bean2EJB.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Client.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Client.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Client.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/Client.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ClientTest.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ClientTest.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ClientTest.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ClientTest.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ejb_to_ejb.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ejb_to_ejb.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ejb_to_ejb.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/ejb_to_ejb.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation.ear.sun-application.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation.ear.sun-application.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation.ear.sun-application.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation.ear.sun-application.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.jar.sun-ejb-jar.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_ejb.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.war.sun-web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.war.sun-web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.war.sun-web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.war.sun-web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/integration_sec_propagation_web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_auth.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_auth.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_auth.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_auth.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_noauth.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_noauth.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_noauth.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/propagation/web_to_ejb_noauth.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/Client.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/Client.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/Client.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/Client.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/ClientTest.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/ClientTest.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/ClientTest.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/ClientTest.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/authorized.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/authorized.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/authorized.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/authorized.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/basicSSL.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/basicSSL.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/basicSSL.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/basicSSL.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl.ear.sun-application.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl.ear.sun-application.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl.ear.sun-application.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl.ear.sun-application.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl_web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl_web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl_web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/integration_sec_secbasicssl_web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/requestAttributes.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/requestAttributes.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/requestAttributes.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/requestAttributes.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/rolereverse.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/rolereverse.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/rolereverse.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/rolereverse.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webApiRemoteUser1.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webApiRemoteUser1.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webApiRemoteUser1.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webApiRemoteUser1.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNoAuthz.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNoAuthz.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNoAuthz.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNoAuthz.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNotInRole.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNotInRole.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNotInRole.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webNotInRole.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webRoleRefScope1.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webRoleRefScope1.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webRoleRefScope1.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/sec/secbasicssl/webRoleRefScope1.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/AccessJSPBean.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/AccessJSPBean.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/AccessJSPBean.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/AccessJSPBean.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/ClientTest.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/ClientTest.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/ClientTest.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/ClientTest.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/Teller.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/Teller.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/Teller.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/Teller.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/TellerBean.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/TellerBean.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/TellerBean.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/TellerBean.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/URLClient.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/URLClient.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/URLClient.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/URLClient.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/client.html b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/client.html similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/client.html rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/client.html diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejb.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejb.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejb.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejb.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejbother.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejbother.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejbother.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jsp2ejbother.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jspbean2ejb.jsp b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jspbean2ejb.jsp similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jspbean2ejb.jsp rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/contentRoot/jspbean2ejb.jsp diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.jar.sun-ejb-jar.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_ejb.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.war.sun-web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.war.sun-web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.war.sun-web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.war.sun-web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/jspejbjdbc/int_S_jspejbjdbc_web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ClientTest.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ClientTest.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ClientTest.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ClientTest.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ServletTest.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ServletTest.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ServletTest.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/ServletTest.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/Teller.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/Teller.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/Teller.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/Teller.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/TellerBean.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/TellerBean.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/TellerBean.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/TellerBean.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/URLClient.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/URLClient.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/URLClient.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/URLClient.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/build.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/client.html b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/client.html similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/client.html rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/client.html diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/contentRoot/client.html b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/contentRoot/client.html similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/contentRoot/client.html rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/contentRoot/client.html diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.jar.sun-ejb-jar.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_ejb.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.war.sun-web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.war.sun-web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.war.sun-web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.war.sun-web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/session/servletejbjdbc/int_S_servletejbjdbc_servlet_web.xml diff --git a/integration/src/main/java/com/sun/ts/tests/integration/util/Account.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/Account.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/util/Account.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/Account.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/util/DBSupport.java b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/DBSupport.java similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/util/DBSupport.java rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/DBSupport.java diff --git a/integration/src/main/java/com/sun/ts/tests/integration/util/build.xml b/tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/build.xml similarity index 100% rename from integration/src/main/java/com/sun/ts/tests/integration/util/build.xml rename to tcks/profiles/platform/integration/src/main/java/com/sun/ts/tests/integration/util/build.xml diff --git a/javaee/pom.xml b/tcks/profiles/platform/javaee/pom.xml similarity index 98% rename from javaee/pom.xml rename to tcks/profiles/platform/javaee/pom.xml index 88d4520d65..c7cfa0006a 100644 --- a/javaee/pom.xml +++ b/tcks/profiles/platform/javaee/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml javaee-tck diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Bean.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Bean.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Bean.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Bean.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/BeanResource.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/BeanResource.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/BeanResource.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/BeanResource.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Pojo.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Pojo.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Pojo.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/Pojo.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceAppTestServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceAppTestServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceAppTestServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceAppTestServlet.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceCompTestServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceCompTestServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceCompTestServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceCompTestServlet.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceGlobalTestServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceGlobalTestServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceGlobalTestServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceGlobalTestServlet.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceModuleTestServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceModuleTestServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceModuleTestServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceModuleTestServlet.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceUtil.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceUtil.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceUtil.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/ResourceUtil.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/TestServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/TestServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/TestServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/TestServlet.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/URLClientIT.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/URLClientIT.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/URLClientIT.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/URLClientIT.java diff --git a/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/build.xml b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/build.xml similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/build.xml rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/javaee/resource/servlet/build.xml diff --git a/javaee/src/main/java/com/sun/ts/tests/servlet/common/servlets/HttpTCKServlet.java b/tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/servlet/common/servlets/HttpTCKServlet.java similarity index 100% rename from javaee/src/main/java/com/sun/ts/tests/servlet/common/servlets/HttpTCKServlet.java rename to tcks/profiles/platform/javaee/src/main/java/com/sun/ts/tests/servlet/common/servlets/HttpTCKServlet.java diff --git a/jdbc/pom.xml b/tcks/profiles/platform/jdbc/pom.xml similarity index 98% rename from jdbc/pom.xml rename to tcks/profiles/platform/jdbc/pom.xml index a3486069a6..8d44002cbe 100644 --- a/jdbc/pom.xml +++ b/tcks/profiles/platform/jdbc/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml jdbc diff --git a/jdbc/src/main/java/com/sun/ts/lib/tests/jdbc/CS_Procs.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/lib/tests/jdbc/CS_Procs.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/lib/tests/jdbc/CS_Procs.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/lib/tests/jdbc/CS_Procs.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientAppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientAppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientAppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientAppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientEJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientEJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientEJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientEJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientJSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientJSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientJSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientJSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientServlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientServlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientServlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdateClientServlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/batchUpdate_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/batchUpdate/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmt1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/callStmtClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmt10_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/callStmtClient10Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt10/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmt11_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/callStmtClient11Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt11/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmt12_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/callStmtClient12Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt12/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmt13_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/callStmtClient13Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt13/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmt14_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/callStmtClient14Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt14/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmt15_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/callStmtClient15Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt15/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmt16_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/callStmtClient16Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt16/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmt17_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/callStmtClient17Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt17/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmt18_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/callStmtClient18Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt18/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmt19_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/callStmtClient19Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt19/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmt2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/callStmtClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmt20_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/callStmtClient20Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt20/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmt21_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/callStmtClient21Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt21/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmt22_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/callStmtClient22Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt22/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmt3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/callStmtClient3Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmt4_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/callStmtClient4Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt4/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmt5_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/callStmtClient5Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt5/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmt6_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/callStmtClient6Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt6/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmt7_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/callStmtClient7Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt7/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmt8_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/callStmtClient8Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt8/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmt9_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/callStmtClient9Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/callStmt/callStmt9/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DataSourceConnection.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DataSourceConnection.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DataSourceConnection.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DataSourceConnection.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DriverManagerConnection.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DriverManagerConnection.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DriverManagerConnection.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/DriverManagerConnection.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestConnectionManager.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestConnectionManager.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestConnectionManager.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestConnectionManager.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestMsg.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestMsg.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestMsg.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/JDBCTestMsg.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/Utils.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/Utils.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/Utils.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/Utils.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/csSchema.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/csSchema.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/csSchema.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/csSchema.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/dbSchema.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/dbSchema.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/dbSchema.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/dbSchema.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/fnSchema.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/fnSchema.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/fnSchema.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/fnSchema.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/rsSchema.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/rsSchema.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/rsSchema.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/common/rsSchema.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connection1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/connectionClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/connection/connection1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTime1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/dateTimeClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTime2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/dateTimeClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTime3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/dateTimeClient3Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dateTime/dateTime3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMeta1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/dbMetaClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMeta10_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/dbMetaClient10Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta10/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMeta11_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/dbMetaClient11Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta11/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMeta12_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/dbMetaClient12Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta12/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMeta2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/dbMetaClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMeta3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/dbMetaClient3Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMeta4_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/dbMetaClient4Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta4/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMeta5_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/dbMetaClient5Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta5/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMeta6_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/dbMetaClient6Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta6/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMeta7_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/dbMetaClient7Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta7/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMeta8_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/dbMetaClient8Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta8/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMeta9_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/dbMetaClient9Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/dbMeta/dbMeta9/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalar1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/scalarClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalar2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/scalarClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalar3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/scalarClient3Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalar4_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/scalarClient4Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/escapeSyntax/scalar4/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientAppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientAppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientAppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientAppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientEJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientEJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientEJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientEJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientJSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientJSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientJSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientJSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientServlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientServlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientServlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExceptClientServlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/batUpdExcept_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/batUpdExcept/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientAppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientAppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientAppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientAppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientEJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientEJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientEJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientEJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientJSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientJSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientJSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientJSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientServlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientServlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientServlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlExceptionClientServlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/exception/sqlException/sqlException_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmt1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/prepStmtClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmt10_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/prepStmtClient10Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt10/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmt11_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/prepStmtClient11Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt11/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmt12_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/prepStmtClient12Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt12/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmt13_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/prepStmtClient13Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt13/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmt14_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/prepStmtClient14Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt14/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmt15_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/prepStmtClient15Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt15/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmt16_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/prepStmtClient16Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt16/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmt2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/prepStmtClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmt3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/prepStmtClient3Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmt4_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/prepStmtClient4Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt4/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmt5_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/prepStmtClient5Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt5/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmt6_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/prepStmtClient6Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt6/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmt7_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/prepStmtClient7Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt7/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmt8_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/prepStmtClient8Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt8/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmt9_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/prepStmtClient9Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/prepStmt/prepStmt9/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSet1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/resultSetClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSet10_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/resultSetClient10Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet10/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSet11_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/resultSetClient11Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet11/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSet14_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/resultSetClient14Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet14/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSet17_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/resultSetClient17Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet17/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSet18_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/resultSetClient18Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet18/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSet41_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/resultSetClient41Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet41/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSet45_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/resultSetClient45Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet45/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_jsp_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSet47_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/resultSetClient47Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet47/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/begin/begin_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSet49_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/resultSetClient49Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet49/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/commit/commit_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSet7_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/resultSetClient7Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/resultSet/resultSet7/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientAppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientAppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientAppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientAppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientEJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientEJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientEJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientEJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientJSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientJSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientJSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientJSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientServlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientServlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientServlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMetaClientServlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/getstatus/getstatus_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/rsMeta_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/rsMeta/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/rollback/rollback_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmt1_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt1/stmtClient1Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/setrollbackonly/setrollbackonly_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmt2_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt2/stmtClient2Servlet.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/appclient_vehicle_client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/appclient_vehicle_client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/appclient_vehicle_client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/appclient_vehicle_client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/ejb_vehicle_ejb.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/ejb_vehicle_ejb.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/jsp_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/jsp_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/jsp_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/jsp_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/servlet_vehicle_web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/servlet_vehicle_web.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/servlet_vehicle_web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/servlet_vehicle_web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_jsp_vehicle_web.war.sun-web.xml diff --git a/jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from jta/src/main/resources/com/sun/ts/tests/jta/ee/usertransaction/settransactiontimeout/settransactiontimeout_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmt3_servlet_vehicle_web.war.sun-web.xml diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3AppClient.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3AppClient.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3AppClient.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3AppClient.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3EJB.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3EJB.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3EJB.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3EJB.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3JSP.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3JSP.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3JSP.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3JSP.java diff --git a/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3Servlet.java b/tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3Servlet.java similarity index 100% rename from jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3Servlet.java rename to tcks/profiles/platform/jdbc/src/main/java/com/sun/ts/tests/jdbc/ee/stmt/stmt3/stmtClient3Servlet.java diff --git a/jdbc_extras/CS_Procs.java b/tcks/profiles/platform/jdbc_extras/CS_Procs.java similarity index 100% rename from jdbc_extras/CS_Procs.java rename to tcks/profiles/platform/jdbc_extras/CS_Procs.java diff --git a/jdbc_extras/PointbaseProcedures.java b/tcks/profiles/platform/jdbc_extras/PointbaseProcedures.java similarity index 100% rename from jdbc_extras/PointbaseProcedures.java rename to tcks/profiles/platform/jdbc_extras/PointbaseProcedures.java diff --git a/samples/pom.xml b/tcks/profiles/platform/samples/pom.xml similarity index 98% rename from samples/pom.xml rename to tcks/profiles/platform/samples/pom.xml index 7bbfe835de..7edf67e511 100644 --- a/samples/pom.xml +++ b/tcks/profiles/platform/samples/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml samples diff --git a/samples/src/main/java/com/sun/ts/tests/samples/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/Hello.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/Hello.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/Hello.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/Hello.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloClient.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloClient.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloClient.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloClient.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloEJB.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloEJB.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloEJB.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/HelloEJB.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.jar.sun-application-client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.jar.sun-application-client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.jar.sun-application-client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.jar.sun-application-client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.jar.sun-ejb-jar.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/simpleHello/ejb_sam_Hello_ejb.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1EJB.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1EJB.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1EJB.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean1EJB.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2EJB.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2EJB.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2EJB.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TestBean2EJB.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TwoBeanClient.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TwoBeanClient.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TwoBeanClient.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/TwoBeanClient.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.jar.sun-application-client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.jar.sun-application-client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.jar.sun-application-client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.jar.sun-application-client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.jar.sun-ejb-jar.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/ejb/ee/twobean/ejb_sam_twobean_ejb.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/appclient_vehicle_client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/appclient_vehicle_client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/appclient_vehicle_client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/appclient_vehicle_client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/ejb_vehicle_ejb.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/ejb_vehicle_ejb.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/ejb_vehicle_ejb.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/jsp_vehicle_web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/jsp_vehicle_web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/jsp_vehicle_web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/jsp_vehicle_web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/send_Test.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/send_Test.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/send_Test.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/send_Test.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/servlet_vehicle_web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/servlet_vehicle_web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/servlet_vehicle_web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/servlet_vehicle_web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_jsp_vehicle_web.war.sun-web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/javamail/ee/transport/transport_servlet_vehicle_web.war.sun-web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/appclient_vehicle_client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/appclient_vehicle_client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/appclient_vehicle_client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/appclient_vehicle_client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/build.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/build.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/build.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/build.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/ejb_vehicle_ejb.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/ejb_vehicle_ejb.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/ejb_vehicle_ejb.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/jsp_vehicle_web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/jsp_vehicle_web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/jsp_vehicle_web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/jsp_vehicle_web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/servlet_vehicle_web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/servlet_vehicle_web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/servlet_vehicle_web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/servlet_vehicle_web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient.java b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient.java similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient.java rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient.java diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_appclient_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_appclient_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_appclient_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_appclient_vehicle_client.jar.sun-application-client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_web_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_web_vehicle_web.war.sun-web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_web_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/testConnClient_web_vehicle_web.war.sun-web.xml diff --git a/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/web_vehicle_web.xml b/tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/web_vehicle_web.xml similarity index 100% rename from samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/web_vehicle_web.xml rename to tcks/profiles/platform/samples/src/main/java/com/sun/ts/tests/samples/jdbc/ee/testConn/web_vehicle_web.xml diff --git a/xa/pom.xml b/tcks/profiles/platform/xa/pom.xml similarity index 98% rename from xa/pom.xml rename to tcks/profiles/platform/xa/pom.xml index a8924d43e1..9114b9b5cc 100644 --- a/xa/pom.xml +++ b/tcks/profiles/platform/xa/pom.xml @@ -24,6 +24,7 @@ jakarta.tck project 11.0.0-SNAPSHOT + ../../../../pom.xml xa diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/Client.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/Client.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/Client.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/Client.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientJSP.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientJSP.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientJSP.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientJSP.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientServletTest.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientServletTest.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientServletTest.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ClientServletTest.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBean.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBean.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBean.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBean.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBeanEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBeanEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBeanEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/TxBeanEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ejb_vehicle_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/ejb_vehicle_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/jsp_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/jsp_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/jsp_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/jsp_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/servlet_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/servlet_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/servlet_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/servlet_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/txbean_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/txbean_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/txbean_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/txbean_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate1_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate2_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ee_txpropagate3_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_jsp_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp1/xa_resXcomp1_servlet_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Client.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Client.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Client.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Client.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientJSP.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientJSP.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientJSP.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientJSP.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientServlet.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientServlet.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientServlet.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ClientServlet.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb1TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/Ejb2TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb1test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb1test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb1test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb1test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb2test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb2test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb2test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb2test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb_vehicle_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/ejb_vehicle_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/jsp_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/jsp_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/jsp_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/jsp_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/servlet_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/servlet_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/servlet_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/servlet_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate1_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate2_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ee_txpropagate3_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_jsp_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp2/xa_resXcomp2_servlet_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Client.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Client.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Client.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Client.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientJSP.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientJSP.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientJSP.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientJSP.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientServlet.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientServlet.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientServlet.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ClientServlet.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb1TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/Ejb2TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb1test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb1test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb1test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb1test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb2test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb2test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb2test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb2test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb_vehicle_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb_vehicle_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/ejb_vehicle_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/jsp_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/jsp_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/jsp_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/jsp_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/servlet_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/servlet_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/servlet_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/servlet_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate1_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate2_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ee_txpropagate3_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_jsp_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/resXcomp3/xa_resXcomp3_servlet_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Client.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Client.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Client.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Client.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientJSP.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientJSP.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientJSP.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientJSP.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientServlet.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientServlet.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientServlet.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ClientServlet.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/Ejb1TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb1test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb1test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb1test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb1test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb_vehicle_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb_vehicle_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/ejb_vehicle_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/jsp_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/jsp_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/jsp_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/jsp_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/servlet_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/servlet_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/servlet_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/servlet_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate1_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate2_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ee_txpropagate3_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_jsp_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp1/xa_xresXcomp1_servlet_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Client.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Client.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Client.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Client.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientJSP.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientJSP.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientJSP.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientJSP.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientServlet.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientServlet.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientServlet.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ClientServlet.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb1TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2Test.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2Test.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2Test.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2Test.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2TestEJB.java b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2TestEJB.java similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2TestEJB.java rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/Ejb2TestEJB.java diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb1test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb1test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb1test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb1test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb2test_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb2test_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb2test_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb2test_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb_vehicle_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb_vehicle_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb_vehicle_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/ejb_vehicle_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/jsp_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/jsp_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/jsp_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/jsp_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/servlet_vehicle_web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/servlet_vehicle_web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/servlet_vehicle_web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/servlet_vehicle_web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate1_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate2_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ee_txpropagate3_ejb.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_client.jar.sun-application-client.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_client.jar.sun-application-client.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_client.jar.sun-application-client.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_jsp_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_jsp_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_jsp_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_jsp_vehicle_web.war.sun-web.xml diff --git a/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_servlet_vehicle_web.war.sun-web.xml b/tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_servlet_vehicle_web.war.sun-web.xml similarity index 100% rename from xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_servlet_vehicle_web.war.sun-web.xml rename to tcks/profiles/platform/xa/src/main/java/com/sun/ts/tests/xa/ee/xresXcomp2/xa_xresXcomp2_servlet_vehicle_web.war.sun-web.xml diff --git a/common/pom.xml b/tools/common/pom.xml similarity index 69% rename from common/pom.xml rename to tools/common/pom.xml index be4af769d7..6ca46b0875 100644 --- a/common/pom.xml +++ b/tools/common/pom.xml @@ -17,69 +17,91 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + 4.0.0 + - jakarta.tck + org.eclipse.ee4j project - 11.0.0-SNAPSHOT + 1.0.9 + + jakarta.tck common + 11.0.0-SNAPSHOT jar COMMON COMMON + https://github.com/jakartaee/platform-tck + + + UTF-8 + UTF-8 + + 11.0.0-SNAPSHOT + - ${project.groupId} + jakarta.tck runtime + ${jakarta.tck.tools.version} - ${project.groupId} + jakarta.tck libutil + ${jakarta.tck.tools.version} commons-httpclient commons-httpclient + 3.1 org.slf4j slf4j-api + 2.0.0 jakarta.resource jakarta.resource-api + 2.1.0 jakarta.ejb jakarta.ejb-api + 4.0.1 jakarta.jms jakarta.jms-api + 3.1.0 jakarta.el jakarta.el-api + 6.0.1 jakarta.persistence jakarta.persistence-api + 3.2.0 jakarta.servlet jakarta.servlet-api + 6.1.0 jakarta.authentication jakarta.authentication-api + 3.1.0 - - + src/main/java @@ -96,8 +118,17 @@ + + + maven-compiler-plugin + 3.13.0 + + 17 + -Xlint:all + + + - org.apache.maven.plugins maven-source-plugin diff --git a/tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java b/tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java new file mode 100644 index 0000000000..84fee378f6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/Dog.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable.cts.resource; + +/** + * A simple JavaBean class to be used as a custom resource type. + */ +public class Dog implements java.io.Serializable { + public static final String DOG_NAME = "wangwang"; + + public static final int DOG_AGE = 2; + + private static Dog instance = new Dog(); + + private int age = DOG_AGE; + + private String name = DOG_NAME; + + public Dog() { + } + + public static Dog getInstance() { + return instance; + } + + public int getAge() { + return age; + } + + public void setAge(int age) { + this.age = age; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String toString() { + String retValue; + retValue = super.toString() + ", name=" + name + ", age=" + age; + return retValue; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int PRIME = 31; + int result = 1; + result = PRIME * result + ((name == null) ? 0 : name.hashCode()); + result = PRIME * result + age; + return result; + } + + @Override + public boolean equals(Object anObject) { + if (this == anObject) { + return true; + } + if (anObject instanceof Dog) { + Dog anotherDog = (Dog) anObject; + return (this.age == anotherDog.age && this.name.equals(anotherDog.name)); + } + return false; + } + +} diff --git a/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java b/tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java similarity index 72% rename from common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java rename to tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java index 22c003344f..d0aff53a42 100644 --- a/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java +++ b/tools/common/src/main/java/com/sun/ts/lib/deliverable/cts/resource/DogFactory.java @@ -22,19 +22,16 @@ import javax.naming.spi.ObjectFactory; /** - * A simple factory class for creating custom JNDI resource of type - * com.sun.ts.lib.deliverable.cts.resource.Dog + * A simple factory class for creating custom JNDI resource of type com.sun.ts.lib.deliverable.cts.resource.Dog */ public class DogFactory implements ObjectFactory { - public DogFactory() { - } + public DogFactory() { + } - public Object getObjectInstance(Object obj, Name name, Context nameCtx, - Hashtable environment) throws Exception { - Dog dog = Dog.getInstance(); - System.out.println("Creating a dog whose name is " + dog.getName() - + ", and age is " + dog.getAge()); - return dog; - } + public Object getObjectInstance(Object obj, Name name, Context nameCtx, Hashtable environment) throws Exception { + Dog dog = Dog.getInstance(); + System.out.println("Creating a dog whose name is " + dog.getName() + ", and age is " + dog.getAge()); + return dog; + } } diff --git a/common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java b/tools/common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java similarity index 97% rename from common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java rename to tools/common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java index 9d3a5aebfc..1d65df28c4 100644 --- a/common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/CleanupMethod.java @@ -27,5 +27,5 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface CleanupMethod { - public String name(); + public String name(); } diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/EETest.java b/tools/common/src/main/java/com/sun/ts/lib/harness/EETest.java new file mode 100644 index 0000000000..9c916a4b4d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/EETest.java @@ -0,0 +1,887 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.harness; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.util.TestUtil; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.PrintStream; +import java.io.PrintWriter; +import java.io.Serializable; +import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Enumeration; +import java.util.Properties; +import java.util.Vector; + +/** + * This abstract class must be extended by all clients of all J2EE-TS tests. All implementations of this class must + * define a setup, cleanup, and runtest(method names of runtest methods must match the 'testname' tag. EETest uses + * reflection to invoke these methods which in turn, run the test(s) to completion. Tests are assumed to pass, unless a + * Fault is thrown. + * + * @author Kyle Grucci + */ +public abstract class EETest implements Serializable { + + /* + * Please do NOT change this class in an incompatible manner with respect to serialization. Please see the serialization + * specification to determine what is a compatible change versus incompatible. If you do need to change this class in an + * incompatible manner you will need to rebuild the compat tests. You should also increment the serialVersionUID field + * to denote that this class is incompatible with older versions. + */ + static final long serialVersionUID = -4235235600918875382L; + + transient protected PrintStream log; + + transient protected PrintStream err; + + protected String sTestCase; + + transient Status sTestStatus = Status.passed(""); + + Class testClass = this.getClass(); + + Object testClInst; + + // nCl is true if the test class is different from the client class. + boolean nCl; + + boolean bUtilAlreadyInitialized; + + Vector vLeftOverTestArgs; + + protected int iLogDelaySeconds; + + // get the props from the args + protected Properties getTestPropsFromArgs(String[] argv) { + Properties p = new Properties(); + Properties ap; + String sProp; + String sVal; + boolean bRunIndividualTest = false; + vLeftOverTestArgs = new Vector(); + // load a props object if used with -p + for (int ii = 0; ii < argv.length; ii++) { + if (argv[ii].startsWith("-p") || argv[ii].startsWith("-ap")) { + ap = initializeProperties(argv[++ii]); + // add additional props to "p" + Enumeration e = ap.propertyNames(); + String key; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + p.put(key, ap.getProperty(key)); + } + } else if (argv[ii].startsWith("-d")) { + sProp = argv[ii].substring(2, argv[ii].indexOf('=')); + sVal = argv[ii].substring(argv[ii].indexOf('=') + 1); + p.put(sProp, sVal); + } else if (argv[ii].equalsIgnoreCase("-t")) { + sTestCase = argv[++ii]; + bRunIndividualTest = true; + } else { + // there must be args that the test needs, + // so pass these on + vLeftOverTestArgs.addElement(argv[ii]); + } + } + if (bRunIndividualTest) + p.setProperty("testName", sTestCase); + return p; + } + + private Method getSetupMethod(Class testClass, Method runMethod) { + String[] s = {}; + Class[] setupParameterTypes = { s.getClass(), (new Properties()).getClass() }; + Method setupMethod = null; + + // first check for @SetupMethod annotation on run method + Annotation annotation = runMethod.getAnnotation(SetupMethod.class); + String testSetupMethodName = null; + if (annotation != null) { + try { + TestUtil.logTrace("getSetupMethod - getting setup method from annotation"); + SetupMethod setupAnnotation = (SetupMethod) annotation; + testSetupMethodName = setupAnnotation.name(); + setupMethod = testClass.getMethod(setupAnnotation.name(), setupParameterTypes); + TestUtil.logTrace("getSetupMethod - setup method name: " + setupAnnotation.name()); + } catch (NoSuchMethodException e) { + setTestStatus(Status.failed( + "Could not find annotation defined test setup method (" + testSetupMethodName + ") for testcase: " + sTestCase), e); + } + } else { + TestUtil.logTrace("No setupMethod annotation present"); + try { + // get setup method + TestUtil.logTrace("getSetupMethod - checking for testcase specific setup method: " + sTestCase + "_setup"); + setupMethod = testClass.getMethod(sTestCase + "_setup", setupParameterTypes); + } catch (NoSuchMethodException e2) { + TestUtil.logTrace("getSetupMethod - checking for default class specific setup method"); + + // try calling the generic setup method + try { + setupMethod = testClass.getMethod("setup", setupParameterTypes); + + } catch (NoSuchMethodException e3) { + setTestStatus(Status.failed("Could not find setup method for" + "testcase: " + sTestCase), e3); + } + } catch (RuntimeException re) { + setTestStatus(Status.failed("Could not access the test case: " + sTestCase), re); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + } + return setupMethod; + } + + private Method getRunMethod(Class testClass) { + Method runMethod = null; + try { + // get run method + TestUtil.logTrace("** IN getRunMethod: testClass=" + testClass.getName()); + TestUtil.logTrace("** IN getRunMethod: testname=" + sTestCase); + runMethod = testClass.getMethod(sTestCase, (java.lang.Class[]) null); + } catch (NoSuchMethodException e) { + setTestStatus(Status.failed("Could not find the run method" + "for test case: " + sTestCase), e); + } catch (RuntimeException e) { + setTestStatus(Status.failed("Could not access the test case: " + sTestCase), e); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + return runMethod; + } + + private Method getCleanupMethod(Class testClass, Method runMethod) { + Method cleanupMethod = null; + + // first check for @CleanupMethod annotation on run method + Annotation annotation = runMethod.getAnnotation(CleanupMethod.class); + + if (annotation != null) { + try { + TestUtil.logTrace("getCleanupMethod - getting cleanup method from annotation"); + CleanupMethod cleanupAnnotation = (CleanupMethod) annotation; + cleanupMethod = testClass.getMethod(cleanupAnnotation.name(), (java.lang.Class[]) null); + TestUtil.logTrace("getCleanupMethod - cleanup method name: " + cleanupAnnotation.name()); + } catch (NoSuchMethodException e) { + setTestStatus(Status.failed("Could not find annotation defined cleanup method for testcase: " + sTestCase), e); + } + } else { + TestUtil.logTrace("No cleanupMethod annotation present"); + try { + // get cleanup method + TestUtil.logTrace("getCleanupMethod - checking for testcase specific cleanup method: " + sTestCase + "_cleanup"); + cleanupMethod = testClass.getMethod(sTestCase + "_cleanup", (java.lang.Class[]) null); + } catch (NoSuchMethodException e2) { + TestUtil.logTrace("getCleanupMethod - checking for default class specific cleanup method"); + + // try calling the generic cleanup method + try { + cleanupMethod = testClass.getMethod("cleanup", (java.lang.Class[]) null); + + } catch (NoSuchMethodException e3) { + setTestStatus(Status.failed("Could not find cleanup method for" + "testcase: " + sTestCase), e3); + } + } catch (RuntimeException re) { + setTestStatus(Status.failed("Could not access the test case: " + sTestCase), re); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + } + return cleanupMethod; + } + + protected Properties initializeProperties(String sPropertiesFile) { + FileInputStream propertyFileInputStream = null; + Properties props = null; + try { + propertyFileInputStream = new FileInputStream(sPropertiesFile); + props = new Properties(); + props.load(propertyFileInputStream); + } catch (FileNotFoundException e) { + TestUtil.logHarness("Could not find specified props file", e); + } catch (IOException e) { + TestUtil.logHarness("IOException while reading props file", e); + } catch (Exception e) { + TestUtil.logHarness("Exception while reading props file", e); + } finally { + try { + if (propertyFileInputStream != null) + propertyFileInputStream.close(); + } catch (IOException ex) { + TestUtil.logHarness("IOException while closing props file", ex); + } + } + return props; + } + + /** + *

+ * This method is only called when test are run outside of JavaTest. If a testcase name is passed within argv, then that + * testcase is run. Otherwise, all testcases within this implementation of EETest are run. + *

+ * + * @param argv an array of arguments that a test may use + * @param log Stream passed to TestUtil for standard loggin + * @param err Writer passed to TestUtil for error logging + * @return a Javatest {@link Status} object (passed or failed) + */ + public Status run(String[] argv, PrintStream log, PrintStream err) { + return run(argv, new PrintWriter(log, true), new PrintWriter(err, true)); + } + + /** + * This method is only called when tests are run outside of JavaTest or if the test is being run in the same VM as the + * harness. If a testcase name is passed within argv, then that testcase is run. Otherwise, all testcases within this + * implementation of EETest are run. + * + * @param argv an array of arguments that a test may use + * @param log Writer passed to TestUtil for standard loggin + * @param err Writer passed to TestUtil for error logging + * @return a Javatest {@link Status} object (passed or failed) + */ + public Status run(String[] argv, PrintWriter log, PrintWriter err) { + Properties props; + Status retStatus = Status.failed("No status set yet"); + // assign log and reference output streams + // this.err = err; + // this.log = log; + props = getTestPropsFromArgs(argv); + // get the # of secs we should delay to allow reporting to finish + try { + String delayseconds = TestUtil.getProperty(props, "harness.log.delayseconds", "0"); + iLogDelaySeconds = Integer.parseInt(delayseconds) * 1000; + } catch (NumberFormatException e) { + // set the default if a number was not set + iLogDelaySeconds = 0; + } + if (props.isEmpty()) + return Status.failed("FAILED: An error occurred while trying to load the test properties"); + // copy leftover args to an array and pass them on + int iSize = vLeftOverTestArgs.size(); + if (iSize == 0) { + argv = null; + } else { + argv = new String[iSize]; + for (int ii = 0; ii < iSize; ii++) { + argv[ii] = (String) vLeftOverTestArgs.elementAt(ii); + } + } + props.put("line.separator", System.getProperty("line.separator")); + if (sTestCase == null) + return runAllTestCases(argv, props, log, err); + else { + // need to pass these streams to the Local Reporter + TestUtil.setCurrentTest(sTestCase, log, err); + TestUtil.initClient(props); + retStatus = getPropsReady(argv, props); + try { + Thread.sleep(iLogDelaySeconds); + } catch (InterruptedException e) { + logErr("Exception: " + e); + } + return retStatus; + } + } + + protected void setTestStatus(Status s, Throwable t) { + // only set the status for the first failure + if (sTestStatus.getType() == Status.PASSED) + sTestStatus = s; + if (t != null) { + TestUtil.logErr(s.getReason()); + TestUtil.logErr("Exception at: ", t); + } + } + + protected Status runAllTestCases(String[] argv, Properties p, PrintWriter log, PrintWriter err) { + String[] sTestCases; + int iPassedCount = 0; + int iFailedCount = 0; + TestUtil.initClient(p); + try { + sTestCases = getAllTestCases(p); + } catch (Exception e) { + e.printStackTrace(); + return Status.failed("An error occurred trying to get all" + "testcase methods."); + } + for (int ii = 0; ii < sTestCases.length; ii++) { + sTestCase = sTestCases[ii]; + p.setProperty("testName", sTestCase); + TestUtil.setCurrentTest(sTestCase, log, err); + bUtilAlreadyInitialized = true; + sTestStatus = Status.passed(""); + TestUtil.separator2(); + TestUtil.logMsg("Beginning Test: " + sTestCases[ii]); + TestUtil.separator2(); + sTestStatus = getPropsReady(argv, p); + try { + Thread.sleep(iLogDelaySeconds); + } catch (InterruptedException e) { + logErr("Exception: " + e); + } + if (sTestStatus.getType() == Status.PASSED) { + sTestCases[ii] += "...........PASSED"; + iPassedCount++; + } else { + TestUtil.logMsg(sTestStatus.getReason()); + sTestCases[ii] += "...........FAILED"; + iFailedCount++; + } + TestUtil.separator2(); + TestUtil.logMsg("End Test: " + sTestCases[ii]); + TestUtil.separator2(); + } + TestUtil.separator2(); + TestUtil.logMsg("Completed running " + sTestCases.length + " tests."); + TestUtil.logMsg("Number of Tests Passed = " + iPassedCount); + TestUtil.logMsg("Number of Tests Failed = " + iFailedCount); + TestUtil.separator2(); + for (int ii = 0; ii < sTestCases.length; ii++) { + TestUtil.logMsg(sTestCases[ii]); + } + if (iFailedCount > 0) + return Status.failed("FAILED"); + else + return Status.passed("PASSED"); + } + + /** + * This method is only called from JavaTest to run a single testcase. All properties are determined from the source code + * tags. + * + * @param argv an array of arguments that a test may use + * @param p properties that are used by the testcase + * @param log stream passed to TestUtil for standard logging + * @param err stream passed to TestUtil for error logging + * @return a Javatest Status object (passed or failed) + */ + public Status run(String[] argv, Properties p, PrintWriter log, PrintWriter err) { + // need to pass these streams to the Local Reporter + sTestCase = TestUtil.getProperty(p, "testName"); + TestUtil.setCurrentTest(sTestCase, log, err); + TestUtil.initClient(p); + return getPropsReady(argv, p); + } + + protected Status getPropsReady(String[] argv, Properties p) { + // we only do this if we're in the Harness VM. If we're on the server, + // that means that we're executing a service test within a generic + // vehicle. In that case, we just invoke the setup, run, and cleanup + // methods. + // trim any whitespace around the property values + Enumeration enum1 = p.propertyNames(); + String key; + String value; + while (enum1.hasMoreElements()) { + key = (String) enum1.nextElement(); + value = p.getProperty(key); + if (value != null) { + p.put(key, value.trim()); + } + // TestUtil.logTrace("Trimming prop: " + key + ". Value = " + value); + } + // set testname just to be sure + sTestCase = TestUtil.getProperty(p, "testName"); + // The code below is to allow JCK service tests to be run from + // ejb vehicles that have been bundled with an appclient + // Need to get the setup(), run() and cleanup() methods in the + // individual test classes -- not from the APIClient.class. + // TestUtil.logTrace("**Got current testclass : " + + // this.getClass().getName()); + // TestUtil.logTrace("*** Got testclass property : " + + // p.getProperty("test_classname")); + String sClass_name = TestUtil.getProperty(p, "test_classname"); + if (sClass_name != null) { + String finder = TestUtil.getProperty(p, "finder"); + if (finder.trim().equals("jck")) { + if (!((this.getClass().getName()).equals((sClass_name.trim())))) { + try { + testClInst = Class.forName(sClass_name).newInstance(); + testClass = testClInst.getClass(); + nCl = true; + } catch (Exception te) { + te.printStackTrace(); + } + } + } + } + // set the harness.host prop so the server can initialize the + // the TestUtil logging + + if (p.getProperty("harness.host") == null) { + p.setProperty("harness.host", "localhost"); + // InetAddress.getLocalHost().getHostAddress()); + } + return run(argv, p); + } + + // public RemoteStatus run(String[] argv, Properties p, int iDummy) + // { + // return new RemoteStatus(run(argv, p)); + // } + /** + * This run method is the one that actually invokes reflection to figure out and invoke the testcase methods. + * + * @param argv an array of arguments that a test may use + * @param p properties that are used by the testcase + * @return a Javatest Status object (passed or failed) + */ + public Status run(String[] argv, Properties p) { + sTestStatus = Status.passed(""); + // Make sure we set the testname if we're in a generic vehicle + sTestCase = TestUtil.getProperty(p, "testName"); + // Class testClass = this.getClass(); + Method setupMethod, runMethod, cleanupMethod; + + // commented out as it's not currently used + // Class testArgTypes[] = {}; + Object testArgs[] = { argv, p }; + TestUtil.logTrace("*** in EETest.run(argv,p)"); + if (sTestCase == null || sTestCase.equals("")) { + // TestUtil.logTrace("*** in EETestrun(): testCase=null)"); + return Status.failed("Invalid test case name: " + sTestCase); + } else { + // The code below is to allow JCK service tests to be run from + // ejb vehicles that have been bundled with an appclient + // Need to get the setup(), run() and cleanup() methods in the + // individual test classes -- not from the APIClient.class. + // TestUtil.logTrace("**Got current testclass : " + + // this.getClass().getName()); + // TestUtil.logTrace("*** Got testclass property : " + + // p.getProperty("test_classname")); + // if ( p.getProperty("test_classname") != null ) + // if ( + // !((this.getClass().getName()).equals((p.getProperty("test_classname").trim())))) + // { + // try { + // testClInst=Class.forName(p.getProperty("test_classname")).newInstance(); + // testClass=testClInst.getClass(); + // nCl=true; + // }catch ( Exception te ) { + // te.printStackTrace(); + // } + // } + TestUtil.logTrace("TESTCLASS=" + testClass.getName()); + runMethod = getRunMethod(testClass); + if (runMethod == null) + return Status.failed( + "Invalid test case name as test run Method ( " + sTestCase + ") could not be found in " + testClass.getName()); + else { + TestUtil.logTrace("** GOT RUN METHOD!"); + TestUtil.logTrace("**runmethod=" + runMethod.getName()); + } + TestUtil.logTrace("ABOUT TO GET SETUP METHOD!"); + setupMethod = getSetupMethod(testClass, runMethod); + if (setupMethod == null) + return Status.failed("Invalid test case name as test setupMethod could not be found ( Test setup method: " + + getSetupMethodName(runMethod) + ", testName:" + sTestCase + ") " + "in test class " + testClass.getName() + + "(test class was loaded from: " + testClass.getClassLoader().getName() + ")"); + else + TestUtil.logTrace("GOT SETUP METHOD: " + setupMethod.getName() + " for " + testClass.getName()); + + cleanupMethod = getCleanupMethod(testClass, runMethod); + if (cleanupMethod == null) + return Status.failed("Invalid test case name as test cleanupMethod Method ( for " + sTestCase + ") could not be found in " + + testClass.getName()); + else + TestUtil.logTrace("GOT CLEANUP METHOD: " + cleanupMethod.getName() + " for " + testClass.getName()); + try { + TestUtil.logTrace("ABOUT TO INVOKE SETUP METHOD!"); + // if new classname is true, use that class name instead of + // "this" class. + if (nCl) + setupMethod.invoke(testClInst, testArgs); + else + setupMethod.invoke(this, testArgs); + TestUtil.logTrace("INVOKED SETUP METHOD!"); + } catch (IllegalAccessException e) { + setTestStatus(Status.failed("Could not execute setup method" + "for test case: " + sTestCase), e); + } catch (InvocationTargetException e) { + setTestStatus(Status.failed("Test case throws exception: " + e.getTargetException().toString()), e.getTargetException()); + } catch (RuntimeException e) { + setTestStatus(Status.failed("Could not access the test case: " + e.toString()), e); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + if (sTestStatus.getType() == Status.PASSED) { + TestUtil.logTrace("ABOUT TO INVOKE EETEST RUN METHOD!"); + try { + // if new classname is true, use that class name instead of + // "this" class. + if (nCl) + runMethod.invoke(testClInst, (java.lang.Object[]) null); + else + runMethod.invoke(this, (java.lang.Object[]) null); + } catch (IllegalAccessException e) { + setTestStatus(Status.failed("Could not execute run method" + "for test case: " + sTestCase), e); + } catch (InvocationTargetException e) { + setTestStatus(Status.failed("Test case throws exception: " + e.getTargetException().getMessage()), + e.getTargetException()); + } catch (RuntimeException e) { + setTestStatus(Status.failed("Could not access the test case: " + e.toString()), e); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + } + // call cleanup no matter what + try { + // if new classname is true, use that class name instead of + // "this" class. + if (nCl) + cleanupMethod.invoke(testClInst, (java.lang.Object[]) null); + else + cleanupMethod.invoke(this, (java.lang.Object[]) null); + } catch (IllegalAccessException e) { + setTestStatus(Status.failed("Could not execute cleanup method for test case: " + sTestCase), e); + } catch (InvocationTargetException e) { + setTestStatus(Status.failed("Test case throws exception: " + e.getTargetException().getMessage()), e.getTargetException()); + // Throwable t = e.getTargetException(); + } catch (RuntimeException e) { + setTestStatus(Status.failed("Could not access the test case: " + e.toString()), e); + } catch (ThreadDeath t) { + throw t; + } catch (Throwable t) { + setTestStatus(Status.failed("Unexpected Throwable: " + t), t); + } + } + return sTestStatus; + } + + private String getSetupMethodName(Method runMethod) { + Annotation annotation = runMethod.getAnnotation(SetupMethod.class); + if (annotation != null) { + SetupMethod setupAnnotation = (SetupMethod) annotation; + return setupAnnotation.name(); + } + return ""; + } + + private String[] getAllTestCases(Properties p) throws SetupException { + Vector tests = new Vector(); + String[] testMethods; + try { + // read in exclude list once per VM + ExcludeListProcessor.readExcludeList(TestUtil.getSystemProperty("exclude.list")); + // setup a testname in a format that will macth the exclude list + String sJavaTestName = ""; + String sVehicle; + sVehicle = TestUtil.getProperty(p, "vehicle"); + if (sVehicle != null) { + // tack on "_from_" + sVehicle = "_from_" + sVehicle; + } + // for all tests, prepend the relative path and + // .java file + String sClientClassName = this.getClass().getName(); + String sClientJavaName = sClientClassName.substring(sClientClassName.lastIndexOf('.') + 1) + ".java"; + String sCurrentDir = TestUtil.getSystemProperty("current.dir"); + sCurrentDir = sCurrentDir.replace(File.separatorChar, '/'); + String sRelativeTestDir = sCurrentDir.substring(sCurrentDir.indexOf("tests/")); + sRelativeTestDir = sRelativeTestDir.substring(sRelativeTestDir.indexOf("/") + 1); + // make sure we have a trailing "/" + if (!sRelativeTestDir.endsWith("/")) + sRelativeTestDir += "/"; /* + * Get public methods for this class Loop through them to get methods that return void, have no + * parameters, and contain "Test" in their name. + */ + + Method[] methods = testClass.getMethods(); + for (int ii = 0; ii < methods.length; ii++) { + Class[] paramTypes = methods[ii].getParameterTypes(); + + // commented out as this is not currently used + // Class returnType = methods[ii].getReturnType(); + + // test that the parameter types match + if ((paramTypes.length == 0)) + // && + // Void.class.isAssignableFrom(returnType)) + { + String sName = methods[ii].getName(); + // test for our name requirements + if ((sName.indexOf("Test") != -1 || sName.indexOf("test") != -1) + && (sName.indexOf("Setup") == -1 && sName.indexOf("setup") == -1) + && (sName.indexOf("Cleanup") == -1 && sName.indexOf("cleanup") == -1)) { + // check here for excluded tests when running + // outside of JavaTest + sJavaTestName = sName + sVehicle; + // construct the JavaTest recognizable testname + sJavaTestName = sRelativeTestDir + sClientJavaName + "#" + sJavaTestName; + // for all tests, check to see if it's excluded + if (!ExcludeListProcessor.isTestExcluded(sJavaTestName)) + tests.addElement(sName); + else + System.out.println(sJavaTestName + " is excluded."); + sJavaTestName = ""; + } + } + } + } catch (SecurityException e) { + throw new SetupException("Failed while getting all test methods: ", e); + } + /* + * Check size of vector, if <= 0, no methods match signature if > 0, copy values into testMethods array + */ + if (tests.size() <= 0) + throw new SetupException("No methods match signature: " + "\"public void methodName()\""); + testMethods = new String[tests.size()]; + for (int ii = 0; ii < testMethods.length; ii++) { + testMethods[ii] = (String) tests.elementAt(ii); + } + return testMethods; + } + + /** + * prints a string to the TestUtil log stream. All tests should use this method for standard logging messages + * + * @param msg string to print to the log stream + */ + public void logMsg(String msg) { + TestUtil.logMsg(msg); + } + + /** + * prints a debug string to the TestUtil log stream. All tests should use this method for verbose logging messages. + * Whether or not the string is printed is determined by the last call to the TestUtil setTrace method. + * + * @param msg string to print to the log stream + */ + public void logTrace(String msg) { + TestUtil.logTrace(msg); + } + + public void logTrace(String msg, Throwable e) { + TestUtil.logTrace(msg, e); + } + + /** + * prints a string to the TestUtil error stream. All tests should use this method for error messages + * + * @param msg string to print to the error stream + */ + public void logErr(String msg) { + TestUtil.logErr(msg); + } + + /** + * prints a string to the TestUtil error stream. All tests should use this method for error messages + * + * @param msg string to print to the error stream + * @param e a Throwable whose stacktrace gets printed + */ + public void logErr(String msg, Throwable e) { + TestUtil.logErr(msg, e); + } + + /** + * This exception must be thrown by all implentations of EETest to signify a test failure. Overrides 3 printStackTrace + * methods to preserver the original stack trace. Using setStackTraceElement() would be more elegant but it is not + * available prior to j2se 1.4. + * + * @author Kyle Grucci + */ + public static class Fault extends Exception { + private static final long serialVersionUID = -1574745208867827913L; + + public Throwable t; + + /** + * creates a Fault with a message + */ + public Fault(String msg) { + super(msg); + TestUtil.logErr(msg); + } + + /** + * creates a Fault with a message. + * + * @param msg the message + * @param t prints this exception's stacktrace + */ + public Fault(String msg, Throwable t) { + super(msg); + this.t = t; + // TestUtil.logErr(msg, t); + } + + /** + * creates a Fault with a Throwable. + * + * @param t the Throwable + */ + public Fault(Throwable t) { + super(t); + this.t = t; + } + + /** + * Prints this Throwable and its backtrace to the standard error stream. + * + */ + public void printStackTrace() { + if (this.t != null) { + this.t.printStackTrace(); + } else { + super.printStackTrace(); + } + } + + /** + * Prints this throwable and its backtrace to the specified print stream. + * + * @param s PrintStream to use for output + */ + public void printStackTrace(PrintStream s) { + if (this.t != null) { + this.t.printStackTrace(s); + } else { + super.printStackTrace(s); + } + } + + /** + * Prints this throwable and its backtrace to the specified print writer. + * + * @param s PrintWriter to use for output + */ + public void printStackTrace(PrintWriter s) { + if (this.t != null) { + this.t.printStackTrace(s); + } else { + super.printStackTrace(s); + } + } + + @Override + public Throwable getCause() { + return t; + } + + @Override + public synchronized Throwable initCause(Throwable cause) { + if (t != null) + throw new IllegalStateException("Can't overwrite cause"); + if (!Exception.class.isInstance(cause)) + throw new IllegalArgumentException("Cause not permitted"); + this.t = (Exception) cause; + return this; + } + } + + /** + * This exception is used only by EETest. Overrides 3 printStackTrace methods to preserver the original stack trace. + * Using setStackTraceElement() would be more elegant but it is not available prior to j2se 1.4. + * + * @author Kyle Grucci + */ + public static class SetupException extends Exception { + private static final long serialVersionUID = -7616313680616499158L; + + public Exception e; + + /** + * creates a Fault with a message + */ + public SetupException(String msg) { + super(msg); + } + + /** + * creates a SetupException with a message + * + * @param msg the message + * @param e prints this exception's stacktrace + */ + public SetupException(String msg, Exception e) { + super(msg); + this.e = e; + } + + /** + * Prints this Throwable and its backtrace to the standard error stream. + * + */ + public void printStackTrace() { + if (this.e != null) { + this.e.printStackTrace(); + } else { + super.printStackTrace(); + } + } + + /** + * Prints this throwable and its backtrace to the specified print stream. + * + * @param s PrintStream to use for output + */ + public void printStackTrace(PrintStream s) { + if (this.e != null) { + this.e.printStackTrace(s); + } else { + super.printStackTrace(s); + } + } + + /** + * Prints this throwable and its backtrace to the specified print writer. + * + * @param s PrintWriter to use for output + */ + public void printStackTrace(PrintWriter s) { + if (this.e != null) { + this.e.printStackTrace(s); + } else { + super.printStackTrace(s); + } + } + + @Override + public Throwable getCause() { + return e; + } + + @Override + public synchronized Throwable initCause(Throwable cause) { + if (e != null) + throw new IllegalStateException("Can't overwrite cause"); + if (!Exception.class.isInstance(cause)) + throw new IllegalArgumentException("Cause not permitted"); + this.e = (Exception) cause; + return this; + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java b/tools/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java new file mode 100644 index 0000000000..9e6eb7f267 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/ExcludeListProcessor.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.harness; + +import java.util.Vector; +import java.util.StringTokenizer; +import java.io.File; +import java.io.FileReader; +import java.io.BufferedReader; +import java.io.PrintWriter; +import java.io.FileWriter; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.FileNotFoundException; + +public class ExcludeListProcessor { + + // pass in a string which has the filename#testname + public static boolean isTestExcluded(String fileName) { + // check to see if it exists in the exclude list + return fileNameList.contains(fileName); + } + + public static void readExcludeList(String fileName) { + BufferedReader d = null; + try { + d = new BufferedReader(new FileReader(fileName)); + String line; + while ((line = d.readLine()) != null) { + line = line.trim(); + if (line.length() > 0 && !line.startsWith("#")) { + String entry = new String(line); + fileNameList.addElement(entry.trim()); + } + } + d.close(); + } catch (FileNotFoundException e) { + System.out.println(e.toString()); + e.printStackTrace(); + } catch (IOException e) { + System.out.println(e.toString()); + e.printStackTrace(); + } + } + + /*----------- Private Members of this class -------------*/ + private static Vector fileNameList = new Vector(); + +} diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java b/tools/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java new file mode 100644 index 0000000000..b57d2e89b6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/ExecutionMode.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.harness; + +import com.sun.ts.lib.deliverable.PropertyManagerInterface; +import com.sun.ts.lib.util.TestUtil; + +public class ExecutionMode { + public final static int DEPLOY_RUN_UNDEPLOY = 0; + + public final static int DEPLOY = 1; + + public final static int RUN = 2; + + public final static int UNDEPLOY = 3; + + public final static int DEPLOY_RUN = 4; + + public final static int LIST = 5; + + public final static int DEFAULT = DEPLOY_RUN_UNDEPLOY; + + private ExecutionMode() { + } + + /** + * gets the current execution mode from PropertyManagerInterface or from a system property if overridden on the + * commandline. Note that current execution mode is not cached since harness.executeMode property may change between + * test executions. + * + * @param propMgr an implementation of PropertyManagerInterface. + * @return an int representing one of the 5 modes + */ + public static int getExecutionMode(PropertyManagerInterface propMgr) { + int mode = (Integer.getInteger("harness.executeMode", -1)).intValue(); + + if (mode == -1) { + if (propMgr != null) { + String modeS = propMgr.getProperty("harness.executeMode", ""); + try { + mode = Integer.parseInt(modeS); + } catch (Exception e) { + mode = DEFAULT; + } + } else { + throw new Error("PropertyManager is null. Please pass in a valid PropertyManager"); + } + + } + + if (mode < DEPLOY_RUN_UNDEPLOY || mode > LIST) { + TestUtil.logHarness("harness.executeMode in ts.jte: " + mode + " is not valid. Will use default " + DEFAULT + "."); + mode = DEFAULT; + } + + TestUtil.logHarness("harness.executeMode is set to \"" + mode + "\""); + return mode; + } + +} diff --git a/common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java b/tools/common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java similarity index 76% rename from common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java rename to tools/common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java index 5468578e73..74435e90dc 100644 --- a/common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/RemoteStatus.java @@ -20,21 +20,21 @@ import com.sun.ts.lib.harness.Status; public class RemoteStatus implements Serializable { - int type; + int type; - String reason; + String reason; - public RemoteStatus(Status s) { - type = s.getType(); - reason = s.getReason(); - } + public RemoteStatus(Status s) { + type = s.getType(); + reason = s.getReason(); + } - public Status toStatus() { - return new Status(type, reason); - } + public Status toStatus() { + return new Status(type, reason); + } - public int getType() { - return type; - } + public int getType() { + return type; + } } diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java b/tools/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java new file mode 100644 index 0000000000..9f849ed3e6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/ServiceEETest.java @@ -0,0 +1,292 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.harness; + +import java.io.*; +import java.rmi.Remote; +import java.rmi.RemoteException; +import com.sun.ts.lib.util.*; +import java.util.*; +import com.sun.ts.lib.harness.Status; +import com.sun.ts.tests.common.vehicle.*; +import com.sun.ts.lib.util.*; +import com.sun.ts.lib.porting.*; +import com.sun.ts.lib.deliverable.*; +import java.net.*; + +/** + * This abstract class must be extended by all clients of tests of J2EE service apis; for example, JDBC, RMI-IIOP, + * JavaMail, JMS, etc. When a service test is encountered by the JavaTest Client, the instance is passed to a J2EE + * server component and run from that remote location. Using this model to develop tests allows the same test to be run + * from different locations within the scope of the J2EE Application Programming Model. + * + * @author Kyle Grucci + */ +public abstract class ServiceEETest extends EETest { + + /* + * Please do NOT change this class in an incompatible manner with respect to serialization. Please see the serialization + * specification to determine what is a compatible change versus incompatible. If you do need to change this class in an + * incompatible manner you will need to rebuild the compat tests. You should also increment the serialVersionUID field + * to denote that this class is incompatible with older versions. + */ + // static final long serialVersionUID = -1396452037848185296L; + + String[] sVehicles; + + private Object theSharedObject; + + private Object theSharedObjectArray[]; + + /** + * Returns any additional properties that may need to be set by a subclass of ServiceEETest for use by a specific + * vehicle. This method was created due to a need for clients of the JBIVehicle to set the name of the object to lookup + * in the rmiregistry. By rule, this value should match the id name for the component specified in the JBI installation + * descriptor. This impl returns an empty properties object by default. + * + * @param p user configured properties used by the test + * @return Properties Additional properties that may need to be set by a subclass of ServiceEETest for use by a specific + * vehicle. + */ + public Properties getVehicleSpecificClientProps(Properties p) { + return new Properties(); + } + + /** + * When called within the harness VM, this method passes an instance of itself to the appropriate J2EE server component. + * When called from within that server component, EETest's run method is called and the test is run. + * + * @param argv an array of arguments that a test may use + * @param p user configured properties used by this test + * @return a Javatest Status object (passed or failed) + */ + public Status run(String[] argv, Properties p) { + Status status = null; + boolean inTestHarness = TestUtil.iWhereAreWe == TestUtil.VM_HARNESS; + TestUtil.logTrace("Check if called from within test process, inTestHarness= " + inTestHarness); + boolean isVehicleClient = false; + URL thisURL = getClass().getProtectionDomain().getCodeSource().getLocation(); + TestUtil.logTrace("in ServiceEETest.run(), this URL is: " + thisURL); + try { + Class vcClass = getClass().getClassLoader().loadClass("com.sun.ts.tests.common.vehicle.VehicleClient"); + URL vcClassURL = vcClass.getProtectionDomain().getCodeSource().getLocation(); + TestUtil.logTrace("VehicleClient URL is: " + vcClassURL); + isVehicleClient = vcClass.isAssignableFrom(getClass()); + TestUtil.logTrace("VehicleClient class check if is vehicle class = " + + (isVehicleClient ? "yes, is a com.sun.ts.tests.common.vehicle.VehicleClient" + : "no, is not com.sun.ts.tests.common.vehicle.VehicleClient class")); + if (inTestHarness && !isVehicleClient) { + String sVehicle = TestUtil.getProperty(p, "vehicle"); + if ("stateless3".equals(sVehicle) || "stateful3".equals(sVehicle) || "appmanaged".equals(sVehicle) + || "appmanagedNoTx".equals(sVehicle)) { + isVehicleClient = true; + TestUtil.logTrace("Using appclient vehicle so set is vehicle client to true"); + } + } + } catch (ClassNotFoundException e) { + TestUtil.logTrace("VehicleClient class not found, so not a vehicle client."); + } + if (inTestHarness && isVehicleClient) { + TestUtil.logTrace("in ServiceEETest.run() method"); + String sVehicle = TestUtil.getProperty(p, "vehicle"); + String className = this.getClass().getName(); + // use this name for the context root or jndi name to eliminate + // naming conflicts for apps deployed at the same time + // comment out unused: String sVehicleEarName = TestUtil.getProperty(p, "vehicle_ear_name"); + TestUtil.logTrace("Vehicle to be used for this test is: " + sVehicle); + // call to the Deliverable to run in deliverable specific vehicles + // This should never be called on the server, so there is + // no need to pass in the deliverable.class system property + try { + VehicleRunnable runner = VehicleRunnerFactory.getVehicleRunner(sVehicle); + p.putAll((Map) getVehicleSpecificClientProps(p)); + status = runner.run(argv, p); + } catch (Throwable e) { + e.printStackTrace(); + return Status.failed("Vehicle runner failed."); + } + + return status; + } else { + // we're on the server in a custom vehicle, so just call on EETest + TestUtil.logTrace("in custom vehicle so call on EETest."); + return super.run(argv, p); + } + } + + protected Properties getTestPropsFromArgs(String[] argv) { + Properties p = new Properties(); + Properties ap = new Properties(); + String sProp = null; + String sVal = null; + boolean bRunIndividualTest = false; + vLeftOverTestArgs = new Vector(); + + if (TestUtil.harnessDebug) + TestUtil.logHarnessDebug("ServiceEETest: " + argv.length + " args: " + Arrays.asList(argv).toString()); + // load a props object if used with -p + boolean tFound = false; + String argItem = null; + for (int ii = 0; ii < argv.length; ii++) { + argItem = argv[ii]; + if (argItem.equals("-p") || argItem.equals("-ap")) { + ap = initializeProperties(argv[++ii]); + // add additional props to "p" + Enumeration e = ap.propertyNames(); + String key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + p.put(key, (String) ap.getProperty(key)); + } + } else if (argItem.startsWith("-d") && argItem.indexOf('=') != -1) { + int equalSign = argItem.indexOf('='); + sProp = argItem.substring(2, equalSign); + sVal = argItem.substring(equalSign + 1); + p.put(sProp, sVal); + } + // the first -t specifies test name and should be consumed by harness. + // Any subsequent -t is to be passed along to test. + else if (argItem.equalsIgnoreCase("-t") && !tFound) { + sTestCase = argv[++ii]; + tFound = true; + bRunIndividualTest = true; + } else if (argItem.equalsIgnoreCase("-vehicle")) { + sVehicles = new String[1]; + sVehicles[0] = argv[++ii]; + } else { + // there must be args that the test needs, + // so pass these on + vLeftOverTestArgs.addElement(argItem); + } + } + if (bRunIndividualTest) + p.setProperty("testName", sTestCase); + return p; + } + + public Status run(String[] argv, PrintWriter log, PrintWriter err) { + Status s = Status.passed("OK"); + Properties props; + props = getTestPropsFromArgs(argv); + // get the # of secs we should delay to allow reporting to finish + try { + String delayseconds = TestUtil.getProperty(props, "harness.log.delayseconds", "1"); + iLogDelaySeconds = Integer.parseInt(delayseconds) * 1000; + } catch (NumberFormatException e) { + // set the default if a number was not set + iLogDelaySeconds = 1000; + } + if (sVehicles == null) { + if (TestUtil.harnessDebug) + TestUtil.logHarnessDebug("ServiceEETest.run(): vehicles = null"); + sVehicles = getVehicles(props); + } + if (props.isEmpty()) + return Status.failed("FAILED: An error occurred while trying to load the test properties"); + // copy leftover args to an array and pass them on + int iSize = vLeftOverTestArgs.size(); + if (iSize == 0) { + argv = null; + } else { + argv = new String[iSize]; + for (int ii = 0; ii < iSize; ii++) { + argv[ii] = (String) vLeftOverTestArgs.elementAt(ii); + } + } + if (sTestCase == null) + return runAllTestCases(argv, props, log, err); + else { + for (int ii = 0; ii < sVehicles.length; ii++) { + props.put("vehicle", sVehicles[ii]); + // need to pass these streams to the Local Reporter + TestUtil.setCurrentTest(sTestCase, new PrintWriter(log, true), new PrintWriter(err, true)); + TestUtil.initClient(props); + s = getPropsReady(argv, props); + try { + Thread.sleep(iLogDelaySeconds); + TestUtil.logTrace("SLEPT FOR: " + iLogDelaySeconds); + } catch (InterruptedException e) { + logErr("Exception: " + e); + } + } + } + return s; + } + + // overridden to allow service tests to run in standalone + // mode outside of javatest + protected Status runAllTestCases(String[] argv, Properties p, PrintStream log, PrintStream err) { + if (sVehicles == null) { + if (TestUtil.harnessDebug) + TestUtil.logHarnessDebug("ServiceEETest.runAllTestCases(): vehicles = null"); + sVehicles = getVehicles(p); + } + Status s = Status.passed("OK"); + for (int ii = 0; ii < sVehicles.length; ii++) { + p.put("vehicle", sVehicles[ii]); + s = super.runAllTestCases(argv, p, new PrintWriter(log, true), new PrintWriter(err, true)); + log.println("Completed running tests in " + sVehicles[ii] + " vehicle."); + } + return s; + } + + private String[] getVehicles(Properties p) { + String[] sReturn = null; + String sVal = null; + String sVehiclesToUse = null; + StringTokenizer st = null; + try { + // get vehicles property (DEFAULT to all) + sVal = TestUtil.getProperty(p, "service_eetest.vehicles"); + } catch (Exception e) { + // got an exception looking up the prop, so set defaults + sVal = ""; + sVal = "ejb servlet jsp"; + } + if (sVal == null || sVal.equals("")) { + sVehiclesToUse = "ejb servlet jsp"; + if (TestUtil.harnessDebug) + TestUtil.logHarnessDebug("getVehicles: " + "Using default - all vehicles"); + } else { + sVehiclesToUse = sVal; + if (TestUtil.harnessDebug) + TestUtil.logHarnessDebug("getVehicles: using vehicle(s) - " + sVehiclesToUse); + } + st = new StringTokenizer(sVehiclesToUse); + int iCount = st.countTokens(); + sReturn = new String[iCount]; + for (int ii = 0; ii < iCount; ii++) { + // create 1 desc for each vehicle to be tested + sReturn[ii] = st.nextToken().trim(); + } + return sReturn; + } + + /* + * Set shared object + */ + public void setSharedObject(Object o) { + theSharedObject = o; + } + + /* + * Get shared object + */ + public Object getSharedObject() { + return theSharedObject; + } +} diff --git a/common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java b/tools/common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java similarity index 97% rename from common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java rename to tools/common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java index a759f6e3a0..42de4a0dfa 100644 --- a/common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/SetupMethod.java @@ -27,5 +27,5 @@ @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.METHOD) public @interface SetupMethod { - public String name(); + public String name(); } diff --git a/common/src/main/java/com/sun/ts/lib/harness/Status.java b/tools/common/src/main/java/com/sun/ts/lib/harness/Status.java similarity index 75% rename from common/src/main/java/com/sun/ts/lib/harness/Status.java rename to tools/common/src/main/java/com/sun/ts/lib/harness/Status.java index 10f2844d6e..d55aeefed2 100644 --- a/common/src/main/java/com/sun/ts/lib/harness/Status.java +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/Status.java @@ -1,6 +1,5 @@ package com.sun.ts.lib.harness; - public class Status { /** * A return code indicating that the test was executed and was successful. @@ -10,25 +9,22 @@ public class Status { */ public static final int PASSED = 0; /** - * A return code indicating that the test was executed but the test - * reported that it failed. + * A return code indicating that the test was executed but the test reported that it failed. * * @see #failed * @see #getType */ public static final int FAILED = 1; /** - * A return code indicating that the test was not run because some error - * occurred before the test could even be attempted. This is generally - * a more serious error than FAILED. + * A return code indicating that the test was not run because some error occurred before the test could even be + * attempted. This is generally a more serious error than FAILED. * * @see #getType */ public static final int ERROR = 2; /** - * A return code indicating that the test has not yet been run in this context. - * (More specifically, no status file has been recorded for this test in the - * current work directory.) This is for the internal use of the harness only. + * A return code indicating that the test has not yet been run in this context. (More specifically, no status file has + * been recorded for this test in the current work directory.) This is for the internal use of the harness only. * * @see #getType */ @@ -38,18 +34,15 @@ public class Status { */ public static final int NUM_STATES = 4; /** - * A string used to prefix the status when it is written to System.err - * by {@link #exit}. + * A string used to prefix the status when it is written to System.err by {@link #exit}. */ public static final String EXIT_PREFIX = "STATUS:"; /** - * Exit codes used by TestStatus.exit corresponding to - * PASSED, FAILED, ERROR, NOT_RUN. - * The only values that should normally be returned from a test - * are the first three; the other value is provided for completeness. - * Note: The assignment is historical and cannot easily be changed. + * Exit codes used by TestStatus.exit corresponding to PASSED, FAILED, ERROR, NOT_RUN. The only values that should + * normally be returned from a test are the first three; the other value is provided for completeness. Note: The + * assignment is historical and cannot easily be changed. */ - public static final int[] exitCodes = {95, 97, 98, 99}; + public static final int[] exitCodes = { 95, 97, 98, 99 }; /** * Prefix signaling that string is encoded */ @@ -64,11 +57,7 @@ public class Status { private static final String ENC_SEPARATOR = " "; private static String[] texts = { // correspond to PASSED, FAILED, ERROR, NOT_RUN - "Passed.", - "Failed.", - "Error.", - "Not run." - }; + "Passed.", "Failed.", "Error.", "Not run." }; private final int type; private final String reason; @@ -95,14 +84,12 @@ private Status(String s) { } /** - * Create a TestStatus object. See {@link #passed}, {@link #failed}, {@link #error} - * etc. for more convenient factory methods to create TestStatus objects. + * Create a TestStatus object. See {@link #passed}, {@link #failed}, {@link #error} etc. for more convenient factory + * methods to create TestStatus objects. * - * @param type The type code for the TestStatus object. - * @param reason A short string to store in the status. Unprintable - * characters (i.e. outside the range 040C to 177C) in the string are - * replaced by a space. All whitespace runs are reduced to a single - * whitespace. + * @param type The type code for the TestStatus object. + * @param reason A short string to store in the status. Unprintable characters (i.e. outside the range 040C to 177C) in + * the string are replaced by a space. All whitespace runs are reduced to a single whitespace. * @throws IllegalArgumentException if the specified type is invalid. */ public Status(int type, String reason) { @@ -110,19 +97,10 @@ public Status(int type, String reason) { throw new IllegalArgumentException(String.valueOf(type)); } /* - // if we find any bad characters in the reason string (e.g. newline) - // we rewrite the string replacing all such characters with a space. - for (int i = 0; i < reason.length(); i++) { - if (!isPrintable(reason.charAt(i))) { - StringBuffer r = new StringBuffer(reason.length()); - for (int j = 0; j < reason.length(); j++) { - char c = reason.charAt(j); - r.append(isPrintable(c) ? c : ' '); - } - reason = r.toString(); - break; - } - } + * // if we find any bad characters in the reason string (e.g. newline) // we rewrite the string replacing all such + * characters with a space. for (int i = 0; i < reason.length(); i++) { if (!isPrintable(reason.charAt(i))) { + * StringBuffer r = new StringBuffer(reason.length()); for (int j = 0; j < reason.length(); j++) { char c = + * reason.charAt(j); r.append(isPrintable(c) ? c : ' '); } reason = r.toString(); break; } } */ this.type = type; this.reason = normalize(reason); @@ -139,9 +117,8 @@ public static Status passed(String reason) { } /** - * Create a TestStatus to indicate the unsuccessful outcome of a test: - * i.e. the test completed, but the test determined that what was being tested - * did not pass the test. + * Create a TestStatus to indicate the unsuccessful outcome of a test: i.e. the test completed, but the test determined + * that what was being tested did not pass the test. * * @param reason A short string describing why the test failed. * @return a TestStatus to indicate the unsuccessful outcome of a test. @@ -151,9 +128,8 @@ public static Status failed(String reason) { } /** - * Create a TestStatus to indicate that an error occurred while trying to run a test: - * i.e. the test did not complete for some reason, and so it could not determine - * whether what was being tested passed or failed. + * Create a TestStatus to indicate that an error occurred while trying to run a test: i.e. the test did not complete for + * some reason, and so it could not determine whether what was being tested passed or failed. * * @param reason A short string describing the error that occurred. * @return a TestStatus to indicate the error outcome of a test. @@ -163,10 +139,8 @@ public static Status error(String reason) { } /** - * Create a TestStatus to indicate that the test was not run because under - * the conditions given it was not applicable. This method is retained - * for backwards compatibility only; the resultant object is of FAILED - * type. + * Create a TestStatus to indicate that the test was not run because under the conditions given it was not applicable. + * This method is retained for backwards compatibility only; the resultant object is of FAILED type. * * @param reason A short string describing why the test was not applicable. * @return a TestStatus to indicate that a test failed because it was not applicable @@ -180,7 +154,7 @@ public static Status notApplicable(String reason) { /** * Create a TestStatus to indicate that the test has not yet been run. * - * @param reason A short string indicating why the test has not yet been run. + * @param reason A short string indicating why the test has not yet been run. */ static Status notRun(String reason) { return new Status(NOT_RUN, reason); @@ -189,8 +163,7 @@ static Status notRun(String reason) { /** * Parse a string-form of a TestStatus. * - * @param s a string containing the string form of a TestStatus - * as generated by {@link #toString} + * @param s a string containing the string form of a TestStatus as generated by {@link #toString} * @return the corresponding TestStatus, or null if it could not be parsed successfully * @see #exit */ @@ -203,8 +176,7 @@ public static Status parse(String s) { } /** - * Translate the type number to a descriptive string. - * For example, type 0 corresponds to the "Passed." string. + * Translate the type number to a descriptive string. For example, type 0 corresponds to the "Passed." string. * * @param typeNum A number between zero and NUM_STATES * @return null if the given integer was out of range, otherwise an appropriate string. @@ -217,7 +189,7 @@ public static String typeToString(int typeNum) { } } - //-----internal routines---------------------------------------------------- + // -----internal routines---------------------------------------------------- // equivalent to msg.trim().replaceAll("\\s+", " "); private static String normalize(String msg) { boolean ok = true; @@ -265,11 +237,11 @@ private static boolean isPrintable(char c) { } /** - * Encodes strings containing non-ascii characters, where all characters - * are replaced with with their Unicode code. Encoded string will have - * the certain prefix and suffix to be distinguished from non-encode one. - * Strings of ASCII chars only are encoded into themselves.
+ * Encodes strings containing non-ascii characters, where all characters are replaced with with their Unicode code. + * Encoded string will have the certain prefix and suffix to be distinguished from non-encode one. Strings of ASCII + * chars only are encoded into themselves.
* Example: + * *
      * System.out.println(TestStatus.encode("X \u01AB")); // Encoded 58 20 1AB
      * System.out.println(TestStatus.encode("Abc1")); // Abc1
@@ -308,8 +280,7 @@ public static String encode(String str) {
      * Decodes string encoded by encode(String) method.
      *
      * @param str - string to decode
-     * @return Decoded string or the same string if encoded prefix/suffix
-     * were found
+     * @return Decoded string or the same string if encoded prefix/suffix were found
      * @see #encode(java.lang.String)
      */
     public static String decode(String str) {
@@ -322,8 +293,7 @@ public static String decode(String str) {
         }
 
         // identify encoded part
-        String encoded = str.substring(ind + ENC_PREFFIX.length(),
-                str.length() - ENC_SUFFFIX.length());
+        String encoded = str.substring(ind + ENC_PREFFIX.length(), str.length() - ENC_SUFFFIX.length());
 
         StringBuilder sb = new StringBuilder();
         sb.append(str.substring(0, ind));
@@ -341,7 +311,7 @@ public static String decode(String str) {
         return sb.toString();
     }
 
-    //----------Data members----------------------------------------------------
+    // ----------Data members----------------------------------------------------
 
     private static String encodeChar(char c) {
         return Integer.toString((int) c, 16);
@@ -423,9 +393,8 @@ public String getReason() {
      * Return a new TestStatus object with a possibly augmented reason field.
      *
      * @param aux if not null and not empty, it will be combined with the original reason.
-     * @return if aux is null or empty, the result will be the same as this object;
-     * otherwise, it will be a new object combining the original status reason and the
-     * additional information in aux.
+     * @return if aux is null or empty, the result will be the same as this object; otherwise, it will be a new
+     * object combining the original status reason and the additional information in aux.
      */
     public Status augment(String aux) {
         if (aux == null || aux.isEmpty()) {
@@ -439,9 +408,8 @@ public Status augment(String aux) {
      * Return a new TestStatus object with a possibly augmented reason field.
      *
      * @param aux a TestStatus to combine with this object
-     * @return if aux is null, the result will be the same as this object;
-     * otherwise, it will be a new object combining the original status reason and the
-     * additional information in aux.
+     * @return if aux is null, the result will be the same as this object; otherwise, it will be a new object
+     * combining the original status reason and the additional information in aux.
      */
     public Status augment(Status aux) {
         return aux == null ? this : augment(aux.reason);
@@ -462,18 +430,15 @@ public String toString() {
     }
 
     /**
-     * Convenience exit() function for the main() of tests to exit in such a
-     * way that the status passes up across process boundaries without losing
-     * information (ie exit codes don't give the associated text of the status
-     * and return codes when exceptions are thrown could cause unintended
-     * results). 

+ * Convenience exit() function for the main() of tests to exit in such a way that the status passes up across process + * boundaries without losing information (ie exit codes don't give the associated text of the status and return codes + * when exceptions are thrown could cause unintended results). + *

*

- * An identifying marker is written to the error stream, which the script - * running the test watches for as the last output before returning, - * followed by the type and reason + * An identifying marker is written to the error stream, which the script running the test watches for as the last + * output before returning, followed by the type and reason *

- * The method does not return. It calls System.exit with a value - * dependent on the type. + * The method does not return. It calls System.exit with a value dependent on the type. */ public void exit() { if (System.err != null) { diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java b/tools/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java new file mode 100644 index 0000000000..3eccf96956 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/TSKeywords.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.harness; + +import com.sun.ts.lib.util.*; +import java.util.*; +import java.io.*; + +/** + * This class is used by the TS harness to figure out which keywords should be associated with directories of tests. + * Keywords are read in by the TSTestFinder and written out to the test decriptions. + * + * A singleton class not intended for concurrent access. + * + * + */ +public class TSKeywords { + public final static String KEYWORD_PROP_FILE_NAME = "keyword.properties"; + + private Properties mapping; + + private String[] keys; // sorted ascending + + private String relativeTestDir; + + private boolean loaded; + + // an uninitialized singleton instance + private static TSKeywords instance = new TSKeywords(); + + private TSKeywords() { + } + + public static TSKeywords getInstance(File path) { + if (instance == null) { + instance = new TSKeywords(); + } + instance.init(path); + return instance; + } + + private void init(File file) { + if (!loaded) { + mapping = ConfigUtil.loadPropertiesFor(KEYWORD_PROP_FILE_NAME); + keys = ConfigUtil.loadKeysFrom(mapping); + loaded = true; + } + if (mapping != null) { + this.relativeTestDir = TestUtil.getRelativePath(file.getPath()); + } + } + + /** + * This method gets the current set of keywords to be used for a given directory path. + * + * @return a String array of the keywords that this test should be run in + */ + public String[] getKeywordSet() { + if (mapping == null || keys == null) { + return TestUtil.EMPTY_STRING_ARRAY; + } + + String[] result = ConfigUtil.getMappingValue(this.mapping, this.keys, this.relativeTestDir); + return result; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java b/tools/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java new file mode 100644 index 0000000000..e19951527f --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/lib/harness/VehicleVerifier.java @@ -0,0 +1,143 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.harness; + +import com.sun.ts.lib.util.*; +import java.util.*; +import java.io.*; + +/** + * This class is used by the TS harness to figure out which vehicles are to be used by the Service tests in the TS. + * These defaults can be overridden by editing appropriate properties file. However, this override mechanism is only to + * be used for debugging purposes. When testing for J2EE certification, the defaults specified in this class must be + * used. + * + * A singleton class not intended for concurrent access. + * + * @author Kyle Grucci + */ +public class VehicleVerifier { + public final static String VEHICLE_PROP_FILE_NAME = "vehicle.properties"; + + public final static String EXCLUDE_KEY = "exclude.dir"; + + private static Properties mapping; + + private static String[] keys; // sorted ascending + + private static String[] excludes; + + private String relativeTestDir; + + private String testName; + + private static boolean loaded; + + // an uninitialized singleton instance + private static VehicleVerifier instance = new VehicleVerifier(); + + private VehicleVerifier() { + } + + public static VehicleVerifier getInstance(File path) { + if (instance == null) { + instance = new VehicleVerifier(); + } + instance.init(path, null); + return instance; + } + + public static VehicleVerifier getInstance(File path, String sTestName) { + if (instance == null) { + instance = new VehicleVerifier(); + } + instance.init(path, sTestName); + return instance; + } + + private void loadExcludes() { + if (this.mapping == null) { + excludes = TestUtil.EMPTY_STRING_ARRAY; + } else { + excludes = ConfigUtil.stringToArray((String) mapping.remove(EXCLUDE_KEY)); + } + } + + private void init(File file, String sTest) { + if (!loaded) { + mapping = ConfigUtil.loadPropertiesFor(VEHICLE_PROP_FILE_NAME); + loadExcludes(); + keys = ConfigUtil.loadKeysFrom(mapping); + loaded = true; + } + testName = sTest; + if (mapping != null) { + this.relativeTestDir = TestUtil.getRelativePath(file.getPath()); + if (testName != null) { + this.relativeTestDir += "#" + testName; + TestUtil.logHarnessDebug("VehicleVerifier.init: relative dir = " + this.relativeTestDir); + + } + } + // if mapping is null, it means this tck uses no vehicles and + // vehicle.properties + // does not exist. So don't bother to convert testDir to relative path. + } + + private boolean isExcluded() { + for (int i = 0; i < excludes.length; i++) { + if (relativeTestDir.startsWith(excludes[i])) { + TestUtil.logHarnessDebug("VehicleVerifier: This test dir is excluded from those listed in vehicle.properties."); + TestUtil.logHarnessDebug("VehicleVerifier: Please check your exclude list in the vehicle.properties file."); + return true; + } + } + return false; + } + + /** + * This method gets the current set of vehicles to be used for a given directory path. + * + * @return a String array of the vehicles that this test should be run in + */ + public String[] getVehicleSet() { + if (mapping == null || keys == null) { + return TestUtil.EMPTY_STRING_ARRAY; + } + if (isExcluded()) { + return TestUtil.EMPTY_STRING_ARRAY; + } + String[] result = ConfigUtil.getMappingValue(this.mapping, this.keys, this.relativeTestDir); + return result; + } + + public static void main(String args[]) { + File testDir = null; + if (args.length == 0) { + testDir = new File(System.getProperty("user.dir")); + } else { + testDir = new File(args[0]); + } + VehicleVerifier ver = VehicleVerifier.getInstance(testDir); + String[] result = ver.getVehicleSet(); + System.out.println(testDir.getPath() + " : " + Arrays.asList(result).toString()); + } +} diff --git a/common/src/main/java/com/sun/ts/lib/harness/commonarchives.properties b/tools/common/src/main/java/com/sun/ts/lib/harness/commonarchives.properties similarity index 100% rename from common/src/main/java/com/sun/ts/lib/harness/commonarchives.properties rename to tools/common/src/main/java/com/sun/ts/lib/harness/commonarchives.properties diff --git a/common/src/main/java/com/sun/ts/lib/harness/finder.properties b/tools/common/src/main/java/com/sun/ts/lib/harness/finder.properties similarity index 100% rename from common/src/main/java/com/sun/ts/lib/harness/finder.properties rename to tools/common/src/main/java/com/sun/ts/lib/harness/finder.properties diff --git a/common/src/main/java/com/sun/ts/lib/harness/keyword.properties b/tools/common/src/main/java/com/sun/ts/lib/harness/keyword.properties similarity index 100% rename from common/src/main/java/com/sun/ts/lib/harness/keyword.properties rename to tools/common/src/main/java/com/sun/ts/lib/harness/keyword.properties diff --git a/common/src/main/java/com/sun/ts/lib/harness/rebuildable.properties b/tools/common/src/main/java/com/sun/ts/lib/harness/rebuildable.properties similarity index 100% rename from common/src/main/java/com/sun/ts/lib/harness/rebuildable.properties rename to tools/common/src/main/java/com/sun/ts/lib/harness/rebuildable.properties diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java index b063f7af67..980571f9ee 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/AppException.java @@ -22,11 +22,11 @@ public class AppException extends Exception { - public AppException() { - super(); - } + public AppException() { + super(); + } - public AppException(String msg) { - super(msg); - } + public AppException(String msg) { + super(msg); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java new file mode 100644 index 0000000000..99220aa38b --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/ConnectorStatus.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.util; + +import java.util.Vector; + +/** + * Implementation class of Log interface, to be used as a verification mechanism for connector tests. This class is + * implemented as a Singleton. The TS whitebox resource adapter writes the log, and the TS test reads the log. The + * whitebox will return an instance of this log to the calling test. + */ +public class ConnectorStatus implements Log { + + private static ConnectorStatus status = new ConnectorStatus(); + + private Vector log = new Vector(); + + private Vector statelog = new Vector(); + + private boolean logFlag = false; + + /** + * Singleton constructor + */ + private ConnectorStatus() { + } + + /** + * Singleton accessor + */ + public static ConnectorStatus getConnectorStatus() { + return status; + } + + // -------------------------- + // Log method implementations + // -------------------------- + + /** + * Adds elements to the log. This is called by the Resource Adapter. + * + */ + public void logAPI(String raAPI, String inParams, String outParams) { + String logString = new String(raAPI + ":" + inParams + ":" + outParams); + if (logFlag) + log.addElement(logString); + } + + /** + * Adds elements to the State log. This is called by the Resource Adapter. + * + */ + public void logState(String state) { + statelog.addElement(state); + } + + /** + * Purges the log store + */ + public void purge() { + log.clear(); + } + + /** + * Purges the log store + */ + public void purgeStateLog() { + statelog.clear(); + } + + /** + * Retrieves the entire log as a String + */ + public Vector getLogVector() { + return log; + } + + /** + * Retrieves the entire log as a String + */ + public Vector getStateLogVector() { + return statelog; + } + + /** + * Sets the logging to true/false + */ + public void setLogFlag(boolean b) { + logFlag = b; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java similarity index 82% rename from common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java index bab57cecde..11d72b31f8 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/Log.java @@ -24,11 +24,11 @@ public interface Log { - public void logAPI(String raAPI, String inParams, String outParams); + public void logAPI(String raAPI, String inParams, String outParams); - public void purge(); + public void purge(); - public Vector getLogVector(); + public Vector getLogVector(); - public void setLogFlag(boolean b); + public void setLogFlag(boolean b); } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java index 7e8b301ad2..4fff44b820 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/SysException.java @@ -22,11 +22,11 @@ public class SysException extends RuntimeException { - public SysException() { - super(); - } + public SysException() { + super(); + } - public SysException(String msg) { - super(msg); - } + public SysException(String msg) { + super(msg); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java similarity index 92% rename from common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java index cd9fee8fa4..52fce6ad94 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/TSMessageListenerInterface.java @@ -22,5 +22,5 @@ public interface TSMessageListenerInterface { - public void onMessage(String message) throws AppException; + public void onMessage(String message) throws AppException; } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/util/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/util/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/util/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/util/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java new file mode 100644 index 0000000000..28a04c6986 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/APIAssertionTest.java @@ -0,0 +1,1214 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.beans.PropertyDescriptor; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ApplicationServerInternalException; +import jakarta.resource.spi.CommException; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.InvalidPropertyException; +import jakarta.resource.spi.LocalTransaction; +import jakarta.resource.spi.LocalTransactionException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.ResourceAllocationException; +import jakarta.resource.spi.RetryableUnavailableException; +import jakarta.resource.spi.SharingViolationException; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.RetryableWorkRejectedException; +import jakarta.resource.spi.work.WorkCompletedException; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkRejectedException; + +/* + * This class is used to assist with testing API Assertions. + */ +public class APIAssertionTest { + + public APIAssertionTest() { + } + + public static void checkManagedConnectionAPI(ManagedConnection mcon) { + if (mcon == null) { + // should not get here + Debug.trace("Error - null MetaData passed into APIAssertionTest.checkMetaData()"); + } + + try { + PrintWriter p = mcon.getLogWriter(); + logAPIPass("ManagedConnection.getLogWriter() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnection.getLogWriter()"); + } + + try { + ManagedConnectionMetaData dd = mcon.getMetaData(); + logAPIPass("ManagedConnection.getMetaData() passed"); + } catch (ResourceException ex) { + // we could get this exception and still be considered passing + logAPIPass("ManagedConnection.getMetaData() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnection.getXAResource()"); + } + + try { + LocalTransaction lt = mcon.getLocalTransaction(); + logAPIPass("ManagedConnection.getLocalTransaction() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnection.getLocalTransaction()"); + } + } + + public static void checkMetaDataAPI(ManagedConnectionMetaData mdata) { + if (mdata == null) { + // should not get here + Debug.trace("Error - null MetaData passed into APIAssertionTest.checkMetaData()"); + } + logAPIPass("Connection.getMetaData() passed"); + + try { + String eisProdName = mdata.getEISProductName(); + logAPIPass("ManagedConnectionMetaData.getEISProductName() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnectionMetaData.getEISProductName()"); + } + + try { + String eisProdVer = mdata.getEISProductVersion(); + logAPIPass("ManagedConnectionMetaData.getEISProductVersion() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnectionMetaData.getEISProductVersion()"); + } + + try { + int maxCons = mdata.getMaxConnections(); + logAPIPass("ManagedConnectionMetaData.getMaxConnections() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnectionMetaData.getMaxConnections()"); + } + + try { + String userName = mdata.getUserName(); + logAPIPass("ManagedConnectionMetaData.getUserName() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ManagedConnectionMetaData.getUserName()"); + } + } + + public void runTests() { + checkNotSupportedException(); + checkResourceException(); + checkLocalTransactionException(); + checkResourceAdapterInternalException(); + checkResourceAllocationException(); + checkSecurityException(); + checkSharingViolationException(); + checkUnavailableException(); + checkWorkException(); + checkWorkCompletedException(); + checkWorkRejectedException(); + checkEISSystemException(); + checkInvalidPropertyException(); + checkApplicationServerInternalException(); + checkCommException(); + checkIllegalStateException(); + checkRetryableUnavailableException(); + checkRetryableWorkRejectedException(); + checkHintsContext(); + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkHintsContext() { + + try { + HintsContext hc = new HintsContext(); + logAPIPass("HintsContext() passed"); + + hc.setName("hintName"); + String strname = hc.getName(); + if ((strname != null) && (strname.equalsIgnoreCase("hintName"))) { + logAPIPass("HintsContext.setName() and HintsContext.getName() passed."); + } + + hc.setDescription("hintDescription"); + String strDesc = hc.getDescription(); + if (strDesc != null) { + // may not be exactly same desc that was set - though it *should* be + logAPIPass("HintsContext.setDescription() and HintsContext.getDescription() passed."); + } + + hc.setHint(HintsContext.NAME_HINT, "someHintVal"); + Map m = hc.getHints(); + logAPIPass("HintsContext.setHints() and HintsContext.getHints() passed."); + + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(null)"); + } + + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkInvalidPropertyException() { + + try { + InvalidPropertyException ne = new InvalidPropertyException(); + throw ne; + } catch (InvalidPropertyException ex) { + logAPIPass("InvalidPropertyException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(null)"); + } + + try { + InvalidPropertyException ne = new InvalidPropertyException("message1"); + throw ne; + } catch (InvalidPropertyException ex) { + logAPIPass("InvalidPropertyException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(str)"); + } + + try { + InvalidPropertyException ne = new InvalidPropertyException("message1", "ERRCODE1"); + throw ne; + } catch (InvalidPropertyException ex) { + logAPIPass("InvalidPropertyException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + InvalidPropertyException ne = new InvalidPropertyException(someThrowable); + throw ne; + } catch (InvalidPropertyException ex) { + logAPIPass("InvalidPropertyException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + InvalidPropertyException ne = new InvalidPropertyException("someString", someThrowable); + throw ne; + } catch (InvalidPropertyException ex) { + logAPIPass("InvalidPropertyException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(str, throwable)"); + } + + try { + InvalidPropertyException ne = new InvalidPropertyException("message1"); + List beanProps = new ArrayList(); + beanProps.add(new PropertyDescriptor("destinationName", LocalTxActivationSpec.class)); + beanProps.add(new PropertyDescriptor("destinationType", LocalTxActivationSpec.class)); + PropertyDescriptor[] pd = (PropertyDescriptor[]) beanProps.toArray(new PropertyDescriptor[beanProps.size()]); + ne.setInvalidPropertyDescriptors(pd); + Debug.trace("throwing setInvalidPropertyDescriptors(pd)"); + throw ne; + } catch (InvalidPropertyException ex) { + PropertyDescriptor[] pd = (PropertyDescriptor[]) ex.getInvalidPropertyDescriptors(); + logAPIPass("InvalidPropertyException.setInvalidPropertyDescriptors() passed"); + logAPIPass("InvalidPropertyException.getInvalidPropertyDescriptors() passed"); + } catch (Exception ex) { + Debug.trace("Error verifying InvalidPropertyException(str)"); + ex.printStackTrace(); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkEISSystemException() { + + try { + EISSystemException ne = new EISSystemException(); + throw ne; + } catch (EISSystemException ex) { + logAPIPass("EISSystemException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying EISSystemException(null)"); + } + + try { + EISSystemException ne = new EISSystemException("message1"); + throw ne; + } catch (EISSystemException ex) { + logAPIPass("EISSystemException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying EISSystemException(str)"); + } + + try { + EISSystemException ne = new EISSystemException("message1", "ERRCODE1"); + throw ne; + } catch (EISSystemException ex) { + logAPIPass("EISSystemException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying EISSystemException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + EISSystemException ne = new EISSystemException(someThrowable); + throw ne; + } catch (EISSystemException ex) { + logAPIPass("EISSystemException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying EISSystemException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + EISSystemException ne = new EISSystemException("someString", someThrowable); + throw ne; + } catch (EISSystemException ex) { + logAPIPass("EISSystemException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying EISSystemException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkIllegalStateException() { + + try { + jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException(); + throw ne; + } catch (jakarta.resource.spi.IllegalStateException ex) { + logAPIPass("IllegalStateException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying IllegalStateException(null)"); + } + + try { + jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException("message1"); + throw ne; + } catch (jakarta.resource.spi.IllegalStateException ex) { + logAPIPass("IllegalStateException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying IllegalStateException(str)"); + } + + try { + jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException("message1", "ERRCODE1"); + throw ne; + } catch (jakarta.resource.spi.IllegalStateException ex) { + logAPIPass("IllegalStateException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying IllegalStateException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException(someThrowable); + throw ne; + } catch (jakarta.resource.spi.IllegalStateException ex) { + logAPIPass("IllegalStateException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying IllegalStateException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + jakarta.resource.spi.IllegalStateException ne = new jakarta.resource.spi.IllegalStateException("someString", someThrowable); + throw ne; + } catch (jakarta.resource.spi.IllegalStateException ex) { + logAPIPass("IllegalStateException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying IllegalStateException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkCommException() { + + try { + CommException ne = new CommException(); + throw ne; + } catch (CommException ex) { + logAPIPass("CommException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying CommException(null)"); + } + + try { + CommException ne = new CommException("message1"); + throw ne; + } catch (CommException ex) { + logAPIPass("CommException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying CommException(str)"); + } + + try { + CommException ne = new CommException("message1", "ERRCODE1"); + throw ne; + } catch (CommException ex) { + logAPIPass("CommException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying CommException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + CommException ne = new CommException(someThrowable); + throw ne; + } catch (CommException ex) { + logAPIPass("CommException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying CommException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + CommException ne = new CommException("someString", someThrowable); + throw ne; + } catch (CommException ex) { + logAPIPass("CommException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying CommException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkRetryableWorkRejectedException() { + + try { + RetryableWorkRejectedException ne = new RetryableWorkRejectedException(); + throw ne; + } catch (RetryableWorkRejectedException ex) { + logAPIPass("RetryableWorkRejectedException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableWorkRejectedException(null)"); + } + + try { + RetryableWorkRejectedException ne = new RetryableWorkRejectedException("message1"); + throw ne; + } catch (RetryableWorkRejectedException ex) { + logAPIPass("RetryableWorkRejectedException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableWorkRejectedException(str)"); + } + + try { + RetryableWorkRejectedException ne = new RetryableWorkRejectedException("message1", "ERRCODE1"); + throw ne; + } catch (RetryableWorkRejectedException ex) { + logAPIPass("RetryableWorkRejectedException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableWorkRejectedException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + RetryableWorkRejectedException ne = new RetryableWorkRejectedException(someThrowable); + throw ne; + } catch (RetryableWorkRejectedException ex) { + logAPIPass("RetryableWorkRejectedException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableWorkRejectedException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + RetryableWorkRejectedException ne = new RetryableWorkRejectedException("someString", someThrowable); + throw ne; + } catch (RetryableWorkRejectedException ex) { + logAPIPass("RetryableWorkRejectedException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableWorkRejectedException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkRetryableUnavailableException() { + + try { + RetryableUnavailableException ne = new RetryableUnavailableException(); + throw ne; + } catch (RetryableUnavailableException ex) { + logAPIPass("RetryableUnavailableException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableUnavailableException(null)"); + } + + try { + RetryableUnavailableException ne = new RetryableUnavailableException("message1"); + throw ne; + } catch (RetryableUnavailableException ex) { + logAPIPass("RetryableUnavailableException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableUnavailableException(str)"); + } + + try { + RetryableUnavailableException ne = new RetryableUnavailableException("message1", "ERRCODE1"); + throw ne; + } catch (RetryableUnavailableException ex) { + logAPIPass("RetryableUnavailableException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableUnavailableException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + RetryableUnavailableException ne = new RetryableUnavailableException(someThrowable); + throw ne; + } catch (RetryableUnavailableException ex) { + logAPIPass("RetryableUnavailableException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableUnavailableException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + RetryableUnavailableException ne = new RetryableUnavailableException("someString", someThrowable); + throw ne; + } catch (RetryableUnavailableException ex) { + logAPIPass("RetryableUnavailableException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying RetryableUnavailableException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkApplicationServerInternalException() { + + try { + ApplicationServerInternalException ne = new ApplicationServerInternalException(); + throw ne; + } catch (ApplicationServerInternalException ex) { + logAPIPass("ApplicationServerInternalException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ApplicationServerInternalException(null)"); + } + + try { + ApplicationServerInternalException ne = new ApplicationServerInternalException("message1"); + throw ne; + } catch (ApplicationServerInternalException ex) { + logAPIPass("ApplicationServerInternalException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ApplicationServerInternalException(str)"); + } + + try { + ApplicationServerInternalException ne = new ApplicationServerInternalException("message1", "ERRCODE1"); + throw ne; + } catch (ApplicationServerInternalException ex) { + logAPIPass("ApplicationServerInternalException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ApplicationServerInternalException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + ApplicationServerInternalException ne = new ApplicationServerInternalException(someThrowable); + throw ne; + } catch (ApplicationServerInternalException ex) { + logAPIPass("ApplicationServerInternalException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ApplicationServerInternalException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + ApplicationServerInternalException ne = new ApplicationServerInternalException("someString", someThrowable); + throw ne; + } catch (ApplicationServerInternalException ex) { + logAPIPass("ApplicationServerInternalException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ApplicationServerInternalException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkWorkException() { + + try { + WorkException ne = new WorkException(); + throw ne; + } catch (WorkException ex) { + logAPIPass("WorkException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkException(null)"); + } + + try { + WorkException ne = new WorkException("message1"); + throw ne; + } catch (WorkException ex) { + logAPIPass("WorkException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkException(str)"); + } + + try { + WorkException ne = new WorkException("message1", "ERRCODE1"); + throw ne; + } catch (WorkException ex) { + logAPIPass("WorkException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkException ne = new WorkException(someThrowable); + throw ne; + } catch (WorkException ex) { + logAPIPass("WorkException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkException ne = new WorkException("someString", someThrowable); + throw ne; + } catch (WorkException ex) { + logAPIPass("WorkException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkWorkCompletedException() { + + try { + WorkCompletedException ne = new WorkCompletedException(); + throw ne; + } catch (WorkCompletedException ex) { + logAPIPass("WorkCompletedException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkCompletedException(null)"); + } + + try { + WorkCompletedException ne = new WorkCompletedException("message1"); + throw ne; + } catch (WorkCompletedException ex) { + logAPIPass("WorkCompletedException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkCompletedException(str)"); + } + + try { + WorkCompletedException ne = new WorkCompletedException("message1", "ERRCODE1"); + throw ne; + } catch (WorkCompletedException ex) { + logAPIPass("WorkCompletedException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkCompletedException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkCompletedException ne = new WorkCompletedException(someThrowable); + throw ne; + } catch (WorkCompletedException ex) { + logAPIPass("WorkCompletedException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkCompletedException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkCompletedException ne = new WorkCompletedException("someString", someThrowable); + throw ne; + } catch (WorkCompletedException ex) { + logAPIPass("WorkCompletedException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkCompletedException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkWorkRejectedException() { + + try { + WorkRejectedException ne = new WorkRejectedException(); + throw ne; + } catch (WorkRejectedException ex) { + logAPIPass("WorkRejectedException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkRejectedException(null)"); + } + + try { + WorkRejectedException ne = new WorkRejectedException("message1"); + throw ne; + } catch (WorkRejectedException ex) { + logAPIPass("WorkRejectedException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkRejectedException(str)"); + } + + try { + WorkRejectedException ne = new WorkRejectedException("message1", "ERRCODE1"); + throw ne; + } catch (WorkRejectedException ex) { + logAPIPass("WorkRejectedException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkRejectedException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkRejectedException ne = new WorkRejectedException(someThrowable); + throw ne; + } catch (WorkRejectedException ex) { + logAPIPass("WorkRejectedException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkRejectedException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + WorkRejectedException ne = new WorkRejectedException("someString", someThrowable); + throw ne; + } catch (WorkRejectedException ex) { + logAPIPass("WorkRejectedException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying WorkRejectedException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkUnavailableException() { + + try { + UnavailableException ne = new UnavailableException(); + throw ne; + } catch (UnavailableException ex) { + logAPIPass("UnavailableException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying UnavailableException(null)"); + } + + try { + UnavailableException ne = new UnavailableException("message1"); + throw ne; + } catch (UnavailableException ex) { + logAPIPass("UnavailableException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying UnavailableException(str)"); + } + + try { + UnavailableException ne = new UnavailableException("message1", "ERRCODE1"); + throw ne; + } catch (UnavailableException ex) { + logAPIPass("UnavailableException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying UnavailableException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + UnavailableException ne = new UnavailableException(someThrowable); + throw ne; + } catch (UnavailableException ex) { + logAPIPass("UnavailableException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying UnavailableException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + UnavailableException ne = new UnavailableException("someString", someThrowable); + throw ne; + } catch (UnavailableException ex) { + logAPIPass("UnavailableException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying UnavailableException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkSharingViolationException() { + + try { + SharingViolationException ne = new SharingViolationException(); + throw ne; + } catch (SharingViolationException ex) { + logAPIPass("SharingViolationException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SharingViolationException(null)"); + } + + try { + SharingViolationException ne = new SharingViolationException("message1"); + throw ne; + } catch (SharingViolationException ex) { + logAPIPass("SharingViolationException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SharingViolationException(str)"); + } + + try { + SharingViolationException ne = new SharingViolationException("message1", "ERRCODE1"); + throw ne; + } catch (SharingViolationException ex) { + logAPIPass("SharingViolationException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SharingViolationException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + SharingViolationException ne = new SharingViolationException(someThrowable); + throw ne; + } catch (SharingViolationException ex) { + logAPIPass("SharingViolationException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SharingViolationException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + SharingViolationException ne = new SharingViolationException("someString", someThrowable); + throw ne; + } catch (SharingViolationException ex) { + logAPIPass("SharingViolationException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SharingViolationException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkSecurityException() { + + try { + jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException(); + throw ne; + } catch (jakarta.resource.spi.SecurityException ex) { + logAPIPass("SecurityException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SecurityException(null)"); + } + + try { + jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException("message1"); + throw ne; + } catch (jakarta.resource.spi.SecurityException ex) { + logAPIPass("SecurityException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SecurityException(str)"); + } + + try { + jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException("message1", "ERRCODE1"); + throw ne; + } catch (jakarta.resource.spi.SecurityException ex) { + logAPIPass("SecurityException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SecurityException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException(someThrowable); + throw ne; + } catch (jakarta.resource.spi.SecurityException ex) { + logAPIPass("SecurityException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SecurityException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + jakarta.resource.spi.SecurityException ne = new jakarta.resource.spi.SecurityException("someString", someThrowable); + throw ne; + } catch (jakarta.resource.spi.SecurityException ex) { + logAPIPass("SecurityException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying SecurityException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkResourceAllocationException() { + + try { + ResourceAllocationException ne = new ResourceAllocationException(); + throw ne; + } catch (ResourceAllocationException ex) { + logAPIPass("ResourceAllocationException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAllocationException(null)"); + } + + try { + ResourceAllocationException ne = new ResourceAllocationException("message1"); + throw ne; + } catch (ResourceAllocationException ex) { + logAPIPass("ResourceAllocationException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAllocationException(str)"); + } + + try { + ResourceAllocationException ne = new ResourceAllocationException("message1", "ERRCODE1"); + throw ne; + } catch (ResourceAllocationException ex) { + logAPIPass("ResourceAllocationException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAllocationException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceAllocationException ne = new ResourceAllocationException(someThrowable); + throw ne; + } catch (ResourceAllocationException ex) { + logAPIPass("ResourceAllocationException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAllocationException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceAllocationException ne = new ResourceAllocationException("someString", someThrowable); + throw ne; + } catch (ResourceAllocationException ex) { + logAPIPass("ResourceAllocationException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAllocationException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkResourceAdapterInternalException() { + + try { + ResourceAdapterInternalException ne = new ResourceAdapterInternalException(); + throw ne; + } catch (ResourceAdapterInternalException ex) { + logAPIPass("ResourceAdapterInternalException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAdapterInternalException(null)"); + } + + try { + ResourceAdapterInternalException ne = new ResourceAdapterInternalException("message1"); + throw ne; + } catch (ResourceAdapterInternalException ex) { + logAPIPass("ResourceAdapterInternalException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAdapterInternalException(str)"); + } + + try { + ResourceAdapterInternalException ne = new ResourceAdapterInternalException("message1", "ERRCODE1"); + throw ne; + } catch (ResourceAdapterInternalException ex) { + logAPIPass("ResourceAdapterInternalException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAdapterInternalException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceAdapterInternalException ne = new ResourceAdapterInternalException(someThrowable); + throw ne; + } catch (ResourceAdapterInternalException ex) { + logAPIPass("ResourceAdapterInternalException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAdapterInternalException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceAdapterInternalException ne = new ResourceAdapterInternalException("someString", someThrowable); + throw ne; + } catch (ResourceAdapterInternalException ex) { + logAPIPass("ResourceAdapterInternalException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceAdapterInternalException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: + * + * + */ + private void checkLocalTransactionException() { + + try { + LocalTransactionException ne = new LocalTransactionException(); + throw ne; + } catch (LocalTransactionException ex) { + logAPIPass("LocalTransactionException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying LocalTransactionException(null)"); + } + + try { + LocalTransactionException ne = new LocalTransactionException("message1"); + throw ne; + } catch (LocalTransactionException ex) { + logAPIPass("LocalTransactionException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying LocalTransactionException(str)"); + } + + try { + LocalTransactionException ne = new LocalTransactionException("message1", "ERRCODE1"); + throw ne; + } catch (LocalTransactionException ex) { + logAPIPass("LocalTransactionException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying LocalTransactionException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + LocalTransactionException ne = new LocalTransactionException(someThrowable); + throw ne; + } catch (LocalTransactionException ex) { + logAPIPass("LocalTransactionException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying LocalTransactionException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + LocalTransactionException ne = new LocalTransactionException("someString", someThrowable); + throw ne; + } catch (LocalTransactionException ex) { + logAPIPass("LocalTransactionException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying LocalTransactionException(str, throwable)"); + } + } + + /* + * used to assist with verifying assertions: Connector:JAVADOC:1, Connector:JAVADOC:2, Connector:JAVADOC:3, + * Connector:JAVADOC:4, Connector:JAVADOC:5 + */ + private void checkNotSupportedException() { + + try { + NotSupportedException ne = new NotSupportedException(); + throw ne; + } catch (NotSupportedException ex) { + logAPIPass("NotSupportedException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying NotSupportedException(null)"); + } + + try { + NotSupportedException ne = new NotSupportedException("message1"); + throw ne; + } catch (NotSupportedException ex) { + logAPIPass("NotSupportedException(str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying NotSupportedException(str)"); + } + + try { + NotSupportedException ne = new NotSupportedException("message1", "ERRCODE1"); + throw ne; + } catch (NotSupportedException ex) { + logAPIPass("NotSupportedException(str, str) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying NotSupportedException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + NotSupportedException ne = new NotSupportedException(someThrowable); + throw ne; + } catch (NotSupportedException ex) { + logAPIPass("NotSupportedException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying NotSupportedException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + NotSupportedException ne = new NotSupportedException("someString", someThrowable); + throw ne; + } catch (NotSupportedException ex) { + logAPIPass("NotSupportedException(str, throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying NotSupportedException(str, throwable)"); + } + } + + /* + * used to assist with testing api assertions: Connector:JAVADOC:7, Connector:JAVADOC:9, Connector:JAVADOC:10, + * Connector:JAVADOC:11, Connector:JAVADOC:12, Connector:JAVADOC:13, Connector:JAVADOC:14, Connector:JAVADOC:15 + */ + private void checkResourceException() { + + try { + ResourceException ne = new ResourceException(); + throw ne; + } catch (ResourceException ex) { + logAPIPass("ResourceException(null) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceException(null)"); + } + + try { + ResourceException ne = new ResourceException("message1"); + ne.setErrorCode("ERRCODE2"); + throw ne; + } catch (ResourceException ex) { + logAPIPass("ResourceException(str) passed"); + if ((ex.getErrorCode() != null)) { + String str = ex.getErrorCode().toUpperCase(); + if (str.indexOf("ERRCODE2") != -1) { + logAPIPass("ResourceException.setErrorCode(str) passed"); + } + } else { + Debug.trace("Error verifying ResourceException(str, str)"); + } + + } catch (Exception ex) { + Debug.trace("Error verifying ResourceException(str)"); + } + + try { + ResourceException ne = new ResourceException("message1", "ERRCODE1"); + throw ne; + } catch (ResourceException ex) { + logAPIPass("ResourceException(str, str) passed"); + if ((ex.getErrorCode() != null)) { + String str = ex.getErrorCode().toUpperCase(); + if (str.indexOf("ERRCODE1") != -1) { + logAPIPass("ResourceException.getErrorCode() passed"); + } + } else { + Debug.trace("Error verifying ResourceException(str, str)"); + } + } catch (Exception ex) { + Debug.trace("Error verifying ResourceException(str, str)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceException ne = new ResourceException(someThrowable); + throw ne; + } catch (ResourceException ex) { + logAPIPass("ResourceException(throwable) passed"); + } catch (Exception ex) { + Debug.trace("Error verifying ResourceException(throwable)"); + } + + try { + Exception someThrowable = new Exception("test"); + ResourceException ne = new ResourceException("someString", someThrowable); + throw ne; + } catch (ResourceException ex) { + logAPIPass("ResourceException(str, someThrowable) passed"); + if (ex.getMessage() != null) { + logAPIPass("ResourceException.getMessage() passed"); + } else { + Debug.trace("Error verifying ResourceException(str, someThrowable)"); + } + + } catch (Exception ex) { + Debug.trace("Error verifying ResourceException(str, throwable)"); + } + } + + private static void logAPIPass(String outStr) { + ConnectorStatus.getConnectorStatus().logState(outStr); + Debug.trace(outStr); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java new file mode 100755 index 0000000000..8ea65eff67 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ContextWork.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.ArrayList; +import java.util.List; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkContext; +import jakarta.resource.spi.work.WorkContextProvider; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +/* + * this class is used to help facilitate the testing of both nested + * work objects/instances as well as nested (work) contexts. In + * order to properly use this class to test nested work and contexts, + * you should create an instance of this class, add a context to it + * by using the addWorkContext() method, then add a NestedWork + * instance to it - where the NestedWork instance will need to + * have its own context assigned to it BEFOR it gets added into + * this class. + * + */ +public class ContextWork implements Work, WorkContextProvider { + + private List contextsList = new ArrayList(); + + private WorkManager wm; + + private NestWork nw = null; + + private String name = "ContextWork.name"; + + private String description = "ContextWork.description"; + + public ContextWork(WorkManager wm) { + this.wm = wm; + Debug.trace("WorkImpl.constructor"); + } + + public void addNestedWork(NestWork val) { + nw = val; + } + + public NestWork getNestWork() { + return nw; + } + + public WorkManager getWorkManager() { + return wm; + } + + @Override + public List getWorkContexts() { + return contextsList; + } + + public void setWorkContexts(List val) { + contextsList = val; + } + + public void addWorkContext(WorkContext ic) { + contextsList.add(ic); + } + + @Override + public void release() { + Debug.trace("WorkImpl.release"); + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public void run() { + try { + Debug.trace("ContextWork.run"); + if (nw != null) { + wm.doWork(nw); + } + + // we expect nw to be executed with no SIC and thus an unauthenticated + // user...but what the work manager chooses to do with that is not + // defined. + Debug.trace("ContextWork.run: just executed wm.doWork(nw) where nw has no SIC"); + if ((nw != null) && (nw.hasContextEntry())) { + String str = "(ContextWork) "; + str += "It appears that Security context is being inherited from parent SIC."; + Debug.trace(str); + } + + } catch (WorkException we) { + Debug.trace("ContextWork.run: got WorkException - which is fine since child had no SIC"); + if ((nw != null) && (!nw.hasContextEntry())) { + // excellant - this is what we expected (for Connector:SPEC:305) + // this verifies that nw did not inherit the SIC from + // this (ie its parent) work class. + String str = "Security Context info not inherited from parent Work"; + ConnectorStatus.getConnectorStatus().logState(str); + Debug.trace(str); + } else if ((nw != null) && (nw.hasContextEntry())) { + // this verified Connector:SPEC:210 becaue we should have + // a SIC with invalid creds that could not be authenticated + String str = "Security Context info had invalid creds."; + ConnectorStatus.getConnectorStatus().logState(str); + Debug.trace(str); + } + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java new file mode 100644 index 0000000000..d419f7cfe7 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Counter.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +/* + * This class is used to assist with testing of work context notifications + * and the calling order. There is a static counter in this class that will + * get incremented everytime someone creates an instance of this class. + * The idea is to print the call order out during notifications of work + * context releated calls of: workAccepted(), workStarted(), workCompleted(), + * and contextSetupComplete(). + * + * This class should NOT be used by other tests as it could throw the + * count off. So unless you are sure you know what you're doing, refrain + * from using this class. + * + * @see com.sun.ts.tests.com.sun.common.connector.whitebox.WorkListenerImpl2 + * @see com.sun.ts.tests.com.sun.common.connector.whitebox.TSSICWithListener + * + */ +public class Counter { + + public enum Action { + INCREMENT, DECREMENT, DO_NOTHING + }; + + private static int count = 0; + + private static Action action = Action.DO_NOTHING; + + public Counter() { + } + + /* + * We are forcing the users to explicitly indicate if they want to increment, decrement, or do nothing. The reasoning is + * to ensure that the user knows exactly what they are doing when using this class/method. + * + * Since the primary use of this class/method is to record the current count (usually during a work context notification + * call) we expect the users to call this as: getCount(Counter.INCREMENT) so that the count is incremented each time its + * called/used. The other Action types are only there for completeness but no current use of them is expected. + * + */ + public int getCount(Action val) { + + Counter.action = val; + + if (action == Action.INCREMENT) { + count++; + } else if (action == Action.DECREMENT) { + // this is allowed - but not likely so offer caution + debug("CAUTION: user invoked Counter(Action.DECREMENT) - verify this is correct."); + count--; + } else if (action == Action.DO_NOTHING) { + // this is allowed - but not likely so offer caution + debug("CAUTION: user invoked Counter(Action.NOTHING) - verify this is correct."); + } + + return count; + } + + public void setCount(int val) { + count = val; + } + + public int increment() { + return count++; + } + + public int decrement() { + return count--; + } + + public static void resetCount() { + count = 0; + action = Action.DO_NOTHING; + } + + private void debug(String str) { + Debug.trace(str); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java new file mode 100644 index 0000000000..34df6a5186 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DataElement.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)DataElement.java 1.0 06/06/02 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.Xid; + +/** + * A DataElement in the Enterprise Information System(TSeis). + * + * @version 1.0, 06/06/02 + * @author Binod P.G + */ +public class DataElement { + + /** Status indicating that the DataElement object is committed **/ + static final int COMMITTED = 1; + + /** Status indicating that the DataElement object prepared for 2PC **/ + static final int PREPARED = 2; + + /** Status indicating that the DataElement object is deleted **/ + static final int DELETED = 3; + + /** + * Status indicating that the DataElement object is in the uncommitted state + **/ + static final int INSERTED = 4; + + /** + * Status indicating that the DataElement object is in the uncommitted state + **/ + static final int UPDATED = 5; + + /** Current status of DataElement **/ + private int status; + + /** Key of this DataElement **/ + private String key; + + /** Actual Data of this DataElement **/ + private String data; + + /** Prepared Data of this DataElement **/ + private DataElement preparedData; + + /** Xid used to prepare this element **/ + private Xid xid; + + /** Version of this DataElement **/ + private int version; + + /** + * If key and value is inserted, this constructor will be used to construct the DataElement object. + * + * @param key Key of the DataElement object. + * @param data Value of the DataElement object. + */ + public DataElement(String key, String data) { + this.key = key; + this.data = data; + version = 1; + } + + /** + * If only key is inserted, this constructor will be used to construct the DataElement object. + * + * @param key Key of the DataElement object. + */ + public DataElement(String key) { + this.key = key; + version = 1; + } + + /** + * Sets the status of the object to the value provided. + * + * @param status Status to be set. + */ + public void setStatus(int status) { + this.status = status; + } + + /** + * Get the status of the element. + * + * @return Current status of the DataElement object. + */ + public int getStatus() { + return status; + } + + /** + * Get the key of the DataElement object. + * + * @retrun Key of the DataElement object. + */ + public String getKey() { + return key; + } + + /** + * Get the data in the DataElement object. + * + * @retrun Value of the DataElement object. + */ + public String getValue() { + return data; + } + + /** + * Set the value of DataElement object. + * + * @param value Value. + */ + public void setValue(String value) { + this.data = value; + } + + /** + * Prepare the value for 2PC commit. + * + * @param value Value to be prepared. + */ + public void prepare(DataElement value, Xid xid) { + this.preparedData = value; + this.xid = xid; + this.status = PREPARED; + } + + /** + * Get the prepared data in the DataElement object. + * + * @retrun Prepared of the DataElement object. + */ + public DataElement getPreparedValue() { + return preparedData; + } + + /** + * Get the version of the data. + * + * @return version. + */ + public int getVersion() { + return version; + } + + /** + * Updates the version of the element. + */ + public void updateVersion() { + version++; + } + + /** + * Get the xid used to do the prepare. + * + * @return Xid. + */ + public Xid getXid() { + return xid; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java new file mode 100644 index 0000000000..82b8ccb8d4 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Debug.java @@ -0,0 +1,108 @@ +/* + * Copyright (c) 2009, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import com.sun.ts.lib.util.TestUtil; + +public class Debug { + + private static String debuggingProp = null; + + private static boolean bDebug = true; // debugging on by default + + private static int iDebugLevel = 0; // no debugging by default + + /** + * Constructor + */ + public Debug(String str) { + debuggingProp = TestUtil.getSystemProperty(str); + if ((debuggingProp != null) && (debuggingProp.equals("ON"))) { + setDebugStatus(true); // turn tracing on + trace("Debugging enabled"); + } else if ((debuggingProp != null) && (debuggingProp.equals("OFF"))) { + trace("Debugging messages being disabled"); + setDebugStatus(false); + } + } + + public static void trace(String str) { + if (getDebugStatus()) { + // debugging is enabled so print info out + System.out.println(str); + } + } + + /** + * This is used to turn debugging off or on. This is off by default and must be explicitly set to true in order to turn + * on debugging. + * + * @param bVal: True means turn debugging on. + */ + public static void setDebugStatus(boolean bVal) { + bDebug = bVal; + } + + /* + * This is a convenience method used to test if we are running in debug mode. If so, we will print the strack trace. If + * not, we do nothing. + * + * @exception none. + * + * @param none + * + * @version 1.32 07/31/00 + * + * @return void + */ + public static void printDebugStack(Exception ex) { + if (getDebugStatus() == true) { + ex.printStackTrace(); + } + } + + /** + * This gets the status of the debugging functionality. false means that debugging is disabled, true means it is + * enabled. + * + * @return boolean: True means turn debugging on. + */ + public static boolean getDebugStatus() { + return bDebug; + } + + /** + * This gets the current level of debugging we are using. + * + * @return int: 0=none, 1=errors, 2=errors+warnings, 3=all + */ + + public static int getDebugLevel() { + return iDebugLevel; + } + + /** + * This sets the current level of debugging we are using. + * + * @param val: 0=none, 1=errors, 2=errors+warnings, 3=all + * @return none. + */ + public static void setDebugLevel(int val) { + iDebugLevel = val; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java similarity index 53% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java index 8b44d0fe0b..ee21031491 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/DistributedWorkImpl.java @@ -24,34 +24,31 @@ public class DistributedWorkImpl implements DistributableWork { - private WorkManager wm; - - public DistributedWorkImpl(WorkManager wm) { - this.wm = wm; - - ConnectorStatus.getConnectorStatus() - .logAPI("DistributedWorkImpl.constructor", "", ""); - System.out.println("DistributedWorkImpl.constructor"); - } - - @Override - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("DistributedWorkImpl.release", - "", ""); - System.out.println("DistributedWorkImpl.release"); - } - - public void run() { - try { - ConnectorStatus.getConnectorStatus().logAPI("DistributedWorkImpl.run", "", - ""); - System.out.println("DistributedWorkImpl.run"); - NestWork nw = new NestWork(); - wm.doWork(nw); - } catch (WorkException e) { - // this could mean work completed or work rejected or something else. - System.out.println("DistributedWorkImpl WorkException caught"); + private WorkManager wm; + + public DistributedWorkImpl(WorkManager wm) { + this.wm = wm; + + ConnectorStatus.getConnectorStatus().logAPI("DistributedWorkImpl.constructor", "", ""); + System.out.println("DistributedWorkImpl.constructor"); + } + + @Override + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("DistributedWorkImpl.release", "", ""); + System.out.println("DistributedWorkImpl.release"); + } + + public void run() { + try { + ConnectorStatus.getConnectorStatus().logAPI("DistributedWorkImpl.run", "", ""); + System.out.println("DistributedWorkImpl.run"); + NestWork nw = new NestWork(); + wm.doWork(nw); + } catch (WorkException e) { + // this could mean work completed or work rejected or something else. + System.out.println("DistributedWorkImpl WorkException caught"); + } } - } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java new file mode 100644 index 0000000000..2c11264de6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTransactionImpl.java @@ -0,0 +1,123 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.LocalTransaction; + +public class LocalTransactionImpl implements LocalTransaction { + + private TSManagedConnection mc; + + /* + * @name LocalTransactionImpl + * + * @desc LocalTransactionImpl constructor + * + * @param TSManagedConnection + */ + public LocalTransactionImpl(TSManagedConnection mc) { + this.mc = mc; + } + + /* + * @name begin + * + * @desc sends the event that local transaction has started + * + * @exception ResourceException + * + */ + @Override + public void begin() throws ResourceException { + try { + TSConnection con = mc.getTSConnection(); + ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.begin", "", ""); + con.setAutoCommit(false); + System.out.println("LocalTransaction.begin"); + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name commit + * + * @desc Sends an event that local transaction has been commited. + * + * @exception ResourceException + */ + @Override + public void commit() throws ResourceException { + TSConnection con = null; + try { + con = mc.getTSConnection(); + ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.commit", "", ""); + System.out.println("LocalTransaction.commit"); + con.commit(); + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } finally { + try { + if (con != null) { + con.setAutoCommit(true); + } + } catch (Exception ex) { + ex.getMessage(); + } + } + } + + /* + * @name rollback + * + * @desc Sends an event to rollback the transaction + * + * @exception ResourceException + */ + @Override + public void rollback() throws ResourceException { + TSConnection con = null; + try { + con = mc.getTSConnection(); + ConnectorStatus.getConnectorStatus().logAPI("LocalTransaction.rollback", "", ""); + con.rollback(); + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } finally { + try { + if (con != null) { + con.setAutoCommit(true); + } + } catch (Exception ex) { + } + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java new file mode 100644 index 0000000000..c440aadc5d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxActivationSpec.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.ResourceAdapter; + +public class LocalTxActivationSpec implements ActivationSpec, java.io.Serializable { + + private String destinationName; + + private String destinationType; + + private ResourceAdapter resourceAdapter; + + private int counter = 0; + + /** + * Default constructor. + */ + public LocalTxActivationSpec() { + + } + + public String getDestinationName() { + System.out.println("LocalTxActivationSpec.getDestinationName :" + this.destinationName); + return this.destinationName; + } + + public void setDestinationName(String name) { + this.destinationName = name; + System.out.println("LocalTxActivationSpec.setDestinationName :" + name); + } + + public String getDestinationType() { + System.out.println("LocalTxActivationSpec.getDestinationType :" + this.destinationType); + return this.destinationType; + } + + public void setDestinationType(String type) { + System.out.println("LocalTxActivationSpec.setDestinationType :" + type); + this.destinationType = type; + } + + @Override + public ResourceAdapter getResourceAdapter() { + return this.resourceAdapter; + } + + @Override + public void setResourceAdapter(ResourceAdapter ra) { + counter++; + ConnectorStatus.getConnectorStatus().logState("LocalTxActivationSpec setResourceAdapter " + counter); + System.out.println("LocalTxActivationSpec.setResourceAdatper called"); + this.resourceAdapter = ra; + } + + @Override + public void validate() { + throw new UnsupportedOperationException(); + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java new file mode 100644 index 0000000000..798e278b32 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxManagedConnectionFactory.java @@ -0,0 +1,373 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +@SuppressWarnings("unused") +public class LocalTxManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String password; + + private String user; + + private String userName; + + private String TSRValue; + + /* + * @name LocalTxManagedConnectionFactory + * + * @desc Default conctructor + */ + public LocalTxManagedConnectionFactory() { + } + + public String getUser() { + return user; + } + + public void setUser(String val) { + user = val; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String val) { + userName = val; + } + + public String getPassword() { + return password; + } + + public void setPassword(String val) { + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + + @Override + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.createConnectionFactory", "cxManager", + "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + + @Override + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + @Override + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "LocalTxManagedConnectionFactory setResourceAdapter " + count; + System.out.println(newStr1); + ConnectorStatus.getConnectorStatus().logState(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + @Override + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + @Override + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.createManagedConnection", "subject|info", + "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + System.out.println("LocalTxManagedConnectionFactory.createManagedConnection(): pc == null"); + System.out.println("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + System.out.println("LocalTxManagedConnectionFactory.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + System.out.println("LocalTxManagedConnectionFactory.createManagedConnection() with pc.getUserName()=" + pc.getUserName() + + " pc.getPassword()=" + new String(pc.getPassword())); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + TSManagedConnection tcon = new TSManagedConnection(this, pc, null, con, false, true); + + // just send some info to the log to assist with API assertion checks + APIAssertionTest.checkMetaDataAPI(tcon.getMetaData()); + APIAssertionTest.checkManagedConnectionAPI(tcon); + return tcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + @Override + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + @Override + public void setLogWriter(PrintWriter out) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.setLogWriter", "out", ""); + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + @Override + public PrintWriter getLogWriter() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("LocalTxManagedConnectionFactory.getLogWriter", "", ""); + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + @Override + public boolean equals(Object obj) { + if ((obj == null) || !(obj instanceof LocalTxManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + LocalTxManagedConnectionFactory that = (LocalTxManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.TSRValue, that.getTSRValue())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + + @Override + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + @Override + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + @Override + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void setTSRValue(String name) { + this.TSRValue = name; + } + + public String getTSRValue() { + return TSRValue; + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java new file mode 100644 index 0000000000..49b82c045b --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageListener.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.XAException; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.XATerminator; +import jakarta.resource.spi.work.WorkEvent; +import jakarta.resource.spi.work.WorkListener; + +public class LocalTxMessageListener implements WorkListener { + + private XidImpl xid; + + private BootstrapContext bsc; + + public LocalTxMessageListener(XidImpl xid, BootstrapContext bsc) { + this.xid = xid; + this.bsc = bsc; + } + + @Override + public void workAccepted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("LocalTxMessageListener.workAccepted"); + System.out.println("LocalTxMessageListener.workAccepted"); + } + + @Override + public void workRejected(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("LocalTxMessageListener.workRejected"); + System.out.println("LocalTxMessageListener.workRejected"); + } + + @Override + public void workStarted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("LocalTxMessageListener.workStarted"); + System.out.println("LocalTxMessageListener.workStarted"); + } + + @Override + public void workCompleted(WorkEvent e) { + try { + XATerminator xt = bsc.getXATerminator(); + xt.commit(this.xid, true); + System.out.println("LocalTxMessageListener.workCompleted"); + System.out.println("XID getting used in XATerminator [ " + xid.getFormatId() + " ]"); + ConnectorStatus.getConnectorStatus().logState("LocalTxMessageListener committed Xid"); + } catch (XAException ex) { + ex.printStackTrace(); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java new file mode 100644 index 0000000000..e6a18e6a13 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork.java @@ -0,0 +1,305 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkContext; +import jakarta.resource.spi.work.WorkContextProvider; + +public class LocalTxMessageWork implements Work, WorkContextProvider { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource("LocalTxMessageXAResource"); + + private MessageEndpoint ep2; + + private List contextsList = new ArrayList(); + + private BootstrapContext ctx = null; + + /* + * XXXX private WorkManager wm = null; private XATerminator xa; private String sicUser = ""; // this should correspond + * to ts.jte's 'user' property private String sicPwd = ""; // this should correspond to ts.jte's 'password' property + * private String eisUser = ""; // this should correspond to ts.jte's 'user1' property private String eisPwd = ""; // + * this should correspond to ts.jte's 'password' property + */ + private final String SICFAIL = "mdb not executed with proper SIC principal"; + + private final String SICPASS = "mdb executed with proper SIC principal"; + + public LocalTxMessageWork(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + + /* + * XXXX this.sicUser = System.getProperty("j2eelogin.name"); this.sicPwd = System.getProperty("j2eelogin.password"); + * this.eisUser = System.getProperty("eislogin.name"); this.eisPwd = System.getProperty("eislogin.password"); + */ + debug("LocalTxMessageWork.constructor"); + } + + public void setBootstrapContext(BootstrapContext bsc) { + this.ctx = bsc; + /* + * XXXX this.wm = bsc.getWorkManager(); this.xa = ctx.getXATerminator(); + */ + } + + /* + * This is a privaet convenience method that is use for sending a message that contains some role information to the + * mdb. The mdb will be looking for a msg that begins with the string "ROLE". Once the mdb encounters this msg, it will + * perform a specific test and then send back a response to us via a AppException that we will want to log. This method + * is used to assist with checking assertions Connector:SPEC:232 and Connector:SPEC:233. (This is used in conjunction + * with connector/mdb/MessageBean.java) + */ + private void doSICMsgCheck(MessageEndpoint ep, Method onMessage) { + + try { + + ep.beforeDelivery(onMessage); + String message = "ROLE: ADM"; + + ((TSMessageListenerInterface) ep).onMessage(message); + } catch (AppException ex) { + String str = ex.getMessage(); + debug("str = " + str); + if ((str != null) && (str.equals("MDB-SIC SUCCESS"))) { + debug(SICPASS); + ConnectorStatus.getConnectorStatus().logState(SICPASS); + } else { + debug("MDB-SIC FAILED due to AppException with msg: " + ex.getMessage()); + debug(SICFAIL); + ex.printStackTrace(); + ConnectorStatus.getConnectorStatus().logState(SICFAIL); + } + } catch (Exception e) { + // problem if here - we had some problem with msg exchange with MDB. + debug("MDB-SIC FAILED due to Exception with msg: " + e.getMessage()); + debug(SICFAIL); + e.printStackTrace(); + ConnectorStatus.getConnectorStatus().logState(SICFAIL); + } finally { + try { + ep.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + } + + public void run() { + + while (!stop) { + try { + debug("Inside the LocalTxMessageWork run "); + // Createing ep and ep1 for comparison + + MessageEndpoint ep = factory.createEndpoint(null); + MessageEndpoint ep1 = factory.createEndpoint(null); + + ep2 = factory.createEndpoint(null); + // creating xaep to check if the message delivery is transacted. + MessageEndpoint xaep = factory.createEndpoint(msgxa); + + if ((ep != null) && (!ep.equals(ep1))) { + ConnectorStatus.getConnectorStatus().logState("LocalTx Unique MessageEndpoint returned"); + } + + chkMessageEndpointImpl(ep); + + Method onMessage = getOnMessageMethod(); + ep.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep).onMessage("LocalTx Message To MDB"); + ep.afterDelivery(); + ConnectorStatus.getConnectorStatus().logState("LocalTx Message To MDB"); + + doSICMsgCheck(ep, onMessage); + + Method onMessagexa = getOnMessageMethod(); + xaep.beforeDelivery(onMessagexa); + ((TSMessageListenerInterface) xaep).onMessage("LocalTx Non Transacted Message To MDB1"); + xaep.afterDelivery(); + + ConnectorStatus.getConnectorStatus().logState("LocalTx Non Transacted Message To MDB1"); + + System.out.println("Calling sysExp()"); + + callSysExp(); + callAppExp(); + + boolean de = factory.isDeliveryTransacted(onMessagexa); + + if (!de) { + System.out.println("MDB1 delivery is not transacted"); + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB1 delivery is not transacted"); + } + + break; + } catch (AppException ex) { + + ex.printStackTrace(); + } catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + } catch (NoSuchMethodException nse) { + nse.printStackTrace(); + } catch (ResourceException re) { + re.printStackTrace(); + } + + } + + } + + public void callSysExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw EJBException from NotSupported"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (NoSuchMethodException e) { + debug("LocalTxMessageWork: NoSuchMethodException"); + e.getMessage(); + e.printStackTrace(); + } catch (UnavailableException e) { + debug("LocalTxMessageWork: UnavailableException"); + e.printStackTrace(); + } catch (ResourceException re) { + debug("LocalTxMessageWork: ResourceException"); + re.printStackTrace(); + } catch (AppException ae) { + debug("LocalTxMessageWork: AppException"); + ae.printStackTrace(); + } catch (Exception e) { + // if we are in here, we assume our exception is expected and is of type + // ejb + // but it could also be from a non-ejb POJO - thus we use this Exception + // type. + debug("EJBException thrown by NotSupported MDB"); + ConnectorStatus.getConnectorStatus().logState("EJBException thrown by NotSupported"); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + + } + + public void callAppExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw AppException from NotSupported"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (AppException ejbe) { + debug("AppException thrown by NotSupported MDB"); + ConnectorStatus.getConnectorStatus().logState("AppException thrown by NotSupported"); + } catch (NoSuchMethodException ns) { + ns.printStackTrace(); + } catch (ResourceException re) { + re.printStackTrace(); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + private void chkMessageEndpointImpl(MessageEndpoint ep) { + if (ep instanceof MessageEndpoint && ep instanceof TSMessageListenerInterface) { + ConnectorStatus.getConnectorStatus().logState("LocalTx MessageEndpoint interface implemented"); + ConnectorStatus.getConnectorStatus().logState("LocalTx TSMessageListener interface implemented"); + } else { + ConnectorStatus.getConnectorStatus().logState("MessageEndpoint and TSMessageListenerInterface not implemented"); + } + } + + @Override + public List getWorkContexts() { + return contextsList; + } + + public void addWorkContext(WorkContext ic) { + contextsList.add(ic); + } + + @Override + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + + private void debug(String val) { + Debug.trace(val); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java new file mode 100644 index 0000000000..a64755d0e7 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork1.java @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.lang.reflect.Method; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; + +public class LocalTxMessageWork1 implements Work { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource("LocalTxMessageXAResource1"); + + private MessageEndpoint xaep; + + private MessageEndpoint ep2; + + public LocalTxMessageWork1(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + System.out.println("LocalTxMessageWork1.constructor"); + + } + + public void run() { + + while (!stop) { + try { + System.out.println("Inside the LocalTxMessageWork1 run "); + // creating xaep to check if the message delivery is transacted. + xaep = factory.createEndpoint(msgxa); + + ep2 = factory.createEndpoint(null); + + Method onMessagexa = getOnMessageMethod(); + xaep.beforeDelivery(onMessagexa); + ((TSMessageListenerInterface) xaep).onMessage("LocalTx MDB2 Transacted Message To MDB"); + xaep.afterDelivery(); + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB2 Transacted Message To MDB"); + + callSysExp(); + callAppExp(); + + System.out.println("LocalTx MDB2 Transacted Message To MDB"); + + boolean de = factory.isDeliveryTransacted(onMessagexa); + + if (de) { + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB2 delivery is transacted"); + System.out.println("LocalTx MDB2 delivery is transacted"); + } + break; + } catch (AppException ex) { + ex.printStackTrace(); + } + + catch (NoSuchMethodException e) { + e.printStackTrace(); + } + + catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + } catch (ResourceException re) { + re.printStackTrace(); + } + + } + + } + + public void callSysExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw EJBException from Required"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (NoSuchMethodException e) { + System.out.println("LocalTxMessageWork1: NoSuchMethodException"); + e.getMessage(); + e.printStackTrace(); + } catch (UnavailableException e) { + System.out.println("LocalTxMessageWork1: UnavailableException"); + e.printStackTrace(); + } catch (ResourceException re) { + System.out.println("LocalTxMessageWork1: ResourceException"); + re.printStackTrace(); + } catch (AppException ae) { + System.out.println("LocalTxMessageWork1: AppException"); + ae.printStackTrace(); + } catch (Exception e) { + // if we are in here, we will assume that our exception was of type ejb + // but it + // could also be from a non-ejb POJO - thus we use this Exception type. + System.out.println("EJBException thrown by Required"); + ConnectorStatus.getConnectorStatus().logState("EJBException thrown by Required"); + e.printStackTrace(); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + + } + + public void callAppExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw AppException from Required"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (AppException ejbe) { + System.out.println("AppException thrown by Required MDB"); + ConnectorStatus.getConnectorStatus().logState("AppException thrown by Required"); + } catch (NoSuchMethodException ns) { + ns.printStackTrace(); + } catch (ResourceException re) { + re.printStackTrace(); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + @Override + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java new file mode 100644 index 0000000000..1d2338f9ce --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageWork2.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.lang.reflect.Method; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; + +public class LocalTxMessageWork2 implements Work { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource("LocalTxMessageXAResource2"); + + public LocalTxMessageWork2(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + System.out.println("LocalTxMessageWork2.constructor"); + } + + public void run() { + + while (!stop) { + try { + + // creating xaep to check if the message delivery is transacted. + MessageEndpoint xaep = factory.createEndpoint(msgxa); + MessageEndpoint xaep1 = factory.createEndpoint(msgxa); + MessageEndpoint xaep2 = factory.createEndpoint(msgxa); + + Method onMessagexa = getOnMessageMethod(); + ((TSMessageListenerInterface) xaep).onMessage("LocalTx MDB2 Transacted Message1"); + ((TSMessageListenerInterface) xaep1).onMessage("LocalTx MDB2 Transacted Message2"); + ((TSMessageListenerInterface) xaep2).onMessage("LocalTx MDB2 Transacted Message3"); + + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB2 Transacted Message1"); + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB2 Transacted Message2"); + ConnectorStatus.getConnectorStatus().logState("LocalTx MDB2 Transacted Message3"); + + break; + } catch (AppException ex) { + ex.printStackTrace(); + } catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + @Override + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java new file mode 100644 index 0000000000..c2153b932a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxMessageXAResource.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +/** + * Be careful..... This class will log a variety of message strings that will be used by client side tests. If you + * change any strings in this class, it is likely to result in test failures unless you are sure you know what tests you + * are affecting. + */ +public class LocalTxMessageXAResource implements XAResource { + String sHeader = "SomeDefault"; + + public LocalTxMessageXAResource() { + Debug.trace("LocalTxMessageXAResource constructor"); + } + + /* + * This constructor takes a string val. The passed in string is a unique string that will be used in client side test + * verifications. Making changes to the passed in string val is likely to result in test failures - so don't muck with + * the value unless you know exactly what tests you are affecting.. + */ + public LocalTxMessageXAResource(String val) { + sHeader = val; + Debug.trace(sHeader + " constructor"); + } + + private void handleResourceException(Exception ex) throws XAException { + + XAException xae = new XAException(ex.toString()); + xae.errorCode = XAException.XAER_RMERR; + throw xae; + } + + @Override + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + String str1 = sHeader + ".commit"; + ConnectorStatus.getConnectorStatus().logState(str1); + Debug.trace(str1); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + @Override + public void start(Xid xid, int flags) throws XAException { + try { + String str1 = sHeader + ".start"; // e.g. "LocalTxMessageXAResource.start" + Debug.trace(str1); + ConnectorStatus.getConnectorStatus().logState(str1); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + @Override + public void end(Xid xid, int flags) throws XAException { + try { + String str1 = sHeader + ".end"; // e.g. "LocalTxMessageXAResource.end" + Debug.trace(str1); + ConnectorStatus.getConnectorStatus().logState(str1); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + @Override + public void forget(Xid xid) throws XAException { + String str1 = sHeader + ".forget"; // e.g. "LocalTxMessageXAResource.forget" + Debug.trace(str1); + } + + @Override + public int getTransactionTimeout() throws XAException { + return 1; + } + + @Override + public boolean isSameRM(XAResource other) throws XAException { + String str1 = sHeader + ".isSameRM"; // e.g. + // "LocalTxMessageXAResource.isSameRM" + Debug.trace(str1); + return false; + } + + @Override + public int prepare(Xid xid) throws XAException { + String str1 = sHeader + ".prepare"; // e.g. + // "LocalTxMessageXAResource.prepare" + ConnectorStatus.getConnectorStatus().logAPI(str1, "", ""); + Debug.trace(str1); + try { + return XAResource.XA_OK; + } catch (Exception ex) { + handleResourceException(ex); + return XAException.XAER_RMERR; + } + } + + @Override + public Xid[] recover(int flag) throws XAException { + String str1 = sHeader + ".recover"; // e.g. + // "LocalTxMessageXAResource.recover" + Debug.trace(str1); + return null; + } + + @Override + public void rollback(Xid xid) throws XAException { + try { + Debug.trace(sHeader + ".rollback"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + @Override + public boolean setTransactionTimeout(int seconds) throws XAException { + return true; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java new file mode 100644 index 0000000000..aae6e4794a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/LocalTxResourceAdapterImpl.java @@ -0,0 +1,434 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.Serializable; +import java.lang.reflect.Method; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.DistributableWorkManager; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +public class LocalTxResourceAdapterImpl implements ResourceAdapter, Serializable { + /** + * + */ + private static final long serialVersionUID = 1L; + // IMPORTANT: for compliance, if you add non-transient member data + // here, be sure to add respective entry to equals() method below. + + private transient TestWorkManager twm; + + private transient TestBootstrapContext tbs; + + private transient LocalTxMessageListener ml; + + private String RAName; // value from ra's xml file + + private Boolean useSecurityMapping = null; // value from ra's xml file + + private int counter = 0; + + private transient LocalTxMessageWork work1; + + private transient LocalTxMessageWork1 work2; + + private transient LocalTxMessageWork2 work3; + + private transient WorkManager wm; + + private int mefcount = 0; + + private transient MessageEndpointFactory mef1; + + private transient MessageEndpointFactory mef2; + + private transient BootstrapContext bsc; + + private String sicUser = ""; // this should correspond to ts.jte's 'user' + // property + + private String sicPwd = ""; // this should correspond to ts.jte's 'password' + // property + + private String eisUser = ""; // this should correspond to ts.jte's 'user1' + // property + + private String eisPwd = ""; // this should correspond to ts.jte's 'password' + // property + + public LocalTxResourceAdapterImpl() { + ConnectorStatus.getConnectorStatus().logState("LocalTxResourceAdapterImpl Constructor "); + Debug.trace("LocalTxResourceAdapterImpl Constructor "); + + this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); + } + + @Override + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + Debug.trace("LocalTxResourceAdapter Started " + counter); + String str1 = "LocalTxResourceAdapter Started " + counter; + ConnectorStatus.getConnectorStatus().logState(str1); + + // get WorkManager reference + + wm = bsc.getWorkManager(); + + if (bsc != null) { + ConnectorStatus.getConnectorStatus().logState("LocalTxResourceAdapter BootstrapContext Not Null "); + } + + if (wm != null) { + ConnectorStatus.getConnectorStatus().logState("LocalTxResourceAdapter WorkManager Not Null "); + + if (wm instanceof DistributableWorkManager) { + Debug.trace("wm supports DistributableWorkManager"); + ConnectorStatus.getConnectorStatus().logState("wm supports DistributableWorkManager"); + } else { + Debug.trace("wm Does NOT support DistributableWorkManager"); + ConnectorStatus.getConnectorStatus().logState("wm Does NOT support DistributableWorkManager"); + } + + } + try { + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + wm = ctx.getWorkManager(); + // Create TestWorkManager object + twm = new TestWorkManager(ctx); + if (this.useSecurityMapping.booleanValue() == true) { + // values from our RA xml file indicate we want to establish Case 2 + // security for the RA. This means we need security mappings. + Debug.trace(" LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); + ConnectorStatus.getConnectorStatus().logState(" LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); + twm.setUseSecurityMapping(true); + } else { + // use Case 1 security thus do NO mapping of identities + Debug.trace(" LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); + ConnectorStatus.getConnectorStatus().logState(" LocalTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); + twm.setUseSecurityMapping(false); + } + twm.runTests(); + + // Create TestBootstrap object + tbs = new TestBootstrapContext(ctx); + tbs.runTests(); + } + + @Override + public void stop() { + // Set the TestWorkManager to null upon resource adapter shutdown. + + if (work1 != null) { + work1.stop(); + } + if (work2 != null) { + work2.stop(); + } + + if (work3 != null) { + work3.stop(); + } + } + + @Override + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + try { + mefcount++; + + // check if endpointActivation has been called + Debug.trace("LocalTxResourceAdapter.endpointActivation called"); + Method onMessagexa = getOnMessageMethod(); + boolean de = mef.isDeliveryTransacted(onMessagexa); + + // For MDB with Not Supported transaction attribute + if (!de) { + mef1 = mef; + String destinationName = ((LocalTxActivationSpec) as).getDestinationName(); + Debug.trace("LocalTxResourceAdapter preparing work1"); + + if (mef1 != null) { + Debug.trace("mef1 is not null"); + } + + work1 = new LocalTxMessageWork(destinationName, mef1); + work1.setBootstrapContext(bsc); + + // perform some msging to test SIC + TSSecurityContext sic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, this.useSecurityMapping.booleanValue()); + work1.addWorkContext(sic); + + Debug.trace("LocalTxResourceAdapter work1 created"); + wm.scheduleWork(work1, WorkManager.INDEFINITE, null, null); + Debug.trace("LocalTxResourceAdapter work1 scheduled"); + } else // For MDB with Required transaction attribute + { + // Endpoint requires a tranaction but no incoming transaction + mef2 = mef; + Debug.trace("LocalTxResourceAdapter preparing work2"); + String destinationName = ((LocalTxActivationSpec) as).getDestinationName(); + Debug.trace("Before Destination name"); + Debug.trace("Destination name is " + destinationName); + + if (mef2 != null) { + Debug.trace("mef2 is not null"); + } + + work2 = new LocalTxMessageWork1(destinationName, mef2); + + Debug.trace("LocalTxResourceAdapter work2 created"); + wm.scheduleWork(work2, WorkManager.INDEFINITE, null, null); + Debug.trace("LocalTxResourceAdapter work2 scheduled"); + + // Endpoint requires a tranaction and there is an incoming transaction + work3 = new LocalTxMessageWork2(destinationName, mef2); + XidImpl myid = new XidImpl(); + ExecutionContext ec = new ExecutionContext(); + int idcount = myid.getFormatId(); + Debug.trace("XID getting used [ " + idcount + " ]"); + ec.setXid(myid); + ml = new LocalTxMessageListener(myid, this.bsc); + wm.scheduleWork(work3, WorkManager.INDEFINITE, ec, ml); + } + + if (mefcount == 2) { + chkUniqueMessageEndpointFactory(); + } + + } catch (Throwable ex) { + ex.printStackTrace(); + } + + } + + @Override + public XAResource[] getXAResources(ActivationSpec[] as) { + return null; + } + + private Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + if ((mef1 != null) && (!mef1.equals(mef2))) { + ConnectorStatus.getConnectorStatus().logState("LocalTx MessageEndpointFactory is Unique"); + + // Also checking if the equals on the MEF is implemented correctly. + // Normally MEF equals should not be over ridden but if it is + // it should be implemented correctly. + ConnectorStatus.getConnectorStatus().logState("LocalTx MessageEndpointFactory equals implemented correctly"); + } + } + + @Override + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + mefcount--; + + if ((mef1 != null) && (mef1.equals(mef))) { + mef1 = null; + + } else if ((mef2 != null) && (mef2.equals(mef))) { + mef2 = null; + + } else { + // possible issue so dump some debugging/trace info + String str = "WARNING: LocalTxResourceAdapterImpl.endpointDeactivation(): "; + str += "unexpected MEF passed in"; + Debug.trace(str); + if (mef == null) { + Debug.trace("NULL MEF passed into endpointDeactivation()"); + } else { + Debug.trace("Unrecognize mef passed into endpointDeactivation()"); + } + } + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof LocalTxResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + LocalTxResourceAdapterImpl that = (LocalTxResourceAdapterImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (this.mefcount != that.getMefcount()) { + return false; + } + + if (!Util.isEqual(this.sicUser, that.getSicUser())) + return false; + + if (!Util.isEqual(this.sicPwd, that.getSicPwd())) + return false; + + if (!Util.isEqual(this.eisUser, that.getEisUser())) + return false; + + if (!Util.isEqual(this.eisPwd, that.getEisPwd())) + return false; + + if (!Util.isEqual(this.RAName, that.getRAName())) + return false; + + if (this.getUseSecurityMapping().booleanValue() != that.getUseSecurityMapping().booleanValue()) { + return false; + } + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRAName(String name) { + ConnectorStatus.getConnectorStatus().logState("LocalTxResourceAdapter.setRAName"); + this.RAName = name; + } + + public String getRAName() { + Debug.trace("LocalTxResourceAdapter.getRAName"); + return RAName; + } + + public void setUseSecurityMapping(Boolean val) { + this.useSecurityMapping = val; + } + + public Boolean getUseSecurityMapping() { + return this.useSecurityMapping; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + + public void setMefcount(int val) { + this.mefcount = val; + } + + public int getMefcount() { + return this.mefcount; + } + + public void setSicUser(String val) { + this.sicUser = val; + } + + public String getSicUser() { + return this.sicUser; + } + + public void setSicPwd(String val) { + this.sicPwd = val; + } + + public String getSicPwd() { + return this.sicPwd; + } + + public void setEisUser(String val) { + this.eisUser = val; + } + + public String getEisUser() { + return this.eisUser; + } + + public void setEisPwd(String val) { + this.eisPwd = val; + } + + public String getEisPwd() { + return this.eisPwd; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java new file mode 100644 index 0000000000..7729c6a898 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/MetaDataImpl.java @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.IllegalStateException; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.security.PasswordCredential; + +public class MetaDataImpl implements ManagedConnectionMetaData { + + private TSManagedConnection mc; + + public MetaDataImpl(TSManagedConnection mc) { + this.mc = mc; + } + + /* + * @name getEISProductName + * + * @desc Gets product name of underlying EIS. + * + * @return String + * + * @exception ResourceException + */ + @Override + public String getEISProductName() throws ResourceException { + try { + String str = "Simple TS EIS"; + return str; + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name getEISProductVersion + * + * @desc Gets product version of underlying EIS. + * + * @return String + * + * @exception ResourceException + */ + @Override + public String getEISProductVersion() throws ResourceException { + try { + String str = "1.0"; + return str; + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name getMaxConnections + * + * @desc Returns maximum limit on number of active concurrent connections that an EIS instance can support across client + * processes. + * + * @return int + * + * @exception ResourceException + */ + @Override + public int getMaxConnections() throws ResourceException { + try { + int i = 0; + return i; + } catch (Exception ex) { + ResourceException re = new EISSystemException(ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name getUserName + * + * @desc Return name of the user currently associated with ManagedConnection instance. The returned username corresponds + * to the resource principal under whose security context the connection to the EIS instance has been established. + * + * @return String + * + * @exception ResourceException + */ + @Override + public String getUserName() throws ResourceException { + if (mc.isDestroyed()) { + throw new IllegalStateException("ManagedConnection has been destroyed"); + } + + PasswordCredential pc = null; + String str = null; + + pc = mc.getPasswordCredential(); + if (pc != null) { + str = pc.getUserName(); + } + + if (pc != null && str != null && !str.equals("")) + return str; + else + return null; + + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java similarity index 58% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java index 2df487074d..933ebaa298 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestWork.java @@ -38,51 +38,51 @@ */ public class NestWork implements Work, WorkContextProvider { - private List contextsList = new ArrayList(); + private List contextsList = new ArrayList(); - private String name = "NestWork.name"; + private String name = "NestWork.name"; - private String description = "NestWork.description"; + private String description = "NestWork.description"; - public NestWork() { - ConnectorStatus.getConnectorStatus().logState("NestWork.constructor"); - } + public NestWork() { + ConnectorStatus.getConnectorStatus().logState("NestWork.constructor"); + } - @Override - public List getWorkContexts() { - return contextsList; - } + @Override + public List getWorkContexts() { + return contextsList; + } - public void setWorkContexts(List val) { - contextsList = val; - } + public void setWorkContexts(List val) { + contextsList = val; + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public String getDescription() { - return description; - } + public String getDescription() { + return description; + } - public void addWorkContext(WorkContext ic) { - contextsList.add(ic); - } + public void addWorkContext(WorkContext ic) { + contextsList.add(ic); + } - public boolean hasContextEntry() { - if (contextsList.isEmpty()) { - return false; - } else { - return true; + public boolean hasContextEntry() { + if (contextsList.isEmpty()) { + return false; + } else { + return true; + } } - } - @Override - public void release() { - } + @Override + public void release() { + } - public void run() { - ConnectorStatus.getConnectorStatus().logState("NestWork.run"); - } + public void run() { + ConnectorStatus.getConnectorStatus().logState("NestWork.run"); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java similarity index 63% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java index 036a3ce920..6dfad142af 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NestedWorkXid.java @@ -26,22 +26,20 @@ public class NestedWorkXid implements Work { - public NestedWorkXid() { - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.constructor", "", - ""); - System.out.println("NestedWorkXid.constructor"); - } - - @Override - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.release", "", - ""); - System.out.println("NestedWorkXid.release"); - } - - public void run() { - ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.run", "", ""); - System.out.println("NestedWorkXid.run"); - } + public NestedWorkXid() { + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.constructor", "", ""); + System.out.println("NestedWorkXid.constructor"); + } + + @Override + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.release", "", ""); + System.out.println("NestedWorkXid.release"); + } + + public void run() { + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid.run", "", ""); + System.out.println("NestedWorkXid.run"); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java new file mode 100644 index 0000000000..ac0d2f7489 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxManagedConnectionFactory.java @@ -0,0 +1,350 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +public class NoTxManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + + private ResourceAdapter resourceAdapter; + + private javax.naming.Reference reference; + + private int count; + + private String password; + + private String user; + + private String userName; + + /* + * @name NoTxManagedConnectionFactory + * + * @desc Default conctructor + */ + public NoTxManagedConnectionFactory() { + } + + public String getUser() { + System.out.println("NoTxManagedConnectionFactory.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + System.out.println("NoTxManagedConnectionFactory.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + System.out.println("NoTxManagedConnectionFactory.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + System.out.println("NoTxManagedConnectionFactory.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + System.out.println("NoTxManagedConnectionFactory.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + System.out.println("NoTxManagedConnectionFactory.setPassword() with val = " + val); + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + @Override + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("NoTxManagedConnectionFactory.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + + @Override + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "NoTxManagedConnectionFactory setResourceAdapter " + count; + System.out.println(newStr1); + ConnectorStatus.getConnectorStatus().logState(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + + @Override + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + + @Override + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("NoTxManagedConnectionFactory.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + + @Override + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + TSConnection con = null; + String userName = null; + ConnectorStatus.getConnectorStatus().logAPI("NoTxManagedConnectionFactory.createManagedConnection", "", "TSManagedConnection"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + con = new TSConnectionImpl().getConnection(); + } else { + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + return new TSManagedConnection(this, pc, null, con, false, false); + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + @Override + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("NoTxManagedConnecitonFactory.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc sets the log writer + * + * @param PrinterWriter out + * + * @exception ResourceException + */ + @Override + public void setLogWriter(PrintWriter out) throws ResourceException { + + } + + /* + * @name getLogWriter + * + * @desc gets the log writer + * + * @return PrinterWriter out + * + * @exception ResourceException + */ + @Override + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + @Override + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof NoTxManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + NoTxManagedConnectionFactory that = (NoTxManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + @Override + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + @Override + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + @Override + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java new file mode 100644 index 0000000000..74cbf6fab4 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/NoTxResourceAdapterImpl.java @@ -0,0 +1,275 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.Vector; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +public class NoTxResourceAdapterImpl implements ResourceAdapter, Serializable { + // IMPORTANT: for compliance, if you add non-transient member data + // here, be sure to add respective entry to equals() method below. + + private transient TestWorkManager twm; + + private transient TestBootstrapContext tbs; + + private transient LocalTxMessageListener ml; + + private String RAName; // value from ra's xml file + + private Boolean useSecurityMapping = null; // value from ra's xml file + + private int counter = 0; + + private transient javax.transaction.xa.XAResource xaresource; + + private transient WorkManager wm; + + private int mefcount = 0; + + private transient MessageEndpointFactory mef1; + + private transient MessageEndpointFactory mef2; + + private transient BootstrapContext bsc; + + public NoTxResourceAdapterImpl() { + ConnectorStatus.getConnectorStatus().logState("NoTxResourceAdapterImpl Constructor"); + System.out.println("NoTxResourceAdapterImpl Constructor"); + } + + @Override + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + System.out.println("NoTxResourceAdapter Started " + counter); + String str1 = "NoTxResourceAdapter Started " + counter; + ConnectorStatus.getConnectorStatus().logState(str1); + + // get WorkManager reference + + WorkManager wm = bsc.getWorkManager(); + + if (bsc != null) { + ConnectorStatus.getConnectorStatus().logState("NoTxResourceAdapter BootstrapContext Not Null "); + } + + if (wm != null) { + ConnectorStatus.getConnectorStatus().logState("NoTxResourceAdapter WorkManager Not Null "); + } + + try { + checkAssociation(); + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + wm = ctx.getWorkManager(); + // Create TestWorkManager object + twm = new TestWorkManager(ctx); + if (this.useSecurityMapping.booleanValue() == true) { + // values from our RA xml file indicate we want to establish Case 2 + // security for the RA. This means we need security mappings. + Debug.trace("NoTxResourceAdapterImpl ; calling setUseSecurityMapping(true)"); + twm.setUseSecurityMapping(true); + } else { + // use Case 1 security thus do NO mapping of identities + Debug.trace("NoTxResourceAdapterImpl ; calling setUseSecurityMapping(false)"); + twm.setUseSecurityMapping(false); + } + twm.runTests(); + + // Create TestBootstrap object + tbs = new TestBootstrapContext(ctx); + tbs.runTests(); + } + + @Override + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + @Override + public void stop() { + // Set the TestWorkManager to null upon resource adapter shutdown. + // twm = null; + } + + @Override + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + + } + + @Override + public XAResource[] getXAResources(ActivationSpec[] as) { + return null; + } + + private Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + if ((mef1 != null) && (!mef1.equals(mef2))) { + Debug.trace("NoTx MessageEndpointFactory is Unique"); + Debug.trace("NoTx MessageEndpointFactory equals implemented correctly"); + } + } + + /* + * This method is used to assist in the verification process of assertion Connector:SPEC:245 This method must be called + * befor the work instances 'run' method is called. This method checks if the setResourceAdapter() method was called and + * if so, then this method logs a message to indicate that it was called prior to the 'run' method of the run method. + */ + public void checkAssociation() { + Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); + String toCheck1 = "NoTxManagedConnectionFactory setResourceAdapter 1"; + + for (int i = 0; i < vLog.size(); i++) { + String str = (String) vLog.elementAt(i); + if (str.startsWith(toCheck1)) { + ConnectorStatus.getConnectorStatus().logState("NoTxResourceAdapter - association exists between RA and work"); + break; + } + } + + } + + public void setRAName(String name) { + ConnectorStatus.getConnectorStatus().logState("NoTxResourceAdapter.setRAName"); + this.RAName = name; + } + + public String getRAName() { + Debug.trace("NoTxResourceAdapter.getRAName"); + return RAName; + } + + public void setUseSecurityMapping(Boolean val) { + this.useSecurityMapping = val; + } + + public Boolean getUseSecurityMapping() { + return this.useSecurityMapping; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + + public void setMefcount(int val) { + this.mefcount = val; + } + + public int getMefcount() { + return this.mefcount; + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof NoTxResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + NoTxResourceAdapterImpl that = (NoTxResourceAdapterImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (this.mefcount != that.getMefcount()) { + return false; + } + + if (!Util.isEqual(this.RAName, that.getRAName())) + return false; + + if (this.getUseSecurityMapping().booleanValue() != that.getUseSecurityMapping().booleanValue()) { + return false; + } + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java similarity index 64% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java index d67ccb8236..eecfbce910 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/RogueWorkImpl.java @@ -26,26 +26,24 @@ public class RogueWorkImpl implements Work { - public RogueWorkImpl() { - - ConnectorStatus.getConnectorStatus().logAPI("RogueWorkImpl.constructor", "", - ""); - System.out.println("RogueWorkImpl.constructor"); - } - - @Override - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("RogueWorkImpl.release", "", - ""); - System.out.println("RogueWorkImpl.release"); - } - - public void run() { - final int i = 0; - final int y = 10; - - int x = y / i; - System.out.println("Answer is " + x); - } + public RogueWorkImpl() { + + ConnectorStatus.getConnectorStatus().logAPI("RogueWorkImpl.constructor", "", ""); + System.out.println("RogueWorkImpl.constructor"); + } + + @Override + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("RogueWorkImpl.release", "", ""); + System.out.println("RogueWorkImpl.release"); + } + + public void run() { + final int i = 0; + final int y = 10; + + int x = y / i; + System.out.println("Answer is " + x); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java similarity index 66% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java index a6fa99a5a9..1e3f245b93 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ScheduleWork.java @@ -26,21 +26,20 @@ public class ScheduleWork implements Work { - public ScheduleWork() { - - ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.constructor", "", - ""); - System.out.println("ScheduleWork.constructor"); - } - - @Override - public void release() { - ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.release", "", ""); - System.out.println("ScheduleWork.release"); - } - - public void run() { - ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.run", "", ""); - } + public ScheduleWork() { + + ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.constructor", "", ""); + System.out.println("ScheduleWork.constructor"); + } + + @Override + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.release", "", ""); + System.out.println("ScheduleWork.release"); + } + + public void run() { + ConnectorStatus.getConnectorStatus().logAPI("ScheduleWork.run", "", ""); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java new file mode 100644 index 0000000000..4c52d3c51a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/SimplePrincipal.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.security.Principal; + +/** + * @author Raja Perumal + */ +public class SimplePrincipal implements Principal, java.io.Serializable { + private String name = null; // username + + private String password = null; // password + + public SimplePrincipal(String val) { + name = val; + } + + public SimplePrincipal(String val, String pwd) { + name = val; + password = pwd; + } + + // required to satisfy Principal interface + @Override + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof SimplePrincipal)) { + return false; + } + if (obj == this) { + return true; + } + + SimplePrincipal that = (SimplePrincipal) obj; + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.name, that.getName())) + return false; + + return true; + } + + // required to satisfy Principal interface + @Override + public String getName() { + return name; + } + + public void setName(String val) { + name = val; + } + + public void setPassword(String val) { + password = val; + } + + // required to satisfy Principal interface + @Override + public String toString() { + return name; + } + + // required to satisfy Principal interface + @Override + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + // may want to change this later if tests call for it + // this is normally bad but for testing purposes we dont care + public String getPassword() { + return password; + } +} // end of class SimulateRuntime diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java new file mode 100644 index 0000000000..f213405001 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnection.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Hashtable; +import java.util.Vector; + +/** + * A Pooled object interface. + * + * @version 2.0, 06/06/02 + * @author Gursharan Singh/Binod P.G + */ +public interface TSConnection { + + /** + * Insert a key and value in Test Information System (TSEIS). + * + * @param key Key to insert. + * @param value value to insert. + * @throws Exception If the key is already present in the EIS. + */ + public void insert(String key, String value) throws Exception; + + /** + * Delete the key and value from Test Information System (TSEIS). + * + * @param key Key to delete. + * @throws Exception If the key is not present in the EIS. + */ + public void delete(String key) throws Exception; + + /** + * Update the key and value in Test Information System (TSEIS). + * + * @param key Key to update. + * @param value value to update. + * @throws Exception If the key is not present in the EIS. + */ + public void update(String key, String value) throws Exception; + + /** + * Read the value for the key. + * + * @param key Key to read. + * @return String value. + * @throws Exception If the key is not present in the EIS. + */ + public String readValue(String key) throws Exception; + + /** + * Drops all data in the EIS. + * + * @throws Exception If there is any exception while droppping. + */ + public void dropTable() throws Exception; + + /** + * Rolls back all the operations. + */ + public void rollback(); + + /** + * Commits all the operations. + * + * @throws Exception If commit fails. + */ + public void commit() throws Exception; + + public void begin() throws Exception; + + /** + * Closes this connection. + * + * @throws Exception If close fails. + */ + public void close() throws Exception; + + /** + * Sets the auto-commit flag to the value passed in. True indicates that all the operation will be committed. If a false + * is passed, EIS will wait until an explicit commit is executed. + * + * @param flag True or False + */ + public void setAutoCommit(boolean flag); + + /** + * Get the auto-commt flag value. + * + * @return the boolean value indicating auto-commit. + */ + public boolean getAutoCommit(); + + /** + * Get all the data in the TSEis. Only Data is returned. Keys are not. + * + * @return Vector containing all the data values. + * @throws Exception If read fails. + */ + public Vector readData() throws Exception; + + /** + * Get the data cache of the connection accumulated during a transaction. + * + * @returns Data cache of operations on the connection. + */ + public Hashtable getTempTable(); +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java new file mode 100644 index 0000000000..bd93e0ff05 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionEventListener.java @@ -0,0 +1,164 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Vector; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.ConnectionEvent; +import jakarta.resource.spi.ConnectionEventListener; +import jakarta.resource.spi.ManagedConnection; + +public class TSConnectionEventListener implements ConnectionEventListener { + + private Vector listeners; + + private ManagedConnection mcon; + + /* + * @name TSConnectionEventListener + * + * @desc TSConnectionEventListener constructor + * + * @param ManagedConnection mcon + */ + + public TSConnectionEventListener(ManagedConnection mcon) { + listeners = new Vector(); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.constructor", "mcon", ""); + this.mcon = mcon; + } + + /* + * @name sendEvent + * + * @desc send event notifications + * + * @param int eventType, Exception ex, Object connectionHandle + */ + public void sendEvent(int eventType, Exception ex, Object connectionHandle) { + Vector list = (Vector) listeners.clone(); + ConnectionEvent ce = null; + if (ex == null) { + ce = new ConnectionEvent(mcon, eventType); + } else { + ce = new ConnectionEvent(mcon, eventType, ex); + } + if (connectionHandle != null) { + ce.setConnectionHandle(connectionHandle); + } + int size = list.size(); + for (int i = 0; i < size; i++) { + ConnectionEventListener l = (ConnectionEventListener) list.elementAt(i); + switch (eventType) { + case ConnectionEvent.CONNECTION_CLOSED: + l.connectionClosed(ce); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.sendEvent", "CONNECTION_CLOSED", ""); + System.out.println("TSConnectionEventListener.sendEvent:CONNECTION_CLOSED"); + break; + case ConnectionEvent.LOCAL_TRANSACTION_STARTED: + l.localTransactionStarted(ce); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.sendEvent", "LOCAL_TRANSACTION_STARTED", ""); + break; + case ConnectionEvent.LOCAL_TRANSACTION_COMMITTED: + l.localTransactionCommitted(ce); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.sendEvent", "LOCAL_TRANSACTION_COMMITED", ""); + break; + case ConnectionEvent.LOCAL_TRANSACTION_ROLLEDBACK: + l.localTransactionRolledback(ce); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.sendEvent", "LOCAL_TRANSACTION_ROLLEDBACK", ""); + break; + case ConnectionEvent.CONNECTION_ERROR_OCCURRED: + l.connectionErrorOccurred(ce); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.sendEvent", "CONNECTION_ERROR_OCCURED", ""); + break; + default: + throw new IllegalArgumentException("Illegal eventType: " + eventType); + } + } + } + + public void localTransactionRolledback(ConnectionEvent event) { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.localTransactionRolledBack", "", ""); + System.out.println("TSConnectionEventListener.localTransactionRolledback"); + } + + public void localTransactionCommitted(ConnectionEvent event) { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.localTransactionCommitted", "", ""); + System.out.println("TSConnectionEventListener.localTransactionCommited"); + } + + public void localTransactionStarted(ConnectionEvent event) { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.localTransactionStarted", "", ""); + System.out.println("TSConnectionEventListener.localTransactionStarted"); + } + + /* + * @name addConnectorListener + * + * @desc add a connector event listener + * + * @param ConnectionEventListener + */ + public void addConnectorListener(ConnectionEventListener l) { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.addConnectorListener", "connectionEventListener", ""); + listeners.addElement(l); + } + + /* + * @name removeConnectorListener + * + * @desc remove a connector event listener + * + * @param ConnectionEventListener + */ + public void removeConnectorListener(ConnectionEventListener l) { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionEventListener.removeConnectorListener", "connectionEventListener", ""); + listeners.removeElement(l); + } + + /* + * @name connectionClosed + * + * @desc + * + * @param ConnectionEvent + */ + public void connectionClosed(ConnectionEvent event) { + // do nothing. The event is sent by the TSEISConnection wrapper + } + + /* + * @name connectionErrorOccured + * + * @desc add a connector event listener + * + * @param ConnectionEvent + */ + public void connectionErrorOccurred(ConnectionEvent event) { + ConnectorStatus.getConnectorStatus().logAPI("TSEISConnectionEventListener.connectionErrorOccured", "connectionEvent", ""); + sendEvent(ConnectionEvent.CONNECTION_ERROR_OCCURRED, event.getException(), null); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java similarity index 86% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java index 250a7fc6e8..630df998f3 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionFactory.java @@ -26,8 +26,8 @@ public interface TSConnectionFactory extends Referenceable, Serializable { - public TSConnection getConnection() throws Exception; + public TSConnection getConnection() throws Exception; - public TSConnection getConnection(String usr, String passwd) throws Exception; + public TSConnection getConnection(String usr, String passwd) throws Exception; } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java new file mode 100644 index 0000000000..2805789d24 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionImpl.java @@ -0,0 +1,182 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Hashtable; +import java.util.Vector; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +public class TSConnectionImpl implements TSConnection { + + private boolean inuse = false; + + private boolean autocommit = true; + + private Hashtable tempTable = new Hashtable(); + + public TSConnectionImpl() { + + } + + public TSConnection getConnection() throws Exception { + try { + + TSConnection ctscon = TSeis.getTSeis().getConnection(); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.getConnection", "", ""); + return ctscon; + } catch (Exception ex) { + ex.printStackTrace(); + ex.getMessage(); + return null; + } + } + + public TSConnection getConnection(String user, char[] passwd) throws Exception { + try { + + System.out.println("TSConnectionImpl.getConnection(u,p): user=" + user + " passwd = " + passwd); + + TSConnection ctscon = TSeis.getTSeis().getConnection(user, passwd); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.getConnection", "", ""); + return ctscon; + } catch (Exception ex) { + ex.printStackTrace(); + ex.getMessage(); + return null; + } + } + + public synchronized boolean lease() { + if (inuse) { + return false; + } else { + inuse = true; + return true; + } + } + + protected void expireLease() { + inuse = false; + } + + @Override + public void insert(String key, String value) throws Exception { + try { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.insert", "", ""); + TSeis.getTSeis().insert(key, value, this); + System.out.println("TSConnectionImpl.insert"); + } catch (Exception ex) { + throw ex; + } + } + + @Override + public void delete(String str) throws Exception { + try { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.delete", "", ""); + TSeis.getTSeis().delete(str, this); + System.out.println("TSConnectionImpl.delete"); + } catch (Exception ex) { + throw ex; + } + } + + @Override + public void update(String key, String value) throws Exception { + try { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.update", "", ""); + TSeis.getTSeis().update(key, value, this); + System.out.println("TSConnectionImpl.update"); + } catch (Exception ex) { + throw ex; + } + } + + @Override + public Hashtable getTempTable() { + return tempTable; + } + + public boolean inUse() throws Exception { + return inuse; + } + + @Override + public void setAutoCommit(boolean flag) { + autocommit = flag; + } + + @Override + public boolean getAutoCommit() { + return autocommit; + } + + @Override + public void dropTable() throws Exception { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.dropTable", "", ""); + TSeis.getTSeis().dropTable(); + tempTable.clear(); + } + + @Override + public void begin() throws Exception { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.begin", "", ""); + TSeis.getTSeis().begin(); + } + + @Override + public void rollback() { + + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.rollback", "", ""); + tempTable.clear(); + } + + @Override + public void commit() throws Exception { + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.commit", "", ""); + TSeis.getTSeis().commit(this); + tempTable.clear(); + } + + @Override + public void close() throws Exception { + TSeis.getTSeis().returnConnection(this); + System.out.println("TSConnectionImpl.close"); + } + + @Override + public Vector readData() throws Exception { + Vector table = TSeis.getTSeis().readData(); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.readData", "", ""); + return table; + } + + @Override + public String readValue(String key) throws Exception { + String value = TSeis.getTSeis().readValue(key, this); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.readValue", "", ""); + return value; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java similarity index 80% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java index a87e47c034..a4f39bc24a 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionManager.java @@ -34,15 +34,14 @@ */ public class TSConnectionManager implements ConnectionManager, Serializable { - public TSConnectionManager() { - } + public TSConnectionManager() { + } - @Override - public Object allocateConnection(ManagedConnectionFactory mcf, - ConnectionRequestInfo info) throws ResourceException { + @Override + public Object allocateConnection(ManagedConnectionFactory mcf, ConnectionRequestInfo info) throws ResourceException { - ManagedConnection mc = mcf.createManagedConnection(null, info); + ManagedConnection mc = mcf.createManagedConnection(null, info); - return mc.getConnection(null, info); - } + return mc.getConnection(null, info); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java new file mode 100644 index 0000000000..407c359b77 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSConnectionRequestInfo.java @@ -0,0 +1,122 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import jakarta.resource.spi.ConnectionRequestInfo; + +public class TSConnectionRequestInfo implements ConnectionRequestInfo { + + private String user; + + private String password; + + /* + * @name TSConnectionRequestInfo + * + * @desc TSConnectionRequestInfo constructor + * + * @param String, String + */ + public TSConnectionRequestInfo(String user, String password) { + this.user = user; + this.password = password; + } + + /* + * @name getUser + * + * @desc Gets the user name + * + * @return String + */ + public String getUser() { + return user; + } + + /* + * @name getPassword + * + * @desc Gets the Password + * + * @return String + */ + public String getPassword() { + return password; + } + + /* + * @name equals + * + * @desc Compares the given object with ConnectionRequestInfo. + * + * @param Object + * + * @return boolean + */ + @Override + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof TSConnectionRequestInfo)) { + return false; + } + if (obj == this) { + return true; + } + + TSConnectionRequestInfo that = (TSConnectionRequestInfo) obj; + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Returns the Object hashcode. + * + * @return int + */ + @Override + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name isEqual + * + * @desc Compares two Objects. + * + * @return boolean + */ + private boolean isEqual(Object o1, Object o2) { + if (o1 == null) { + return (o2 == null); + } else { + return o1.equals(o2); + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java similarity index 55% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java index 7759762c67..742b8794ff 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSDataSource.java @@ -24,45 +24,45 @@ public interface TSDataSource extends TSConnectionFactory { - /* - * @name checkConnectionManager - * - * @desc return true if ConnectionManager is Serializable - * - * @return boolean - */ - public boolean checkConnectionManager(); + /* + * @name checkConnectionManager + * + * @desc return true if ConnectionManager is Serializable + * + * @return boolean + */ + public boolean checkConnectionManager(); - /* - * @name getLog - * - * @desc returns the Log. - * - * @return Log - */ - public Vector getLog(); + /* + * @name getLog + * + * @desc returns the Log. + * + * @return Log + */ + public Vector getLog(); - /* - * @name clearLog - * - * @desc Empties the Log - */ - public void clearLog(); + /* + * @name clearLog + * + * @desc Empties the Log + */ + public void clearLog(); - /* - * @name setLogFlag - * - * @desc Turns logging on/off - */ - public void setLogFlag(boolean b); + /* + * @name setLogFlag + * + * @desc Turns logging on/off + */ + public void setLogFlag(boolean b); - /* - * @name getStateLog - * - * @desc returns the Log. - * - * @return Log - */ - public Vector getStateLog(); + /* + * @name getStateLog + * + * @desc returns the Log. + * + * @return Log + */ + public Vector getStateLog(); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java new file mode 100644 index 0000000000..9e933158cb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISConnection.java @@ -0,0 +1,215 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TSEISConnection.java 1.5 02/06/06 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Hashtable; +import java.util.Vector; + +import jakarta.resource.spi.ConnectionEvent; + +public class TSEISConnection implements TSConnection { + + private TSManagedConnection mc; + + private boolean supportsLocalTx; + + /* + * @name TSEISConnection + * + * @desc TSEISConnection constructor + * + * @param TSManagedConnection + */ + public TSEISConnection(TSManagedConnection mc, boolean supportsLocalTx) { + this.mc = mc; + this.supportsLocalTx = supportsLocalTx; + } + + public void insert(String key, String value) throws Exception { + try { + TSConnection con = getTSEISConnection(); + con.insert(key, value); + } catch (Exception ex) { + throw ex; + } + } + + public void delete(String key) throws Exception { + try { + TSConnection con = getTSEISConnection(); + con.delete(key); + } catch (Exception ex) { + throw ex; + } + + } + + public void update(String key, String value) throws Exception { + try { + TSConnection con = getTSEISConnection(); + con.update(key, value); + } catch (Exception ex) { + throw ex; + } + + } + + public Vector readData() throws Exception { + TSConnection con = getTSEISConnection(); + return con.readData(); + + } + + public String readValue(String key) throws Exception { + TSConnection con = getTSEISConnection(); + return con.readValue(key); + + } + + public void setAutoCommit(boolean flag) { + TSConnection con = getTSEISConnection(); + con.setAutoCommit(flag); + } + + public boolean getAutoCommit() { + TSConnection con = getTSEISConnection(); + return con.getAutoCommit(); + + } + + /* + * @name commit + * + * @desc Commit a transaction. + */ + public void commit() throws Exception { + TSConnection con = getTSEISConnection(); + con.commit(); + } + + /* + * @name dropTable + * + * @desc drop a table. + */ + public void dropTable() throws Exception { + TSConnection con = getTSEISConnection(); + System.out.println("TSEISConnectin.dropTable." + con); + con.dropTable(); + } + + /* + * @name begin + * + * @desc begin a transaction. + */ + public void begin() throws Exception { + TSConnection con = getTSEISConnection(); + con.begin(); + } + + /* + * @name rollback + * + * @desc rollback a transaction + */ + public void rollback() { + TSConnection con = getTSEISConnection(); + con.rollback(); + } + + /* + * @name close + * + * @desc close a connection to the EIS. + */ + public void close() throws Exception { + if (mc == null) + return; // already be closed + mc.removeTSConnection(this); + mc.sendEvent(ConnectionEvent.CONNECTION_CLOSED, null, this); + mc = null; + } + + /* + * @name isClosed + * + * @desc checks if the connection is close. + */ + public boolean isClosed() { + return (mc == null); + } + + /* + * @name associateConnection + * + * @desc associate connection + * + * @param TSManagedConnection newMc + */ + void associateConnection(TSManagedConnection newMc) { + + if (checkIfValid()) { + mc.removeTSConnection(this); + } + newMc.addTSConnection(this); + mc = newMc; + } + + public boolean checkIfValid() { + if (mc == null) { + return false; + } + return true; + } + + /* + * @name getTSEISConnection + * + * @desc get a Jdbc connection + * + * @return Connection + */ + TSConnection getTSEISConnection() { + try { + if (checkIfValid()) { + return mc.getTSConnection(); + } else { + return null; + } + } catch (Exception ex) { + ex.printStackTrace(); + return null; + } + } + + void invalidate() { + mc = null; + } + + public Hashtable getTempTable() { + return getTSEISConnection().getTempTable(); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java new file mode 100644 index 0000000000..b42055cf52 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISDataSource.java @@ -0,0 +1,181 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.Serializable; +import java.util.Vector; + +import javax.naming.Reference; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.Referenceable; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.ManagedConnectionFactory; + +public class TSEISDataSource implements TSDataSource, Serializable, Referenceable { + + private String desc; + + private ManagedConnectionFactory mcf; + + private ConnectionManager cm; + + private Reference reference; + + /* + * @name createTSConnectionFactory + * + * @desc TSConnectionFactory constructor + * + * @param ManagedConnectionFactor, ConnectionManager + */ + public TSEISDataSource(ManagedConnectionFactory mcf, ConnectionManager cm) { + this.mcf = mcf; + if (cm == null) { + + } else { + this.cm = cm; + } + } + + /* + * @name getConnection + * + * @desc Gets a connection to the EIS. + * + * @return Connection + * + * @exception Exception + */ + public TSConnection getConnection() throws Exception { + try { + return (TSConnection) cm.allocateConnection(mcf, null); + } catch (Exception ex) { + throw new Exception(ex.getMessage()); + } + } + + /* + * @name getConnection + * + * @desc Gets a connection to the EIS. + * + * @return Connection + * + * @exception Exception + */ + public TSConnection getConnection(String username, String password) throws Exception { + try { + ConnectionRequestInfo info = new TSConnectionRequestInfo(username, password); + return (TSConnection) cm.allocateConnection(mcf, info); + } catch (ResourceException ex) { + throw new Exception(ex.getMessage()); + } + } + + /* + * @name getLog + * + * @desc Returns Log to client. Used for verification of callbacks. + * + * @return Log + */ + @Override + public Vector getLog() { + return (ConnectorStatus.getConnectorStatus().getLogVector()); + } + + /* + * @name getStateLog + * + * @desc Returns Log to client. Used for verification of callbacks. + * + * @return Log + */ + @Override + public Vector getStateLog() { + return (ConnectorStatus.getConnectorStatus().getStateLogVector()); + } + + /* + * @name checkConnectionManager + * + * @desc return true if ConnectionManager is Serializable + * + * @return boolean + */ + public boolean checkConnectionManager() { + + if (cm instanceof Serializable) + return true; + else + return false; + } + + /* + * @name clearLog + * + * @desc Empties the Log + */ + @Override + public void clearLog() { + // In order to support the case where we want to be able to deploy one + // time and then run through all tests, we want to ensure that the log is + // not accidentally deleted by a client side test. (In the past, it was + // acceptable to delete this log at the end of a client tests run because + // rars would be undeployed and then re-deployed, thus re-creating this + // log.) + // but this may not be true for case of standalone connector. + // ConnectorStatus.getConnectorStatus().purge(); + } + + /* + * @name setLogFlag + * + * @desc Turns logging on/off + */ + @Override + public void setLogFlag(boolean b) { + ConnectorStatus.getConnectorStatus().setLogFlag(b); + } + + /* + * @name setReference + * + * @desc + */ + public void setReference(Reference reference) { + this.reference = reference; + } + + /* + * @name getReference + * + * @desc + */ + public Reference getReference() { + return reference; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java similarity index 85% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java index 61c4d8bed8..1c93e6656c 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSEISException.java @@ -31,13 +31,12 @@ */ public class TSEISException extends Exception { - /** - * Creates exception with the message. - * - * @param message - * Error message - */ - public TSEISException(String message) { - super(message); - } + /** + * Creates exception with the message. + * + * @param message Error message + */ + public TSEISException(String message) { + super(message); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java new file mode 100644 index 0000000000..342e65e1c0 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSManagedConnection.java @@ -0,0 +1,420 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.PrintWriter; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionEventListener; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.IllegalStateException; +import jakarta.resource.spi.LocalTransaction; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.SecurityException; +import jakarta.resource.spi.security.PasswordCredential; + +public class TSManagedConnection implements ManagedConnection { + + private TSXAConnection xacon; + + private TSConnection con; + + private TSConnectionEventListener jdbcListener; + + private PasswordCredential passCred; + + private ManagedConnectionFactory mcf; + + private PrintWriter logWriter; + + private boolean supportsXA; + + private boolean supportsLocalTx; + + private boolean destroyed; + + private Set connectionSet; // set of TSEISConnection + + public TSManagedConnection(ManagedConnectionFactory mcf, PasswordCredential passCred, TSXAConnection xacon, TSConnection con, + boolean supportsXA, boolean supportsLocalTx) { + this.mcf = mcf; + this.passCred = passCred; + this.xacon = xacon; + this.con = con; + this.supportsXA = supportsXA; + this.supportsLocalTx = supportsLocalTx; + connectionSet = new HashSet(); + jdbcListener = new TSConnectionEventListener(this); + if (xacon != null) { + xacon.addConnectionEventListener(jdbcListener); + } + + } + + // XXX should throw better exception + private void throwResourceException(Exception ex) throws ResourceException { + + ResourceException re = new ResourceException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + /* + * @name getConnection + * + * @desc Gets a connection to the underlying EIS. + * + * @param Subject, ConnectionRequestInfo + * + * @return Object + * + * @exception ResourceException + * + * @see + */ + @Override + public Object getConnection(Subject subject, ConnectionRequestInfo connectionRequestInfo) throws ResourceException { + + PasswordCredential pc = Util.getPasswordCredential(mcf, subject, connectionRequestInfo); + if (!Util.isPasswordCredentialEqual(pc, passCred)) { + throw new SecurityException("Principal does not match. Reauthentication not supported"); + } + checkIfDestroyed(); + TSEISConnection jdbcCon = new TSEISConnection(this, this.supportsLocalTx); + addTSConnection(jdbcCon); + return jdbcCon; + } + + /* + * @name destroy + * + * @desc destroys connection to the underlying EIS. + * + * @exception ResourceException + */ + @Override + public void destroy() throws ResourceException { + try { + if (destroyed) + return; + destroyed = true; + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + TSEISConnection jdbcCon = (TSEISConnection) it.next(); + jdbcCon.invalidate(); + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.destroy", "", ""); + } + connectionSet.clear(); + con.close(); + if (xacon != null) + xacon.close(); + } catch (Exception ex) { + throwResourceException(ex); + } + } + + /* + * @name cleanup + * + * @desc recycles the connection from the connection pool which is being handed over to the new client. + * + * @exception ResourceException + */ + public void cleanup() throws ResourceException { + try { + checkIfDestroyed(); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + TSEISConnection jdbcCon = (TSEISConnection) it.next(); + jdbcCon.invalidate(); + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.cleanup", "", ""); + } + connectionSet.clear(); + if (xacon != null) { + con.close(); + con = xacon.getConnection(); + } else if (con != null) { + con.setAutoCommit(true); + } + } catch (Exception ex) { + throwResourceException(ex); + } + } + + /* + * @name associateConnection + * + * @desc Used by the container to change the association of an application-level connection handle with a + * ManagedConneciton instance. + * + * @param Object + * + * @exception ResourceException + */ + @Override + public void associateConnection(Object connection) throws ResourceException { + + checkIfDestroyed(); + if (connection instanceof TSEISConnection) { + TSEISConnection jdbcCon = (TSEISConnection) connection; + jdbcCon.associateConnection(this); + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.associateConnection", "connection", ""); + } else { + throw new IllegalStateException("Invalid connection object: " + connection); + } + } + + /* + * @name addConnectionEventListener + * + * @desc Used by the container to change the association of an application-level connection handle with a + * ManagedConneciton instance. + * + * @param ConnectionEventListener + */ + @Override + public void addConnectionEventListener(ConnectionEventListener listener) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.addConnectionEventListener", "listener", ""); + jdbcListener.addConnectorListener(listener); + } + + /* + * @name removeConnectionEventListener + * + * @desc Removes an already registered connection event listener from the ManagedConnection instance. + * + * @param ConnectionEventListener + */ + @Override + public void removeConnectionEventListener(ConnectionEventListener listener) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.removeConnectionEventListener", "listener", ""); + jdbcListener.removeConnectorListener(listener); + } + + /* + * @name getXAResource + * + * @desc Returns an javax.transaction.xa.XAresource instance. + * + * @return XAResource + * + * @exception ResourceException + */ + @Override + public XAResource getXAResource() throws ResourceException { + if (!supportsXA) { + throw new NotSupportedException("XA transaction not supported"); + } + try { + checkIfDestroyed(); + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.getXAResource", "", "xacon.getXAResource"); + return xacon.getXAResource(this); + } catch (Exception ex) { + throwResourceException(ex); + return null; + } + } + + /* + * @name getLocalTransaction + * + * @desc Returns an jakarta.resource.spi.LocalTransaction instance. + * + * @return LocalTransaction + * + * @exception ResourceException + */ + @Override + public LocalTransaction getLocalTransaction() throws ResourceException { + if (!supportsLocalTx) { + throw new NotSupportedException("Local transaction not supported"); + } else { + checkIfDestroyed(); + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.getLocalTransaction", "", "LocalTransactionImpl"); + return new LocalTransactionImpl(this); + } + } + + /* + * @name getMetaData + * + * @desc Gets the metadata information for this connection's underlying EIS resource manager instance. + * + * @return ManagedConnectionMetaData + * + * @exception ResourceException + */ + @Override + public ManagedConnectionMetaData getMetaData() throws ResourceException { + checkIfDestroyed(); + return new MetaDataImpl(this); + } + + /* + * @name setLogWriter + * + * @desc Sets the log writer for this ManagedConnection instance. + * + * @param PrintWriter + * + * @exception ResourceException + */ + @Override + public void setLogWriter(PrintWriter out) throws ResourceException { + this.logWriter = out; + } + + /* + * @name getLogWriter + * + * @desc Gets the log writer for this ManagedConnection instance. + * + * @return PrintWriter + * + * @exception ResourceException + */ + @Override + public PrintWriter getLogWriter() throws ResourceException { + return logWriter; + } + + /* + * @name getTSConnection + * + * @desc Returns the Jdbc Connection. + * + * @return PrintWriter + * + * @exception ResourceException + */ + public TSConnection getTSConnection() throws ResourceException { + checkIfDestroyed(); + return con; + } + + /* + * @name isDestroyed + * + * @desc Checks if the connection is destroyed. + * + * @return boolean + */ + + boolean isDestroyed() { + return destroyed; + } + + /* + * @name getPasswordCredential + * + * @desc Gets the PasswordCredential. + * + * @return String + */ + public PasswordCredential getPasswordCredential() { + return passCred; + + } + + /* + * @name sendEvent + * + * @desc Send an Event . + * + * @param int, Exception + */ + void sendEvent(int eventType, Exception ex) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.sendEvent", "eventType|ex", ""); + jdbcListener.sendEvent(eventType, ex, null); + } + + /* + * @name sendEvent + * + * @desc Send an Event . + * + * @param int, Exception, Object + */ + void sendEvent(int eventType, Exception ex, Object connectionHandle) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.sendEvent", "eventType|ex|connectionHandle", ""); + jdbcListener.sendEvent(eventType, ex, connectionHandle); + } + + /* + * @name removeTSConnection + * + * @desc Removes a connection from the connection pool. + * + * @param TSEISConnection + */ + public void removeTSConnection(TSEISConnection jdbcCon) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.removeTSConnection", "jdbcCon", ""); + connectionSet.remove(jdbcCon); + } + + /* + * @name addTSConnection + * + * @desc Add a connection to the connection pool. + * + * @param TSEISConnection + */ + public void addTSConnection(TSEISConnection jdbcCon) { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.addTSConnection", "jdbcCon", ""); + connectionSet.add(jdbcCon); + } + + /* + * @name checkIfDestroyed + * + * @desc Checks if the connection is destroyed. + * + * @param TSEISConnection + */ + private void checkIfDestroyed() throws ResourceException { + if (destroyed) { + throw new IllegalStateException("Managed connection is closed"); + } + } + + /* + * @name getManagedConnectionFactory + * + * @desc Gets a managed connection factory instance. + * + * @return ManagedConnectionFactory + */ + public ManagedConnectionFactory getManagedConnectionFactory() { + ConnectorStatus.getConnectorStatus().logAPI("TSManagedConnection.getManagedConnectionFactory", "", "ManagedConnectionFactory"); + return mcf; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java new file mode 100644 index 0000000000..b765aa9f01 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSResourceManager.java @@ -0,0 +1,359 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TSResourceManager.java 1.0 06/06/02 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Enumeration; +import java.util.Hashtable; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +/** + * Resource Manager for the TSeis. Completely based on JTS. + * + * @version 1.0, 06/06/02 + * @author Binod P.G + */ +public class TSResourceManager { + + private boolean opened = false; + + private Hashtable association = new Hashtable(); + + /** + * Creates the Resource Manager. + */ + public TSResourceManager() { + openRM(); + } + + /** + * Opens the Resource Manager. + */ + public void openRM() { + if (!opened) { + opened = true; + } + } + + /** + * Closes the Resource Manager. + */ + public void closeRM() { + opened = false; + association.clear(); + } + + /** + * Starts the new Global Transaction branch. transaction can be started in three ways. + *

+ * 1. With no flags (TMNOFLAGS) : This is starting a new transaction + *

+ *

+ * 2. With join flag(TMJOIN) : This is joining new transaction + *

+ *

+ * 3. With resume flag(TRESUME) : This is resuming a suspended transaction + *

+ * + * @param xid Global Id for the transaction. + * @param flags Flags used for Transaction. For more details see JTA spec. + * @param con Connection involved in the Global Transaction. + * @throws XAExcpetion In case of a failure / Invalid flag / Invalid XA protocol. + */ + public void start(Xid xid, int flags, TSConnection con) throws XAException { + System.out.println("start." + flags + "." + xid + "..." + con); + sanityCheck(xid, flags, "start"); + + if (flags == XAResource.TMNOFLAGS) { + TSXaTransaction txn = new TSXaTransaction(xid); + txn.setStatus(TSXaTransaction.STARTED); + if (con != null) + txn.addConnection(con); + association.put(xid, txn); + } else if (flags == XAResource.TMJOIN) { + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (con != null) + txn.addConnection(con); + association.put(xid, txn); + } else if (flags == XAResource.TMRESUME) { + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + txn.setStatus(TSXaTransaction.STARTED); + association.put(xid, txn); + } + } + + /** + * Ends the Global Transaction branch. + * + * @param xid Global Id for the transaction. + * @param flags Flags used for Transaction. For more details see JTA spec. + * @throws XAExcpetion In case of a failure / Invalid flag / Invalid XA protocol. + */ + public void end(Xid xid, int flags) throws XAException { + sanityCheck(xid, flags, "end"); + + int status = 0; + if (flags == XAResource.TMFAIL) + status = TSXaTransaction.ENDFAILED; + if (flags == XAResource.TMSUSPEND) + status = TSXaTransaction.SUSPENDED; + if (flags == XAResource.TMSUCCESS) + status = TSXaTransaction.ENDSUCCESSFUL; + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + txn.setStatus(status); + association.put(xid, txn); + } + + /** + * Prepare the Global Transaction branch. + * + * @param xid Global Id for the transaction. + * @throws XAExcpetion In case of a failure / Invalid XA protocol. + */ + public int prepare(Xid xid) throws XAException { + sanityCheck(xid, XAResource.TMNOFLAGS, "prepare"); + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + int ret; + try { + ret = txn.prepare(); + } catch (XAException xe) { + // If an prepare fails, Transaction Manager doesnt need to rollback + // the transaction explicitely. So remove the particular xid. + System.out.println("Self.rollbak"); + txn.rollback(); + association.remove(xid); + throw xe; + } + txn.setStatus(TSXaTransaction.PREPARED); + association.put(xid, txn); + return ret; + } + + /** + * Commits the Global Transaction branch. + * + * @param xid Global Id for the transaction. + * @throws XAExcpetion In case of a failure / Invalid XA protocol. + */ + public void commit(Xid xid, boolean onePhase) throws XAException { + + if (onePhase) { + sanityCheck(xid, XAResource.TMNOFLAGS, "1pccommit"); + } else { + sanityCheck(xid, XAResource.TMNOFLAGS, "2pccommit"); + } + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + + if (txn != null) { + try { + txn.commit(onePhase); + } catch (XAException eb) { + throw new XAException(XAException.XA_RBROLLBACK); + } catch (Exception e) { + throw new XAException(XAException.XAER_RMERR); + } finally { + association.remove(xid); + } + } + } + + /** + * Rolls back the Global Transaction branch. + * + * @param xid Global Id for the transaction. + * @throws XAExcpetion In case of a failure / Invalid XA protocol. + */ + public void rollback(Xid xid) throws XAException { + + sanityCheck(xid, XAResource.TMNOFLAGS, "rollback"); + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn != null) { + try { + txn.rollback(); + } catch (Exception e) { + throw new XAException(XAException.XAER_RMERR); + } finally { + association.remove(xid); + } + } + } + + /** + * Get the Transaction status of a Connection. + * + * @param con Connection involved. + */ + int getTransactionStatus(TSConnection con) { + Enumeration e = association.keys(); + while (e.hasMoreElements()) { + Xid id = (Xid) e.nextElement(); + TSXaTransaction txn = (TSXaTransaction) association.get(id); + Hashtable connections = txn.getConnections(); + Enumeration e1 = connections.keys(); + while (e1.hasMoreElements()) { + TSConnection temp = (TSConnection) e1.nextElement(); + if (con == temp) { + return txn.getStatus(); + } + } + } + return TSXaTransaction.NOTRANSACTION; + } + + /** + * Reads a particular key in a distributed transaction. + * + * @param key Key to be read. + * @param con Connection involved. + * @throws TSEIExcpetion If an error occurs. + */ + DataElement read(String key, TSConnection con) throws TSEISException { + System.out.println("ResourceManager.read"); + Enumeration e = association.keys(); + while (e.hasMoreElements()) { + Xid xid = (Xid) e.nextElement(); + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + Hashtable connections = txn.getConnections(); + if (connections.containsKey(con)) { + return txn.read(key); + } + } + return null; + } + + /** + * Do the sanity check. + * + * @param xid Global Id for the transaction branch. + * @param flags Flag sent by the Transaction Manager. + * @throws XAExcpetion In case of an invalid XA protocol. + */ + private void sanityCheck(Xid xid, int flags, String operation) throws XAException { + // Sanity checks for the xa_start operation. + if ((operation != null) && (operation.equals("start"))) { + + if (!(flags == XAResource.TMNOFLAGS || flags == XAResource.TMJOIN || flags == XAResource.TMRESUME)) { + throw new XAException(XAException.XAER_INVAL); + } + + // For TMNOFLAGS xid should not be known to RM. + if (flags == XAResource.TMNOFLAGS) { + if (association.containsKey(xid)) { + throw new XAException(XAException.XAER_DUPID); + } + } + + // For TMJOIN xid should be known to RM. + if (flags == XAResource.TMJOIN) { + if (!association.containsKey(xid)) { + throw new XAException(XAException.XAER_INVAL); + } + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (!(txn.getStatus() == TSXaTransaction.STARTED || txn.getStatus() == TSXaTransaction.ENDSUCCESSFUL)) { + throw new XAException(XAException.XAER_PROTO); + } + } + + if (flags == XAResource.TMRESUME) { + if (!association.containsKey(xid)) { + throw new XAException(XAException.XAER_INVAL); + } + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn.getStatus() != TSXaTransaction.SUSPENDED) { + throw new XAException(XAException.XAER_PROTO); + } + } + } + + // End operation. + if ((operation != null) && (operation.equals("end"))) { + + if (!(flags == XAResource.TMSUSPEND || flags == XAResource.TMFAIL || flags == XAResource.TMSUCCESS)) { + throw new XAException(XAException.XAER_INVAL); + } + + if (!association.containsKey(xid)) { + throw new XAException(XAException.XAER_INVAL); + } + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (!(txn.getStatus() == TSXaTransaction.STARTED || txn.getStatus() == TSXaTransaction.ENDSUCCESSFUL)) { + throw new XAException(XAException.XAER_PROTO); + } + + } + + // Prepare operation. + if ((operation != null) && (operation.equals("prepare"))) { + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn.getStatus() != TSXaTransaction.ENDFAILED && txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL) { + throw new XAException(XAException.XAER_PROTO); + } + + } + + // 2PC Commit operation. + if ((operation != null) && (operation.equals("2pccommit"))) { + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn.getStatus() != TSXaTransaction.PREPARED) { + throw new XAException(XAException.XAER_PROTO); + } + + } + + // 1PC Commit operation. + if ((operation != null) && (operation.equals("1pccommit"))) { + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL && txn.getStatus() != TSXaTransaction.ENDFAILED) { + throw new XAException(XAException.XAER_PROTO); + } + + } + + // Rollback operation. + if ((operation != null) && (operation.equals("rollback"))) { + + TSXaTransaction txn = (TSXaTransaction) association.get(xid); + if (txn != null) { + if (txn.getStatus() != TSXaTransaction.PREPARED && txn.getStatus() != TSXaTransaction.ENDSUCCESSFUL + && txn.getStatus() != TSXaTransaction.ENDFAILED) { + throw new XAException(XAException.XAER_PROTO); + } + } + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java similarity index 50% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java index 22b08e27ab..707fbe9cac 100755 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSICWithListener.java @@ -29,42 +29,38 @@ * to increment each count. * */ -public class TSSICWithListener extends TSSecurityContext - implements WorkContextLifecycleListener { +public class TSSICWithListener extends TSSecurityContext implements WorkContextLifecycleListener { - private Counter count = new Counter(); + private Counter count = new Counter(); - public TSSICWithListener(String userName, String password, - String principalName, boolean translationRequired) { - super(userName, password, principalName, translationRequired); - debug("TSSICWithListener: constructor"); - } + public TSSICWithListener(String userName, String password, String principalName, boolean translationRequired) { + super(userName, password, principalName, translationRequired); + debug("TSSICWithListener: constructor"); + } - @Override - public void contextSetupComplete() { - debug("TSSICWithListener.contextSetupComplete() " + this.toString()); + @Override + public void contextSetupComplete() { + debug("TSSICWithListener.contextSetupComplete() " + this.toString()); - String str = "notifications test: contextSetupComplete(): count=" - + count.getCount(Counter.Action.INCREMENT); - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } + String str = "notifications test: contextSetupComplete(): count=" + count.getCount(Counter.Action.INCREMENT); + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } - @Override - public void contextSetupFailed(String string) { - debug("TSSICWithListener.contextSetupFailed with following: " + string); + @Override + public void contextSetupFailed(String string) { + debug("TSSICWithListener.contextSetupFailed with following: " + string); - String str = "notifications test: contextSetupFailed(): count=" - + count.getCount(Counter.Action.INCREMENT); - ConnectorStatus.getConnectorStatus().logState(str); + String str = "notifications test: contextSetupFailed(): count=" + count.getCount(Counter.Action.INCREMENT); + ConnectorStatus.getConnectorStatus().logState(str); - str = "contextSetupFailed() due to errorCode=" + string; - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } + str = "contextSetupFailed() due to errorCode=" + string; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } - public void debug(String message) { - Debug.trace(message); - } + public void debug(String message) { + Debug.trace(message); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java new file mode 100755 index 0000000000..b9683f5946 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContext.java @@ -0,0 +1,400 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.security.Principal; +import java.util.ArrayList; +import java.util.List; + +import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.UnsupportedCallbackException; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.work.SecurityContext; +import jakarta.security.auth.message.callback.CallerPrincipalCallback; +import jakarta.security.auth.message.callback.GroupPrincipalCallback; +import jakarta.security.auth.message.callback.PasswordValidationCallback; + +/* + * This is used to facilitate testing of the SecurityContext class. + * The things to note/remember about this class are: + * - there are two types of security scenarios RA's utilize for + * passing creds: Case-1 and Case-2 security. + * Case-1: use creds that are expected to exist on the Appserver + * Case-2: set up mappings in appserver (to map EIS creds to AS creds) + * then the RA can flow EIS creds to AS and let AS handle mappings. + * - a RA can NOT do case-1 and case-2 at the same time. a RA must be + * configured to do only ONE case at a time. (the configuration is usually + * done by AS ina proprietary way. For RI(GFv3), Case-1 is default, and + * Case-2 is done by specifying mapping in domain.xml. + * - CPC *must* be called after GPC and PVC + * - PVC *should* have same creds as CPC + * - due to spec optimization, GPC can be called without CPC but this + * is somewhat controversial and not recommended. + * + */ +public class TSSecurityContext extends SecurityContext { + + private String userName = null; // server side username + + private String password = null; // server side pwd + + private String eisPrincipalName = null; // eis principal name + + private String description = null; + + private String logOutString = null; + + private boolean translationRequired; // true if case 2 security where we need + // to map identities + + private boolean useCPC = true; + + private boolean useGPC = false; + + private boolean usePVC = false; + + private boolean addPrinToExecSubject = false; + + private boolean expectFailure = false; + + public TSSecurityContext(String userName, String password, String eisPrincipalName, boolean translationRequired) { + this.userName = userName; + this.password = password; + this.eisPrincipalName = eisPrincipalName; + this.translationRequired = translationRequired; + + this.description = super.getDescription(); + + debug("TSSecurityContext: userName=" + userName + " password=" + password + " eisPrincipalName=" + eisPrincipalName + + " translationRequired=" + translationRequired); + } + + public void setCallbacks(boolean bCPC, boolean bGPC, boolean bPVC) { + this.useCPC = bCPC; + this.useGPC = bGPC; + this.usePVC = bPVC; + } + + public void setUserName(String val) { + this.userName = val; + } + + public String getUserName() { + return this.userName; + } + + public void setPassword(String val) { + this.password = val; + } + + public String getPassword() { + return this.password; + } + + public void setUseCPC(boolean val) { + this.useCPC = val; + } + + public boolean getUseCPC() { + return this.useCPC; + } + + public void setUseGPC(boolean val) { + this.useGPC = val; + } + + public boolean getUseGPC() { + return this.useGPC; + } + + public void setUsePVC(boolean val) { + this.usePVC = val; + } + + public boolean getUsePVC() { + return this.usePVC; + } + + public void setAddPrinToExecSubject(boolean val) { + this.addPrinToExecSubject = val; + } + + public boolean getAddPrinToExecSubject() { + return this.addPrinToExecSubject; + } + + public void setDescription(String val) { + this.description = val; + } + + public String getDescription() { + return this.description; + } + + public void setLogOutString(String val) { + this.logOutString = val; + } + + public String getLogOutString() { + return this.logOutString; + } + + public boolean isTranslationRequired() { + return translationRequired; + } + + public void setExpectFailure(boolean val) { + this.expectFailure = val; + } + + public boolean getExpectFailure() { + return this.expectFailure; + } + + /* + * This is used to help verify assertion Connector:SPEC:229, which states a couple requirements with the following being + * focused on within this method: "The following conditions are applicable to the application server provider while + * calling the setupSecurityContext method: the CallbackHandler implementation passed as the argument handler to + * setupSecurityContext must support the following JSR-196 Callbacks: CallerPrincipalCallback, GroupPrincipalCallback, + * and PasswordValidationCallback" + * + * Mostly, this is here to verify that the 3 main callbacks are supported by the vendors app server and that they can be + * used with a a couple different scenarios (eg. calling some but not all callbacks, or using null principals, etc) + * + * Related notes on testing callbacks: 1. must call CPC after PVC (CPC and PVC should use same user identities) 2. PVC + * is for case-1 security only (not case-2 of mapping) 3. It's not spec required but recommended we call CPC after GPC + * though there is allowance for a spec optimization which would allow calling GPC without CPC but its a somewhat + * controversial optimization so for now, if you have a GPC, you should follow with a CPC 4. CPC can be alone 5. if CPC + * is called, it basically trumps PVC/GPC so it shouldnt even matter what is in PVC/GPC. + * + */ + public void doCallbackVerification(CallbackHandler callbackHandler, Subject execSubject, Subject serviceSubject) { + + List callbacks = new ArrayList(); + PasswordValidationCallback pvc = null; + GroupPrincipalCallback gpc = null; + CallerPrincipalCallback cpc = null; + String[] gpcGroups = { "phakegrp1", "phakegrp2" }; + + debug("doCallbackVerification(): translationRequired = " + translationRequired); + + if (addPrinToExecSubject && (userName != null)) { + debug("doCallbackVerification(): adding principal: " + userName + " to execSubject."); + execSubject.getPrincipals().add(new SimplePrincipal(userName, password)); + } + + if (useGPC) { + // we are passing invalid grps to the GPC but it should not + // matter if the CPC is specified after the GPC. + gpc = new GroupPrincipalCallback(execSubject, gpcGroups); + debug("doCallbackVerification(): - GPC with groups={phakegrp1, phakegrp2}"); + callbacks.add(gpc); + } + + if (usePVC && !translationRequired) { + // per JCA 1.6 spec (16.4.2) PVC can be used in Case-1 only. + // NOTE: PVC user should match that of CPC + debug("doCallbackVerification(): initializing PVC"); + char[] pwd = null; + if (password != null) { + // if password is supplied - use that first + pwd = password.toCharArray(); + } + + if (userName != null) { + // if userName is supplied - use that first + pvc = new PasswordValidationCallback(execSubject, userName, pwd); + debug("setting PVC with user [ " + userName + " ] + password [ " + password + " ]"); + } else { + // the spec is unclear about initializating a PasswordValidationCallback + // with a null + // username so we should probably use something like a fake user name. + // worth noting that the javadoc allows for null pwd. + pvc = new PasswordValidationCallback(execSubject, "fk_usr", null); + debug("setting PVC with user=fk_usr and password=null"); + } + callbacks.add(pvc); + } + + if (usePVC || useCPC) { + if (translationRequired && (eisPrincipalName != null)) { + // lets translate/map EIS to server domain prins + debug("translationRequired, setting CPC with principal : " + eisPrincipalName); + cpc = new CallerPrincipalCallback(execSubject, new SimplePrincipal(eisPrincipalName)); + } else if (!translationRequired && (userName != null)) { + debug("No translationRequired, setting CPC with userName : " + userName); + cpc = new CallerPrincipalCallback(execSubject, userName); + } else { + debug("setting CPC with null Principal"); + cpc = new CallerPrincipalCallback(execSubject, (Principal) null); + } + + callbacks.add(cpc); + } + + Callback callbackArray[] = new Callback[callbacks.size()]; + try { + callbackHandler.handle(callbacks.toArray(callbackArray)); + + // if we made it here, then no exceptions - we can assume success since + // we got no unsupported callback exceptions. + String sval = ""; + if (this.logOutString != null) { + sval = this.logOutString; + } else { + sval = "setupSecurityContext callbackhandler supports required callback types."; + } + ConnectorStatus.getConnectorStatus().logState(sval); + debug(sval); + + // we shouldn't need to check if authentication succeeded - but for debug + // purposes we will keep this here? + if (!translationRequired && usePVC && (pvc != null) && (!pvc.getResult())) { + debug("doCallbackVerification(): PVC failed"); + // ConnectorStatus.getConnectorStatus().logState("PVC failed"); + } else if (!translationRequired && usePVC && (pvc != null)) { + debug("doCallbackVerification(): PVC succeeded"); + // ConnectorStatus.getConnectorStatus().logState("PVC succeeded"); + } + + } catch (UnsupportedCallbackException e) { + String sval = ""; + if (this.expectFailure && (this.logOutString != null)) { + sval = "Expected Exception: " + this.logOutString; + } else { + sval = "doCallbackVerification(): callbackhandler does not support a required callback type!"; + } + ConnectorStatus.getConnectorStatus().logState(sval); + debug(sval); + debug("UnsupportedCallbackException message is : " + e.getMessage()); + e.printStackTrace(); + + } catch (Exception e) { + String sval = ""; + if (this.expectFailure && (this.logOutString != null)) { + sval = "Expected Exception: " + this.logOutString; + } else { + sval = "doCallbackVerification(): callbackhandler threw unexpected exception!"; + } + ConnectorStatus.getConnectorStatus().logState(sval); + debug(sval); + e.printStackTrace(); + debug("doCallbackVerification(): exception occured : " + e.getMessage()); + } + + } + + /* + * + * The executionSubject arg must be non-null and it must not be read-only. It is expected that this method will populate + * this executionSubject with principals and credentials that would be flown into the application server. + * + * The serviceSubject argument may be null. If it is not null, it must not be read-only. (from ee spec, section 16.4.1) + * Note: this differs from javadoc comments and insuch case, spec takes precedence. The serviceSubject represents the + * application server and it may be used by the Work implementation to retrieve Principals and credentials necessary to + * establish a connection to the EIS (in the cause of mutual-auth like scenarios). If the Subject is not null, the Work + * implementation may collect the server cred as necessary, by using the callback handler passed to them . + */ + @Override + public void setupSecurityContext(CallbackHandler callbackHandler, Subject execSubject, Subject serviceSubject) { + + // validate args are spec compliant + validateCallbackHandler(callbackHandler); + validateExecSubject(execSubject); + validateServiceSubject(serviceSubject); + + // now make sure the 3 callback types are supported by the App Server + doCallbackVerification(callbackHandler, execSubject, serviceSubject); + + } + + /* + * this method is used to perform a simple validation that the callbackHandler is spec compliant per assertion + * Connector:SPEC:229 + */ + private void validateCallbackHandler(CallbackHandler callbackHandler) { + String str = ""; + + // assist with assertion Connector:SPEC:229 + if (callbackHandler != null) { + str = "setupSecurityContext() called with non-null callbackHandler"; + } else { + str = "setupSecurityContext() called with invalid (null) callbackHandler"; + } + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + + } + + /* + * this method is used to perform a simple validation that the execSubject is spec compliant per assertion + * Connector:SPEC:230 + */ + private void validateExecSubject(Subject execSubject) { + String str = ""; + + if ((execSubject != null) && (!execSubject.isReadOnly())) { + str = "setupSecurityContext() called with valid executionSubject"; + } else { + str = "ERROR: setupSecurityContext() called with invalid executionSubject"; + } + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + + } + + /* + * this method is used to perform a simple validation that the serviceSubject is spec compliant per assertion + * Connector:SPEC:231 + */ + private void validateServiceSubject(Subject serviceSubject) { + String str = ""; + + if (serviceSubject == null) { + // this is allowed according to jca spec setion 16.4.1 + str = "setupSecurityContext() called with valid serviceSubject"; + } else if ((serviceSubject != null) && (!serviceSubject.isReadOnly())) { + // this is good: if serviceSubject != null, then it must not be readonly + str = "setupSecurityContext() called with valid serviceSubject"; + } else if ((serviceSubject != null) && (serviceSubject.isReadOnly())) { + // ohoh, serviceSubject !=null but it is readonly and this is not valid! + str = "setupSecurityContext() called with invalid executionSubject"; + } + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + + } + + public String toString() { + StringBuffer toString = new StringBuffer("{"); + toString.append("userName : " + userName); + toString.append(", password : " + password); + toString.append(", eisPrincipalName : " + eisPrincipalName); + toString.append(", translationRequired : " + translationRequired); + toString.append("}"); + return toString.toString(); + } + + public void debug(String message) { + Debug.trace(message); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java similarity index 53% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java index 58ec8b559e..56566c5248 100755 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSSecurityContextWithListener.java @@ -20,29 +20,27 @@ import jakarta.resource.spi.work.WorkContextLifecycleListener; -public class TSSecurityContextWithListener extends TSSecurityContext - implements WorkContextLifecycleListener { - - public TSSecurityContextWithListener(String userName, String password, - String principalName, boolean translationRequired) { - super(userName, password, principalName, translationRequired); - debug("TSSecurityContextWithListener: constructor"); - } - - @Override - public void contextSetupComplete() { - debug("Context setup completed " + this.toString()); - ConnectorStatus.getConnectorStatus().logState("Context setup completed"); - } - - @Override - public void contextSetupFailed(String string) { - debug("Context setup failed with the following message : " + string - + " for security-inflow-context " + " errorCode=" + this.toString()); - } - - public void debug(String message) { - Debug.trace(message); - } +public class TSSecurityContextWithListener extends TSSecurityContext implements WorkContextLifecycleListener { + + public TSSecurityContextWithListener(String userName, String password, String principalName, boolean translationRequired) { + super(userName, password, principalName, translationRequired); + debug("TSSecurityContextWithListener: constructor"); + } + + @Override + public void contextSetupComplete() { + debug("Context setup completed " + this.toString()); + ConnectorStatus.getConnectorStatus().logState("Context setup completed"); + } + + @Override + public void contextSetupFailed(String string) { + debug("Context setup failed with the following message : " + string + " for security-inflow-context " + " errorCode=" + + this.toString()); + } + + public void debug(String message) { + Debug.trace(message); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java similarity index 73% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java index 141ebd39f4..57cee70b79 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnection.java @@ -26,14 +26,13 @@ public interface TSXAConnection { - public TSConnection getConnection() throws Exception; + public TSConnection getConnection() throws Exception; - public TSConnection getConnection(String usr, char[] password) - throws Exception; + public TSConnection getConnection(String usr, char[] password) throws Exception; - public XAResource getXAResource(TSManagedConnection mc) throws Exception; + public XAResource getXAResource(TSManagedConnection mc) throws Exception; - public void close() throws Exception; + public void close() throws Exception; - public void addConnectionEventListener(ConnectionEventListener cel); + public void addConnectionEventListener(ConnectionEventListener cel); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java new file mode 100644 index 0000000000..059807f331 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXAConnectionImpl.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.ConnectionEventListener; + +public class TSXAConnectionImpl implements TSXAConnection { + + public TSXAConnectionImpl() { + + } + + public XAResource getXAResource(TSManagedConnection mc) throws Exception { + System.out.println("TSXAConnectionImpl.getXAResource"); + XAResourceImpl xaimpl = new XAResourceImpl(mc); + return xaimpl; + } + + public TSConnection getConnection() throws Exception { + try { + + TSConnection ctscon = TSeis.getTSeis().getConnection(); + System.out.println("TSXAConnectionImpl.getConnection"); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.getConnection", "", ""); + return ctscon; + } catch (Exception ex) { + ex.getMessage(); + return null; + } + } + + public TSConnection getConnection(String user, char[] password) throws Exception { + try { + + TSConnection ctscon = TSeis.getTSeis().getConnection(user, password); + ConnectorStatus.getConnectorStatus().logAPI("TSConnectionImpl.getConnection", "", ""); + return ctscon; + } catch (Exception ex) { + ex.getMessage(); + return null; + } + } + + public void close() throws Exception { + + } + + public void addConnectionEventListener(ConnectionEventListener listener) { + + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java new file mode 100644 index 0000000000..b0e06e8a9f --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSXaTransaction.java @@ -0,0 +1,285 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TSXaTransaction.java 1.0 06/06/02 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Enumeration; +import java.util.Hashtable; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +/** + * Class representing one Global Transaction. + * + * @version 1.0, 06/06/02 + * @author Binod P.G + */ +public class TSXaTransaction { + + /** No Transaction . Default status **/ + static final int NOTRANSACTION = 0; + + /** Status indicating that Transaction has started **/ + static final int STARTED = 1; + + /** Status indicating that Transaction has been suspended **/ + static final int SUSPENDED = 2; + + /** Status indicating that Transaction has been ended with a failure **/ + static final int ENDFAILED = 3; + + /** Status indicating that Transaction has been ended with a success **/ + static final int ENDSUCCESSFUL = 4; + + /** Status indicating that Transaction has been prepared **/ + static final int PREPARED = 5; + + /** Field storing the status values **/ + private int status = 0; + + /** Connections involved in one transaction branch. Specifications doesnt **/ + /** stop from having more than one connection in global transaction **/ + private Hashtable connections = new Hashtable(); + + /** Id of the transaction **/ + private Xid xid; + + /** + * Creates a new Global Transaction object. + * + * @param id Global Transaction Identifier. + */ + public TSXaTransaction(Xid id) { + this.xid = id; + } + + /** + * Adds the connection to this transaction. + * + * @param con Connection involved in the transaction branch. + */ + public void addConnection(TSConnection con) { + connections.put(con, ""); + } + + /** + * Return the connections involved as a hashtable. + * + * @return Connections. + */ + Hashtable getConnections() { + return connections; + } + + /** + * Sets the Status of the transaction. + * + * @param Status of the transaction + */ + public void setStatus(int status) { + this.status = status; + } + + /** + * Get the status of the transaction. + * + * @return Status of the transaction. + */ + public int getStatus() { + return this.status; + } + + /** + * Prepare the transaction. + * + * @return The Vote of this branch in this transaction. + * @throws XAException If prepare fails. + */ + public int prepare() throws XAException { + System.out.println("TsXaTransaction.prepare"); + Hashtable ht = prepareTempTable(); + + Enumeration e = ht.keys(); + while (e.hasMoreElements()) { + System.out.println("TSXaTransaction.prepare.inTheLoop"); + String key = (String) e.nextElement(); + DataElement de = (DataElement) ht.get(key); + + if (de.getStatus() == DataElement.INSERTED) { + try { + TSeis.getTSeis().prepareInsert(de, xid); + } catch (TSEISException ex) { + throw new XAException(XAException.XA_RBROLLBACK); + } + } + if (de.getStatus() == DataElement.UPDATED || de.getStatus() == DataElement.DELETED) { + System.out.println("TSXaTransaction.prepare.updatePrepare"); + try { + TSeis.getTSeis().prepareChange(de, xid); + } catch (TSEISException ex) { + throw new XAException(XAException.XA_RBROLLBACK); + } + } + } + return XAResource.XA_OK; + } + + // Creates one temp table for the transaction. + private Hashtable prepareTempTable() { + System.out.println("TSXaTransaction.prepareTempTable"); + Hashtable temptable = new Hashtable(); + + Enumeration e = connections.keys(); + + while (e.hasMoreElements()) { + System.out.println("TSXaTransaction.prepareTempTable.inTheLoop"); + TSConnection con = (TSConnection) e.nextElement(); + Hashtable temp = con.getTempTable(); + + Enumeration e1 = temp.keys(); + while (e1.hasMoreElements()) { + String key = (String) e1.nextElement(); + DataElement de = (DataElement) temp.get(key); + + if (temptable.containsKey(key)) { + DataElement de1 = (DataElement) temptable.get(key); + // Latest version should be used + if (de.getVersion() >= de1.getVersion()) { + temptable.put(key, de); + } + } else { + temptable.put(key, de); + } + } + con.rollback(); + } + + return temptable; + } + + /** + * Commits this Transaction. + * + * @param Boolean indicating, whether it is a single-phase or 2-phase commit. + * @throws XAException If commit fails. + */ + public void commit(boolean onePhase) throws XAException { + System.out.println("TsXaTransaction.commit." + onePhase); + if (onePhase) { + Hashtable ht = prepareTempTable(); + + Enumeration e = ht.keys(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + DataElement de = (DataElement) ht.get(key); + + if (de.getStatus() == DataElement.INSERTED) { + try { + TSeis.getTSeis().actualInsert(de); + } catch (TSEISException ex) { + throw new XAException(XAException.XA_RBROLLBACK); + } + } + if (de.getStatus() == DataElement.UPDATED) { + try { + TSeis.getTSeis().actualUpdate(de); + } catch (TSEISException ex) { + throw new XAException(XAException.XA_RBROLLBACK); + } + } + if (de.getStatus() == DataElement.DELETED) { + try { + TSeis.getTSeis().actualDelete(de.getKey()); + } catch (TSEISException ex) { + throw new XAException(XAException.XA_RBROLLBACK); + } + } + } + } else { + TSeis.getTSeis().commit(xid); + } + } + + /** + * Rolls back the transaction + */ + public void rollback() { + if (status == PREPARED) { + TSeis.getTSeis().rollback(xid); + } else { + Enumeration e = connections.keys(); + + while (e.hasMoreElements()) { + TSConnection con = (TSConnection) e.nextElement(); + con.rollback(); + } + } + } + + /** + * Check for the key in the transaction. If it is not readable return null. + * + * @param elementkey Key to be read. + * @return DataElement object. + * @throws TSEISException In case, read fails. + */ + public DataElement read(String elementkey) throws TSEISException { + Hashtable temptable = new Hashtable(); + Enumeration e = connections.keys(); + + while (e.hasMoreElements()) { + TSConnection con = (TSConnection) e.nextElement(); + Hashtable temp = con.getTempTable(); + + Enumeration e1 = temp.keys(); + while (e1.hasMoreElements()) { + String key = (String) e1.nextElement(); + DataElement de = (DataElement) temp.get(key); + + if (temptable.containsKey(key)) { + DataElement de1 = (DataElement) temptable.get(key); + // Latest version should be used + if (de.getVersion() >= de1.getVersion()) { + temptable.put(key, de); + } + } else { + temptable.put(key, de); + } + } + } + + if (temptable.containsKey(elementkey)) { + DataElement de = (DataElement) temptable.get(elementkey); + if (de.getStatus() == DataElement.DELETED) { + throw new TSEISException("Data deleted"); + } else { + return de; + } + } else { + return null; + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java new file mode 100644 index 0000000000..c306da3165 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TSeis.java @@ -0,0 +1,375 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.Vector; + +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +public class TSeis { + + private static TSeis eis; + + private Hashtable permtable = new Hashtable(); + + private boolean commitflag = true; + + private TSConnectionImpl con1 = null; + + private TSConnectionImpl con2 = null; + + private TSConnectionImpl con3 = null; + + private TSConnectionImpl con4 = null; + + private TSConnectionImpl con5 = null; + + private Vector conset = null; + + public TSResourceManager rm = new TSResourceManager(); + + /** + * Singleton constructor + */ + private TSeis() { + conset = new Vector(); + con1 = new TSConnectionImpl(); + con2 = new TSConnectionImpl(); + con3 = new TSConnectionImpl(); + con4 = new TSConnectionImpl(); + con5 = new TSConnectionImpl(); + conset.addElement(con1); + conset.addElement(con2); + conset.addElement(con3); + conset.addElement(con4); + conset.addElement(con5); + } + + /** + * Singleton accessor + */ + public static TSeis getTSeis() { + if (eis == null) { + eis = new TSeis(); + } + return eis; + } + + public synchronized TSConnection getConnection() { + ConnectorStatus.getConnectorStatus().logAPI("TSeis.getConnection", "", ""); + TSConnectionImpl con; + + for (int i = 0; i < conset.size(); i++) { + con = (TSConnectionImpl) conset.elementAt(i); + if (con.lease()) { + return con; + } + } + + con = new TSConnectionImpl(); + con.lease(); + conset.addElement(con); + return con; + } + + public synchronized TSConnection getConnection(String usr, char[] passwd) { + ConnectorStatus.getConnectorStatus().logAPI("TSeis.getConnection", "usr,passwd", ""); + System.out.println("User is " + usr); + if ((usr.equals("cts1") && passwd[0] == 'c' && passwd[1] == 't' && passwd[2] == 's' && passwd[3] == '1') + || (usr.equals("cts2") && passwd[0] == 'c' && passwd[1] == 't' && passwd[2] == 's' && passwd[3] == '2')) { + System.out.println("Passwd lenght is " + passwd.length); + + for (int in = 0; in < passwd.length; in++) { + System.out.println("Password 3 is " + passwd[in]); + } + TSConnectionImpl con; + + for (int i = 0; i < conset.size(); i++) { + con = (TSConnectionImpl) conset.elementAt(i); + if (con.lease()) { + return con; + } + } + + con = new TSConnectionImpl(); + con.lease(); + conset.addElement(con); + return con; + } else { + System.out.println("Connection null returned"); + return null; + } + } + + public DataElement read(String key, TSConnection con) throws TSEISException { + + DataElement de = null; + if (permtable.containsKey(key)) { + de = (DataElement) permtable.get(key); + } + + // Lets see if resource manager can read from a distributed transaction? + DataElement element = rm.read(key, con); + + // May be connection is only in a local transaction. So read from + // the connection cache. + DataElement localElement = null; + Hashtable tempTable = con.getTempTable(); + if (tempTable.containsKey(key)) { + localElement = (DataElement) tempTable.get(key); + } + + if (de == null && element == null && localElement == null) { + throw new TSEISException("Data not found."); + } + if (element != null) { + return element; + } else if (localElement != null) { + return localElement; + } else { + return de; + } + } + + public String readValue(String key, TSConnection con) throws TSEISException { + + DataElement de = read(key, con); + return de.getValue(); + } + + public void insert(String key, String value, TSConnection con) throws TSEISException { + + boolean datapresent = false; + + try { + read(key, con); + datapresent = true; + } catch (TSEISException tse) { + } + + if (datapresent) + throw new TSEISException("Duplicate Key"); + + DataElement de = new DataElement(key, value); + + if ((getResourceManager().getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) && con.getAutoCommit()) { + de.setStatus(DataElement.COMMITTED); + System.out.println("TSeis.insert.permtable"); + permtable.put(key, de); + } else { // if (getResourceManager().getTransactionStatus(con) == + // TSResourceManager.INTRANSACTION) + System.out.println("TSeis.insert.temptable"); + de.setStatus(DataElement.INSERTED); + con.getTempTable().put(key, de); + } + } + + public void update(String key, String value, TSConnection con) throws TSEISException { + DataElement de = read(key, con); + de.updateVersion(); + de.setValue(value); + if ((getResourceManager().getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) && con.getAutoCommit()) { + de.setStatus(DataElement.COMMITTED); + System.out.println("TSeis.update.permtable"); + permtable.put(key, de); + } else { // if (getResourceManager().getTransactionStatus(con) == + // TSResourceManager.INTRANSACTION) + System.out.println("TSeis.update.temptable"); + if (de.getStatus() != DataElement.INSERTED) { + de.setStatus(DataElement.UPDATED); + } + System.out.println("TSeis.update." + de.getKey() + de.getValue()); + con.getTempTable().put(key, de); + } + } + + public void delete(String key, TSConnection con) throws TSEISException { + DataElement de = read(key, con); + if ((getResourceManager().getTransactionStatus(con) == TSXaTransaction.NOTRANSACTION) && con.getAutoCommit()) { + System.out.println("TSeis.delete.permtable"); + permtable.remove(key); + } else { // if (getResourceManager().getTransactionStatus(con) == + // TSResourceManager.INTRANSACTION) + System.out.println("TSeis.delete.temptable"); + de.setStatus(DataElement.DELETED); + con.getTempTable().put(key, de); + } + } + + public void returnConnection(TSConnectionImpl con) { + con.expireLease(); + } + + public void dropTable() { + ConnectorStatus.getConnectorStatus().logAPI("TSeis.dropTable", "", ""); + permtable.clear(); + ConnectorStatus.getConnectorStatus().logAPI("Table Dropped ", "", ""); + } + + public void setAutoCommit(boolean flag) { + commitflag = flag; + } + + public boolean getAutoCommit() { + return commitflag; + } + + public Vector readData() { + System.out.println("TSeis.readData"); + Vector v = new Vector(); + Enumeration e = permtable.keys(); + while (e.hasMoreElements()) { + DataElement de = (DataElement) permtable.get((String) e.nextElement()); + System.out.println("TSeis.readData." + de.getValue()); + v.add(de.getValue()); + } + return v; + } + + private void copyVector(Vector v1, Vector v2) { + int size = v1.size(); + + v2.clear(); + for (int i = 0; i < size; i++) { + String str1 = (String) v1.get(i); + v2.add(i, new String(str1)); + } + } + + // **** Implementing Resource Manager for Local Transaction **********// + + public void begin() { + ConnectorStatus.getConnectorStatus().logAPI("TSeis.begin", "", ""); + } + + public void commit(TSConnection con) throws TSEISException { + Hashtable ht = con.getTempTable(); + Enumeration e = ht.keys(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + DataElement de = (DataElement) ht.get(key); + if (de.getStatus() == DataElement.INSERTED) { + actualInsert(de); + } + if (de.getStatus() == DataElement.UPDATED) { + actualUpdate(de); + } + if (de.getStatus() == DataElement.DELETED) { + actualDelete(de.getKey()); + } + } + } + + void actualInsert(DataElement de) throws TSEISException { + if (permtable.containsKey(de.getKey())) { + throw new TSEISException("Duplicate Key"); + } + de.setStatus(DataElement.COMMITTED); + permtable.put(de.getKey(), de); + } + + void actualUpdate(DataElement de) throws TSEISException { + DataElement element = (DataElement) permtable.get(de.getKey()); + if (element.getStatus() == DataElement.PREPARED) { + throw new TSEISException("Cannot update now. 2PC in progress"); + } + de.setStatus(DataElement.COMMITTED); + permtable.put(de.getKey(), de); + } + + void actualDelete(String key) throws TSEISException { + if (permtable.containsKey(key)) { + DataElement element = (DataElement) permtable.get(key); + if (element.getStatus() == DataElement.PREPARED) { + throw new TSEISException("Cannot update now. 2PC in progress"); + } + permtable.remove(key); + } + } + + void prepareInsert(DataElement de, Xid xid) throws TSEISException { + if (permtable.containsKey(de.getKey())) { + throw new TSEISException("Duplicate Key"); + } + DataElement element = new DataElement(de.getKey(), de.getValue()); + element.prepare(de, xid); + permtable.put(element.getKey(), element); + } + + void prepareChange(DataElement de, Xid xid) throws TSEISException { + DataElement element = (DataElement) permtable.get(de.getKey()); + DataElement prepElement = new DataElement(de.getKey()); + prepElement.prepare(de, xid); + permtable.put(element.getKey(), prepElement); + } + + // ****** Ending implementation for Resource Manager for Local Transaction + // *****// + + // ******Implementating Resource Manager for XA Transaction *****// + + public void commit(Xid xid) { + System.out.println("Tseis.commit.xid"); + Enumeration e = permtable.keys(); + while (e.hasMoreElements()) { + System.out.println("commit.inTheLoop"); + String key = (String) e.nextElement(); + DataElement de = (DataElement) permtable.get(key); + if (de.getStatus() == DataElement.PREPARED && de.getXid() == xid) { + DataElement element = de.getPreparedValue(); + if (element.getStatus() == DataElement.DELETED) { + System.out.println("commit.delete"); + permtable.remove(element.getKey()); + } else { + System.out.println("commit.update"); + element.setStatus(DataElement.COMMITTED); + permtable.put(element.getKey(), element); + } + } + } + } + + public void rollback(Xid xid) { + System.out.println("Tseis.rollback.xid"); + Enumeration e = permtable.keys(); + while (e.hasMoreElements()) { + String key = (String) e.nextElement(); + DataElement de = (DataElement) permtable.get(key); + if (de.getStatus() == DataElement.PREPARED && de.getXid() == xid) { + // Revert the state to commit so that, prepared value becomes unusable + de.setStatus(DataElement.COMMITTED); + permtable.put(de.getKey(), de); + } + } + } + + public TSResourceManager getResourceManager() { + return rm; + } + + // ****** Ending implementation for Resource Manager for XA Transaction + // *****// + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java new file mode 100644 index 0000000000..8725866d62 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestBootstrapContext.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Timer; + +import javax.transaction.xa.Xid; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.XATerminator; +import jakarta.resource.spi.work.WorkManager; +import jakarta.transaction.TransactionSynchronizationRegistry; + +public class TestBootstrapContext { + + private BootstrapContext bsc; + + private WorkManager wrkmgr; + + private Timer timer1; + + private Timer timer2; + + public TestBootstrapContext(BootstrapContext bsc) { + this.bsc = bsc; + } + + public void runTests() { + Debug.trace("Inside TestBootStrapContext.runTests"); + testTimer(); + testXATerminator(); + testIsContextSupported(); + testTransactionSynchronizationRegistry(); + testTSRLookup(); + } + + public void testTSRLookup() { + try { + // This lookup must work for JavaEE but is not guaranteed to + // be supported in JCA standalone environment. + // the only test that actually checks for this is in the + // src/com/sun/ts/tests/xa/ee/tsr code which is NOT part of + // standalone JCA tck. + TSNamingContext ncxt = new TSNamingContext(); + String tsrStr = "java:comp/TransactionSynchronizationRegistry"; + Object obj = (Object) ncxt.lookup(tsrStr); + if (obj != null) { + ConnectorStatus.getConnectorStatus().logState("TSR Lookup Successful"); + Debug.trace("TSR Lookup Successful"); + } else { + Debug.trace("TSR Null"); + } + } catch (Throwable ex) { + Debug.trace("Exception when calling testTSRLookup()"); + Debug.trace("This is okay if JNDI lookup of tsr is not supported in standalone JCA"); + ex.getMessage(); + } + } + + public void testTransactionSynchronizationRegistry() { + try { + // verify server supports TransactionSynchronizationRegistry + // per spec assertion Connector:SPEC:291 + TransactionSynchronizationRegistry tr = bsc.getTransactionSynchronizationRegistry(); + if (tr != null) { + String str = "getTransactionSynchronizationRegistry supported by Server"; + Debug.trace(str); + ConnectorStatus.getConnectorStatus().logState(str); + } else { + Debug.trace("getTransactionSynchronizationRegistry not supported by Server."); + } + + } catch (Throwable ex) { + Debug.trace("Exception when calling getTransactionSynchronizationRegistry()"); + ex.getMessage(); + } + } + + private void testTimer() { + try { + timer1 = bsc.createTimer(); + timer2 = bsc.createTimer(); + + Debug.trace("Inside TestBootStrapContext.testTimer()"); + + if (timer1 == null || timer2 == null) { + ConnectorStatus.getConnectorStatus().logState("Timer is Null"); + } else { + if (timer1.equals(timer2)) { + ConnectorStatus.getConnectorStatus().logState("Shared Timer Provided by BootstrapContext"); + Debug.trace("Timer is shared or returned the same instance"); + } else { + ConnectorStatus.getConnectorStatus().logState("New Timer Provided by BootstrapContext"); + Debug.trace("New Timer Provided by BootstrapContext"); + } + } + + } catch (UnavailableException ex) { + + ConnectorStatus.getConnectorStatus().logState("Timer UnavailableException"); + } catch (java.lang.UnsupportedOperationException uex) { + + ConnectorStatus.getConnectorStatus().logState("Timer UnsupportedOperationException"); + } + } + + private void testXATerminator() { + try { + XATerminator xt = bsc.getXATerminator(); + wrkmgr = bsc.getWorkManager(); + + TestWorkManager twm = new TestWorkManager(bsc); + + Xid myid = twm.getXid(); + Xid nestxid = twm.getNestXid(); + + if (xt != null) { + ConnectorStatus.getConnectorStatus().logState("XATerminator is not null"); + Debug.trace("TestBootStrapContext.testXATerminator XID is " + myid.getFormatId()); + Debug.trace("TestBootStrapContext.testXATerminator XID is " + nestxid.getFormatId()); + xt.commit(myid, true); + xt.commit(nestxid, true); + ConnectorStatus.getConnectorStatus().logState("Xid Committed"); + Debug.trace("XATerminator committed xid"); + } + } catch (Throwable ex) { + ex.getMessage(); + } + } + + /* + * This is used to assist in the verification of assertion Connector:SPEC:208 this will check that the server supports + * all 3 types of inflow context of: TransactionContext, SecurityContext, and HintsContext. This is verified by invoking + * the servers method of: BootstrapContext.isContextSupported(TIC/SIC/HIC). + * + */ + private void testIsContextSupported() { + try { + // verify server supports TransactionContext + Class tic = jakarta.resource.spi.work.TransactionContext.class; + boolean b1 = bsc.isContextSupported(tic); + if (b1) { + Debug.trace("TransactionContext supported by Server."); + ConnectorStatus.getConnectorStatus().logState("TransactionContext supported by Server."); + } + + Class sic = jakarta.resource.spi.work.SecurityContext.class; + boolean b2 = bsc.isContextSupported(sic); + if (b2) { + Debug.trace("SecurityContext supported by Server."); + ConnectorStatus.getConnectorStatus().logState("SecurityContext supported by Server."); + } + + Class hic = jakarta.resource.spi.work.HintsContext.class; + boolean b3 = bsc.isContextSupported(hic); + if (b3) { + ConnectorStatus.getConnectorStatus().logState("HintsContext supported by Server."); + } + + } catch (Throwable ex) { + ex.getMessage(); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java new file mode 100644 index 0000000000..b889dc8015 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/TestWorkManager.java @@ -0,0 +1,725 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.Xid; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.XATerminator; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.WorkCompletedException; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; +import jakarta.resource.spi.work.WorkRejectedException; + +public class TestWorkManager { + + private WorkManager wmgr; + + private static Xid myxid; + + private static Xid mynestxid; + + private XATerminator xa; + + private String sicUser = ""; + + private String sicPwd = ""; + + private String eisUser = ""; + + private LocalTxMessageListener ml; + + private BootstrapContext bsc = null; + + // by default assume Case 1 security where identity is flown-in + // from RA and exists within AppServer security domain + // the alternative is case 2 which requires mapping EIS identity to + // an identity which exists within the AppServer security domain. + private boolean useSecurityMapping = false; + + public TestWorkManager(BootstrapContext val) { + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + this.xa = bsc.getXATerminator(); + + this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + + verifyConfigSettings(); + } + + public void runTests() { + + doWork(); + startWork(); + rogueWork(); + distributableWork(); + scheduleWorkListener(); + scheduleWork(); + submitXidWork(); + submitNestedXidWork(); + + submitSecurityContextWork(); + submitSICWork(); + + testWorkContextProvider(); + testWorkContextLifecycleListener(); + doWorkAndAssoc(); + + doAPITests(); + } + + /* + * There are 2 choices related to establishing Caller identity which need to considered when using + * TSSecurityContextWithListener/TSSecurityContext: choice 1: RA flows in an identity to the AppServers security domain. + * (eg no mapping/transalation done the identity is used as-is when passed into the App Servers security domain) choice + * 2: RA flows in an identity that belongs to the EIS domain only and a mapping of that identity to an AppServer + * identity then needs to be done to map the EIS id to an id that exists within the AppServers security domain. + */ + public void submitSecurityContextWork() { + + if (!useSecurityMapping) { + // case 1: no mappings, identities must exist in security domain. + // PVC is for case 1 only, so do PVC tests in here. + cbTestCPCandNullPrin(); + cbTestAllCallbacksAndPrin(); + cbTestAllCallbacksNullPrin(); + cbTestCPCandPVC(); + cbTestCPCandGPC(); + cbTestCPCandPrin(); + } else { + // case-2: only call this for security mappings tests. + cbTestGPCandCPCFail(); + cbTestEISCPCandPrin(); + } + } + + /* + * Test handling of a CPC - where no principals will be added to the CPC subject and the CPC has a non-null principal. + * This is testing the CPC being handled in a case-2 scenario with security-mapping on such that the EIS creds need to + * be used and mapped. + * + */ + public void cbTestEISCPCandPrin() { + String str = "Enterred cbEISTestCPCandPrin() and Testing that A CPC "; + str += "that has nothing added to subject and has a non-null principal is handled"; + debug(str); + + debug("cbTestEISCPCandPrin(): useSecurityMapping SHOULD be true"); + debug("cbTestEISCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, useSecurityMapping); + tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbEISTestCPCandPrin: callbacks handled."); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbEISTestCPCandPrin()"); + } + + /* + * Test handling of a CPC - where no principals will be added to the CPC subject and the CPC has a non-null principal. + * (This tests it using Case-1 security creds) + */ + public void cbTestCPCandPrin() { + String str = "Enterred cbTestCPCandPrin() and Testing that A CPC "; + str += "that has nothing added to subject and has a null principal is handled"; + debug(str); + + debug("cbTestCPCandPrin(): useSecurityMapping SHOULD be false"); + debug("cbTestCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, null, useSecurityMapping); + tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbTestCPCandPrin: callbacks handled."); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestCPCandPrin()"); + } + + /* + * Test handling of a CPC - where no principals will be added to the CPC execSubject and the CPC has a null principal. + * Also, this CPC follows a GPC and PVC. + */ + public void cbTestAllCallbacksNullPrin() { + + String str = "Enterred cbTestAllCallbacksNullPrin() and Testing a GPC, PVC, and CPC "; + str += "that have nothing added to subject and a null principal are handled"; + debug(str); + + debug("cbTestAllCallbacksNullPrin(): useSecurityMapping SHOULD be false"); + debug("cbTestAllCallbacksNullPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(null, null, null, useSecurityMapping); + tsic.setCallbacks(true, true, true); // CPC=true, GPC=true, PVC=true + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbTestAllCallbacksNullPrin: callbacks handled."); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestAllCallbacksNullPrin()"); + } + + /* + * Test handling of a CPC - where no principals will be added to the CPC execSubject and the CPC has a non-null + * principal. Also, the CPC is done after a GPC and PVC. + * + */ + public void cbTestAllCallbacksAndPrin() { + + String str = "Enterred cbTestAllCallbacksAndPrin() and Testing a GPC, PVC, and CPC "; + str += "that have nothing added to subject and a non-null principal are handled"; + debug(str); + + debug("cbTestAllCallbacksAndPrin(): useSecurityMapping SHOULD be false"); + debug("cbTestAllCallbacksAndPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, useSecurityMapping); + tsic.setCallbacks(true, true, true); // CPC=true, GPC=true, PVC=true + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbTestAllCallbacksAndPrin: callbacks handled."); + + debug("TestWorkManager.cbTestAllCallbacksAndPrin - done calling tsic.setLogOutString()"); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestAllCallbacksAndPrin()"); + } + + /* + * Test handling of a CPC - where no principals will be added to the CPC subject and the CPC has a null principal. + * + */ + public void cbTestCPCandNullPrin() { + String str = "Enterred cbTestCPCandNullPrin() and Testing that A CPC "; + str += "that has nothing added to subject and has a null principal is handled"; + debug(str); + + debug("cbTestCPCandNullPrin(): useSecurityMapping SHOULD be false"); + debug("cbTestCPCandNullPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(null, null, null, useSecurityMapping); + tsic.setCallbacks(true, false, false); // CPC=true, GPC=false, PVC=false + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbTestCPCandNullPrin: Case-1 security callbacks handled."); + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestCPCandNullPrin()"); + } + + /* + * Test case where GPC is followed by CPC - no principals are added to the execSubject, the CPC (with a non-null + * principal), and one or more GPC's (each non-null group) are handled. + */ + public void cbTestCPCandGPC() { + String str = "Enterred cbTestCPCandGPC() and Testing that "; + str += "GPC (w non-null group) followed by a CPC that has non-null princiapl) is handled"; + debug(str); + + debug("cbTestCPCandPrin(): useSecurityMapping SHOULD be false"); + debug("cbTestCPCandPrin(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, useSecurityMapping); + tsic.setCallbacks(true, true, false); // CPC=true, GPC=true, PVC=false + tsic.setAddPrinToExecSubject(false); + tsic.setLogOutString("cbTestCPCandGPC: callbacks handled."); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestCPCandGPC()"); + } + + /* + * Test case where PVC is followed by CPC - no principals are added to the execSubject. + */ + public void cbTestCPCandPVC() { + String str = "Enterred cbTestCPCandPVC() and Testing that "; + str += "PVC followed by a CPC that has non-null principal) is handled"; + debug(str); + + debug("cbTestCPCandPVC(): useSecurityMapping SHOULD be false"); + debug("cbTestCPCandPVC(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, useSecurityMapping); + tsic.setCallbacks(true, false, true); // CPC=true, GPC=false, PVC=true + tsic.setLogOutString("cbTestCPCandPVC: callbacks handled."); + tsic.setAddPrinToExecSubject(false); + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestCPCandPVC()"); + } + + /* + * Test that a single (presumably non-group) principal was added to the execSubject and the CPC is NOT handled. This + * uses invalid creds that are used in a case-2 scenario (with security mappings). The assumption is that this is only + * called for case-2 security. + */ + public void cbTestGPCandCPCFail() { + String str = "Enterred cbTestGPCandCPCFail() and Testing a GPC, and CPC fail"; + str += "where principal is added to execSubject and CPC is not handled"; + debug(str); + + debug("cbTestGPCandCPCFail(): useSecurityMapping SHOULD be true"); + debug("cbTestGPCandCPCFail(): useSecurityMapping IS " + useSecurityMapping); + + TSSecurityContext tsic = new TSSecurityContextWithListener("fakeusr", "fakepwd", "fakepwd", true); + tsic.setCallbacks(true, true, false); // CPC=true, GPC=true, PVC=false + tsic.setAddPrinToExecSubject(true); + tsic.setExpectFailure(true); + tsic.setLogOutString("cbTestGPCandCPCFail: callbacks are NOT handled - as expected."); + + SecurityContext sic = (SecurityContext) tsic; + + testSecurityInflow(sic, true); + + debug("done testing cbTestGPCandCPCFail()"); + } + + /* + * This will need to submit a work object that has SIC set on it and then we will need to verify that the work object + * was recieved by the AppServer (via MDB) and we will want to verify the values that got set within the SIC setting to + * confirm the subject info is correct. (note that invoking MDB.isCallerInRole() is one thing we can use to assist with + * credential validation. + * + */ + public void submitSICWork() { + + try { + ConnectorStatus.getConnectorStatus().logState("enterred submitSICWork()"); + debug("enterred submitSICWork()"); + + ContextWork w1 = new ContextWork(wmgr); + + debug("creating SIC with user=" + sicUser + " pwd=" + sicPwd + " eisUser = " + eisUser); + + SecurityContext sic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, this.useSecurityMapping); + + w1.addWorkContext(sic); + + wmgr.doWork(w1, WorkManager.INDEFINITE, null, null); + + ConnectorStatus.getConnectorStatus().logState("submitted work with SIC Listener"); + + } catch (WorkCompletedException e) { + // everything seemed to work okay + debug("WorkCompleted calling submitSICWork()"); + + } catch (Exception e) { + debug("got exception in submitSICWork() with user = " + sicUser + " pwd = " + sicPwd + " principal=" + eisUser); + debug(e.toString()); + Debug.printDebugStack(e); + } + + } + + /* + * This method is testing the order in which notifications occur. (see JCA spec assertions 224, 225, 262) This method + * makes use of a counter and some dedicated classes that will use the counter to record the calling order order of + * notifications for workAccepted, workStarted, contextSetupCompleted, and workAccepted. + * + */ + public void testWorkContextLifecycleListener() { + + try { + debug("enterred testWorkContextLifecycleListener()"); + + ContextWork workimpl = new ContextWork(wmgr); + + // we want to ensure that WorkListenerImpl notifications + // occur BEFOR the workcontext setup related notifications + // so create new counter obj, and ensure it is set to zero + Counter.resetCount(); // set counter to 0 + WorkListenerImpl2 wl = new WorkListenerImpl2(); + + debug("Submitting Work Object testWorkContextLifecycleListener()."); + + // as part of assert 261, set hint context - which should be unknown + // to the appserver and thus ignored...if its not ignored and any + // contextSetupFailed notification occurs - assert 261 will be flagged + // and detected as failing later on + HintsContext hic = new HintsContext(); + hic.setName("someReallyLongAndUncommonName"); + hic.setHint(HintsContext.NAME_HINT, "someReallyLongAndUncommonHintValue"); + workimpl.addWorkContext(hic); + + SecurityContext sic = new TSSICWithListener(eisUser, eisUser, sicUser, true); + workimpl.addWorkContext(sic); + wmgr.doWork(workimpl, WorkManager.INDEFINITE, null, wl); + debug("done submitting work obj in testWorkContextLifecycleListener()"); + + } catch (WorkRejectedException ex) { + // we should not get here + debug("Problem: testWorkContextLifecycleListener WorkException thrown is " + ex.getMessage()); + ex.printStackTrace(); + + } catch (WorkException ex) { + // we should not get here (unless WorkCompleted Exception) + debug("testWorkContextLifecycleListener WorkException thrown is " + ex.getMessage()); + ex.printStackTrace(); + + } catch (Exception ex) { + // we should not get here + debug("Problem: testWorkContextLifecycleListener Exception thrown is " + ex.getMessage()); + ex.printStackTrace(); + } + + } + + public void testWorkContextProvider() { + + try { + debug("enterred testWorkContextProvider()"); + + // this helps test assertion 221 + ContextWork workimpl = new ContextWork(wmgr); + ExecutionContext ec = new ExecutionContext(); + WorkListenerImpl wl = new WorkListenerImpl(); + + debug("Submitting Work Object - which should genetate WorkRejectedException."); + wmgr.doWork(workimpl, 5000, ec, wl); + + } catch (WorkRejectedException we) { + // we expect to get here!!! + String str = "SUCCESS: WorkContextProvider causes expected WorkRejectedException"; + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + + } catch (WorkException we) { + // we should not get here + debug("FAILURE: testWorkContextProvider() WorkException thrown is " + we.getMessage()); + + } catch (Exception ex) { + // we should not get here + debug("FAILURE: testWorkContextProvider() Exception thrown is " + ex.getMessage()); + } + + debug("leaving testWorkContextProvider()"); + } + + /* + * This is used to help verify assertion Connector:SPEC:209 + * + * ARGS: + * + * SecurityContext: this is the sic that is passed in. It must be constructed befor being passed in. writeToDB: this is + * used to indicate if we want to commit/write our transaction to the db or roll it back. + * + * There are 2 choices related to establishing Caller identity: choice 1: RA flows in an identify to the AppServers + * security domain. (eg no transalation is done as the identity is used as is) choice 2: RA flows in an identity that + * belongs to the EIS domain only and a mapping of that identity to an AppServer identity then needs to be done to map + * the EIS id to an id that exists within the AppServers security domain. + * + */ + public void testSecurityInflow(SecurityContext sic, boolean writeToDB) { + + try { + ConnectorStatus.getConnectorStatus().logState("enterred testSecurityInflow()"); + debug("enterred testSecurityInflow()"); + + ExecutionContext ec = startTx(); + + ContextWork w1 = new ContextWork(wmgr); + + // adding the worklistener along with securityContextWithListener allows + // us to test assertion 223 + WorkListenerImpl wl = new WorkListenerImpl(); + wl.setUidStr("notifications test"); // assists w/ assertion + // Connector:SPEC:223 + + TransactionContext tic = new TransactionContext(); + tic.setXid(ec.getXid()); + w1.addWorkContext(tic); + + w1.addWorkContext(sic); + + wmgr.doWork(w1, WorkManager.INDEFINITE, null, wl); + + if (writeToDB) { + // commit write to DB - with TIC and SIC with Listener. For this, a + // Translation is Required + xa.commit(ec.getXid(), true); + } else { + // rollback a write to DB - with TIC and SIC + xa.rollback(tic.getXid()); + } + + } catch (WorkCompletedException e) { + // everything seemed to work okay + debug("WorkCompleted calling testSecurityInflow()"); + + } catch (Exception e) { + debug("got exception in testSecurityInflow() with user = " + sic.getName()); + debug(e.toString()); + Debug.printDebugStack(e); + } + + } + + private ExecutionContext startTx() { + ExecutionContext ec = new ExecutionContext(); + try { + Xid xid = new XidImpl(); + ec.setXid(xid); + ec.setTransactionTimeout(5 * 1000); // 5 seconds + } catch (Exception ex) { + Debug.printDebugStack(ex); + } + return ec; + } + + public void scheduleWork() { + try { + ScheduleWork sw = new ScheduleWork(); + wmgr.scheduleWork(sw); + debug("Schedule work called"); + ConnectorStatus.getConnectorStatus().logState("Schedule Work Called"); + } catch (WorkException we) { + debug("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + public void scheduleWorkListener() { + try { + ScheduleWork sw = new ScheduleWork(); + ExecutionContext ec = new ExecutionContext(); + wmgr.scheduleWork(sw, 5000, ec, null); + debug("Schedule work listener called"); + ConnectorStatus.getConnectorStatus().logState("Schedule Work Listener Called"); + } catch (WorkException we) { + debug("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + /* + * this will try to test API assertions which basically means we are testing the API. + */ + public void doAPITests() { + APIAssertionTest apiTest = new APIAssertionTest(); + apiTest.runTests(); + } + + public void doWork() { + try { + WorkImpl workimpl = new WorkImpl(wmgr); + ExecutionContext ec = new ExecutionContext(); + debug("doWork(): Creating WorkListener"); + WorkListenerImpl wl = new WorkListenerImpl(); + ConnectorStatus.getConnectorStatus().logState("Work Object Submitted"); + wmgr.doWork(workimpl, WorkManager.INDEFINITE, ec, wl); + } catch (WorkException we) { + debug("TestWorkManager WorkException thrown is " + we.getMessage()); + } + } + + // this is used to test Connector:spec:245 + public void doWorkAndAssoc() { + try { + // using WorkAndAssocImpl allows us to test Connector:spec:245 + WorkAndAssocImpl workimpl = new WorkAndAssocImpl(wmgr); + ExecutionContext ec = new ExecutionContext(); + debug("doWorkAndAssoc(): Creating WorkListener"); + WorkListenerImpl wl = new WorkListenerImpl(); + ConnectorStatus.getConnectorStatus().logState("Work Object Submitted"); + wmgr.doWork(workimpl, wmgr.INDEFINITE, ec, wl); + + } catch (WorkException we) { + debug("TestWorkManager WorkException thrown is " + we.getMessage()); + we.printStackTrace(); + } + } + + public void startWork() { + try { + WorkImpl workimpl = new WorkImpl(wmgr); + ExecutionContext ec = new ExecutionContext(); + debug("startWork: Creating WorkListener"); + WorkListenerImpl wl = new WorkListenerImpl(); + long value = wmgr.startWork(workimpl, 1000, ec, wl); + + debug("startWork: WorkManager value = " + value); + + ConnectorStatus.getConnectorStatus().logState("WorkManager value returned " + value); + debug("WorkManager value returned " + value); + + } catch (WorkException we) { + debug("TestWorkManager.startWork() Exception thrown is " + we.getMessage()); + } + } + + public void rogueWork() { + try { + RogueWorkImpl rwi = new RogueWorkImpl(); + wmgr.doWork(rwi); + } catch (WorkCompletedException wx) { + ConnectorStatus.getConnectorStatus().logState("Rogue work throws WorkCompletedException"); + } catch (WorkException we) { + debug("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + public void distributableWork() { + try { + DistributedWorkImpl dwi = new DistributedWorkImpl(wmgr); + // wmgr.doWork(dwi); + ExecutionContext ec = new ExecutionContext(); + debug("distributableWork(): Creating WorkListener"); + WorkListenerImpl wl = new WorkListenerImpl(); + long value = wmgr.startWork(dwi, 1000, ec, wl); + ConnectorStatus.getConnectorStatus().logState("DistributedWork Object Submitted"); + + if (value >= -1) { + ConnectorStatus.getConnectorStatus().logState("WorkManagers DistributedWork value returned " + value); + debug("WorkManagers DistributedWork value returned " + value); + } + } catch (WorkCompletedException wx) { + ConnectorStatus.getConnectorStatus().logState("Rogue work throws WorkCompletedException"); + } catch (WorkException we) { + debug("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + public void setXid(Xid xid) { + this.myxid = xid; + } + + public Xid getXid() { + return this.myxid; + } + + public void setNestXid(Xid xid) { + this.mynestxid = xid; + } + + public Xid getNestXid() { + return this.mynestxid; + } + + /* + * JCA 1.6 spec 9section 16.3 and 16.4 state there are two types of security a RA can use: "Case 1" and "Case 2". Case 1 + * is when the RA passes in an identity and that identity is assumed to exist within the app server security domain. + * "Case 2" takes and EIS identity, which will not exist in AppServer domain, so this case requires a + * mapping/translation from and EIS-Identity to an i AppServer-Identity. + * + * set useSecurityMapping to true to specify we want Case 2 security mapping use. set useSecurityMapping to false to + * indicate Case 1 security. + */ + public void setUseSecurityMapping(boolean val) { + this.useSecurityMapping = val; + } + + public boolean getUseSecurityMapping() { + return this.useSecurityMapping; + } + + public void submitXidWork() { + try { + XidImpl myid = new XidImpl(); + + // setting up the xid so that it can be retrieved by the TestBootstrap to + // commit the xid work object. + setXid(myid); + + WorkXid workid = new WorkXid(); + ExecutionContext ec = new ExecutionContext(); + ec.setXid(myid); + debug("TestWorkManager.submitXidWork XID IS " + myid.getFormatId()); + wmgr.doWork(workid, wmgr.INDEFINITE, ec, null); + debug("WorkXid Submitted"); + ConnectorStatus.getConnectorStatus().logState("WorkXid Submitted"); + } catch (WorkException we) { + Debug.printDebugStack(we); + } + } + + public void submitNestedXidWork() { + try { + XidImpl myid = new XidImpl(); + WorkXid1 workid = new WorkXid1(wmgr, myid); + // setting up the xid so it can be commited later. + setNestXid(myid); + + debug("TestWorkManager.submitNestedXidWork XID IS " + myid.getFormatId()); + + ExecutionContext ec = new ExecutionContext(); + ec.setXid(myid); + wmgr.doWork(workid, wmgr.INDEFINITE, ec, null); + debug("WorkXid1 submitted"); + + } catch (WorkException we) { + Debug.printDebugStack(we); + } + } + + /* + * verify we can find config properties that should be set as part of our configuration process. (See ts.jte prop for + * values.) + */ + private void verifyConfigSettings() { + String err = "WARNING - TestWorkManager could not find required system property: "; + + if (sicUser == null) { + err += "j2eelogin.name"; + debug(err); + sicUser = "j2ee"; // try to set to a default + } + + if (sicPwd == null) { + err += "j2eelogin.password"; + debug(err); + sicUser = "j2ee"; // try to set to a default + } + + if (eisUser == null) { + err += "j2eelogin.password"; + debug(err); + sicUser = "cts1"; // try to set to a default + } + } + + private void debug(String str) { + Debug.trace(str); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java new file mode 100644 index 0000000000..18ccdd7680 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/Util.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.security.AccessController; +import java.security.PrivilegedAction; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.SecurityException; +import jakarta.resource.spi.security.PasswordCredential; + +public class Util { + static public PasswordCredential getPasswordCredential(final ManagedConnectionFactory mcf, final Subject subject, + ConnectionRequestInfo info) throws ResourceException { + + if (subject == null) { + if (info == null) { + return null; + } else { + TSConnectionRequestInfo myinfo = (TSConnectionRequestInfo) info; + PasswordCredential pc = new PasswordCredential(myinfo.getUser(), myinfo.getPassword().toCharArray()); + pc.setManagedConnectionFactory(mcf); + return pc; + } + } else { + PasswordCredential pc = (PasswordCredential) AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + Set creds = subject.getPrivateCredentials(PasswordCredential.class); + Iterator iter = creds.iterator(); + while (iter.hasNext()) { + PasswordCredential temp = (PasswordCredential) iter.next(); + if (temp.getManagedConnectionFactory().equals(mcf)) { + return temp; + } + } + return null; + } + }); + if (pc == null) { + throw new SecurityException("No PasswordCredential found"); + } else { + return pc; + } + } + } + + static public boolean isEqual(String a, String b) { + if (a == null) { + return (b == null); + } else { + return a.equals(b); + } + } + + static public boolean isPasswordCredentialEqual(PasswordCredential a, PasswordCredential b) { + if (a == b) + return true; + if ((a == null) && (b != null)) + return false; + if ((a != null) && (b == null)) + return false; + if (!isEqual(a.getUserName(), b.getUserName())) + return false; + String p1 = null; + String p2 = null; + if (a.getPassword() != null) { + p1 = new String(a.getPassword()); + } + if (b.getPassword() != null) { + p2 = new String(b.getPassword()); + } + return (isEqual(p1, p2)); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java new file mode 100644 index 0000000000..b8ba6459f9 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkAndAssocImpl.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2010, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Vector; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.work.WorkManager; + +/* + * This class is used to assist in testing with assertion Connector:SPEC:245. + * This tests the association between the resource adapter instance and the + * Work instance before the exection of the Work instance has been started + */ +public class WorkAndAssocImpl extends WorkImpl implements ResourceAdapterAssociation { + private int count = 0; + + protected String callingClassName = "WorkAndAssocImpl"; + + private ResourceAdapter resourceAdapter; + + public WorkAndAssocImpl(WorkManager wm) { + super(wm, "WorkAndAssocImpl"); + } + + public void run() { + + // do check for setResourceAdapter call + checkAssociation(); + + try { + ConnectorStatus.getConnectorStatus().logState("WorkAndAssocImpl.run"); + debug("WorkAndAssocImpl.run"); + } catch (Exception ex) { + } + + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this work instance + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "WorkAndAssocImpl setResourceAdapter " + count; + debug(newStr1); + ConnectorStatus.getConnectorStatus().logState(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this work instance + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * This method is used to assist in the verification process of assertion Connector:SPEC:245 This method must be called + * befor the work instances 'run' method is called. This method checks if the setResourceAdapter() method was called and + * if so, then this method logs a message to indicate that it was called prior to the 'run' method of the run method. + */ + public void checkAssociation() { + Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); + String toCheck1 = "WorkAndAssocImpl setResourceAdapter 1"; + + for (int i = 0; i < vLog.size(); i++) { + String str = (String) vLog.elementAt(i); + if (str.startsWith(toCheck1)) { + String str2 = "LocalTx - association exists between RA and work"; + ConnectorStatus.getConnectorStatus().logState(str2); + break; + } + } + } + + private void debug(String str) { + Debug.trace(str); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java new file mode 100644 index 0000000000..383093f26c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkImpl.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class WorkImpl implements Work { + protected WorkManager wm; + + protected String callingClassName = "WorkImpl"; + + public WorkImpl(WorkManager wm) { + this.wm = wm; + + String str = callingClassName + ".constructor"; + ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); + debug(str); + } + + public WorkImpl(WorkManager wm, String strCallingClassName) { + this.wm = wm; + callingClassName = strCallingClassName; + + String str = callingClassName + ".constructor"; + ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); + debug(str); + } + + public void release() { + String str = callingClassName + ".release"; + ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); + debug(str); + } + + public void run() { + try { + String str = callingClassName + ".run"; + ConnectorStatus.getConnectorStatus().logAPI(str, "", ""); + debug(str); + NestWork nw = new NestWork(); + wm.doWork(nw); + } catch (WorkException we) { + debug("got WorkException in WorkImpl.run(): " + we.getMessage()); + } + } + + /* + * this sets the name of the calling class so that we can be sure proper logging info is dumped out. + * + */ + public void setCallingClassName(String str) { + this.callingClassName = str; + } + + public String getCallingClassName() { + return this.callingClassName; + } + + private void debug(String str) { + Debug.trace(str); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java new file mode 100644 index 0000000000..85bc61c690 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl.java @@ -0,0 +1,66 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.work.WorkEvent; +import jakarta.resource.spi.work.WorkListener; + +public class WorkListenerImpl implements WorkListener { + private String uidStr = null; + + public void workAccepted(WorkEvent e) { + if (uidStr == null) { + ConnectorStatus.getConnectorStatus().logState("WorkListenerImpl.workAccepted"); + } else { + ConnectorStatus.getConnectorStatus().logState("WorkListenerImpl.workAccepted for:" + uidStr); + } + debug("WorkListenerImpl.workAccepted"); + } + + public void workRejected(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("WorkListenerImpl.workRejected"); + debug("WorkListenerImpl.workRejected"); + } + + public void workStarted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("WorkListenerImpl.workStarted"); + debug("WorkListenerImpl.workStarted"); + } + + public void workCompleted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("WorkListenerImpl.workCompleted"); + debug("WorkListenerImpl.workCompleted"); + } + + public void setUidStr(String val) { + this.uidStr = val; + } + + public String getUidStr() { + return this.uidStr; + } + + private void debug(String str) { + Debug.trace(str); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java similarity index 58% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java index fe8926f6a1..9bbdb4de9f 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkListenerImpl2.java @@ -31,35 +31,32 @@ * */ public class WorkListenerImpl2 implements WorkListener { - private Counter count = new Counter(); - - public void workAccepted(WorkEvent e) { - debug("WorkListenerImpl2.workAccepted"); - String str = "notifications test: workAccepted(): count=" - + count.getCount(Counter.Action.INCREMENT); - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - public void workRejected(WorkEvent e) { - debug("WorkListenerImpl2.workRejected"); - } - - public void workStarted(WorkEvent e) { - String str = "notifications test: workStarted(): count=" - + count.getCount(Counter.Action.INCREMENT); - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - public void workCompleted(WorkEvent e) { - String str = "notifications test: workCompleted(): count=" - + count.getCount(Counter.Action.INCREMENT); - ConnectorStatus.getConnectorStatus().logState(str); - debug(str); - } - - private void debug(String str) { - Debug.trace(str); - } + private Counter count = new Counter(); + + public void workAccepted(WorkEvent e) { + debug("WorkListenerImpl2.workAccepted"); + String str = "notifications test: workAccepted(): count=" + count.getCount(Counter.Action.INCREMENT); + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + public void workRejected(WorkEvent e) { + debug("WorkListenerImpl2.workRejected"); + } + + public void workStarted(WorkEvent e) { + String str = "notifications test: workStarted(): count=" + count.getCount(Counter.Action.INCREMENT); + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + public void workCompleted(WorkEvent e) { + String str = "notifications test: workCompleted(): count=" + count.getCount(Counter.Action.INCREMENT); + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + private void debug(String str) { + Debug.trace(str); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java similarity index 80% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java index 666fe6b004..8109e0511a 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid.java @@ -24,16 +24,16 @@ public class WorkXid implements Work { - public WorkXid() { - Debug.trace("WorkXid.constructor"); - } + public WorkXid() { + Debug.trace("WorkXid.constructor"); + } - public void release() { - Debug.trace("WorkXid.release"); - } + public void release() { + Debug.trace("WorkXid.release"); + } - public void run() { - Debug.trace("WorkXid.run"); - } + public void run() { + Debug.trace("WorkXid.run"); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java new file mode 100644 index 0000000000..4288bb38bf --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/WorkXid1.java @@ -0,0 +1,83 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class WorkXid1 implements Work { + + private WorkManager wm; + + private Xid xid; + + public WorkXid1(WorkManager wm, Xid xid) { + this.wm = wm; + this.xid = xid; + ConnectorStatus.getConnectorStatus().logAPI("WorkXid.constructor", "", ""); + Debug.trace("WorkXid1.constructor"); + } + + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("WorkXid.release", "", ""); + Debug.trace("WorkXid1.release() called."); + + if ((xid != null) && (xid.getGlobalTransactionId() != null)) { + Debug.trace("WorkXid1.release() xid was: " + new String(xid.getGlobalTransactionId())); + } else if (xid != null) { + Debug.trace("WorkXid1.release() xid was NOT null but xid.getGlobalTransactionId() was null."); + } else { + Debug.trace("WorkXid1.release() xid was: null"); + } + Debug.trace("WorkXid1.release() xid being set == null"); + + this.xid = null; + } + + public void run() { + try { + ConnectorStatus.getConnectorStatus().logAPI("WorkXid.run", "", ""); + Debug.trace("WorkXid1.run"); + ConnectorStatus.getConnectorStatus().logAPI("WorkXid1.run", "", ""); + NestedWorkXid workid = new NestedWorkXid(); + + ExecutionContext ec = new ExecutionContext(); + ec.setXid(this.xid); + Debug.trace("set the xid in ec"); + wm.doWork(workid, wm.INDEFINITE, ec, null); + Debug.trace("submitted the nested xid work"); + ConnectorStatus.getConnectorStatus().logState("WorkXid Submitted"); + + } catch (WorkException we) { + if (we.TX_CONCURRENT_WORK_DISALLOWED == WorkException.TX_CONCURRENT_WORK_DISALLOWED) { + Debug.trace("In the WorkException of Concurrent xid"); + ConnectorStatus.getConnectorStatus().logState("WorkException.TX_CONCURRENT_WORK_DISALLOWED caught"); + } + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java new file mode 100644 index 0000000000..d5dbb73aeb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAManagedConnectionFactory.java @@ -0,0 +1,390 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +public class XAManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private String TSRValue; + + private int count; + + private String password; + + private String user; + + private String userName; + + /* + * @name XAManagedConnectionFactory + * + * @desc Default conctructor + */ + public XAManagedConnectionFactory() { + } + + public String getUser() { + System.out.println("XAManagedConnectionFactory.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + System.out.println("XAManagedConnectionFactory.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + System.out.println("XAManagedConnectionFactory.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + System.out.println("XAManagedConnectionFactory.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + System.out.println("XAManagedConnectionFactory.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + System.out.println("XAManagedConnectionFactory.setPassword() with val = " + val); + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + return new TSEISDataSource(this, cxManager); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "XAManagedConnectionFactory setResourceAdapter " + count; + System.out.println(newStr1); + ConnectorStatus.getConnectorStatus().logState(newStr1); + + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + return new TSEISDataSource(this, null); + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + TSXAConnection xacon = null; + TSConnection con = null; + String userName = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + xacon = new TSXAConnectionImpl(); + con = xacon.getConnection(); + System.out.println("xacon.getConnection"); + } else { + xacon = new TSXAConnectionImpl(); + System.out.println("xacon.getConnection(u,p)"); + con = xacon.getConnection(pc.getUserName(), pc.getPassword()); + } + if (con == null) { + System.out.println("Connection is null"); + } + return new TSManagedConnection(this, pc, xacon, con, true, true); + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + + try { + // getXADataSource().setLogWriter(out); + } catch (Exception ex) { + ResourceException rex = new ResourceException("Exception"); + rex.initCause(ex); + throw rex; + } + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + try { + return null; + } catch (Exception ex) { + ResourceException rex = new ResourceException("Exception"); + rex.initCause(ex); + throw rex; + } + } + + /* + * @name equals + * + * @desc compares the given object with this object. + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof XAManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + XAManagedConnectionFactory that = (XAManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.TSRValue, that.getTSRValue())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void setTSRValue(String name) { + ConnectorStatus.getConnectorStatus().logState("XAManagedConnectionFactory.setTSRValue"); + Debug.trace("XAManagedConnectionFactory.setTSRValue called with value = " + name); + this.TSRValue = name; + } + + public String getTSRValue() { + ConnectorStatus.getConnectorStatus().logState("XAManagedConnectionFactory.getTSRValue"); + Debug.trace("XAManagedConnectionFactory.getTSRValue"); + return TSRValue; + } + + public void lookupTSR(String lookup) { + ConnectorStatus.getConnectorStatus().logState("XAManagedConnectionFactory.lookupTSR"); + try { + Debug.trace("lookupTSR() called with lookup name = " + lookup); + TSNamingContext ncxt = new TSNamingContext(); + String newStr = "java:".concat(lookup); + Object obj = (Object) ncxt.lookup(newStr); + if (obj != null) { + ConnectorStatus.getConnectorStatus().logState("TSR Lookup Successful"); + Debug.trace("TSR Lookup Successful"); + } else { + Debug.trace("TSR Null"); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java new file mode 100644 index 0000000000..afc8e31c87 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAMessageXAResource.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +public class XAMessageXAResource implements XAResource { + + public XAMessageXAResource() { + System.out.println("XAMessageXAResource constructor"); + } + + private void handleResourceException(Exception ex) throws XAException { + + XAException xae = new XAException(ex.toString()); + xae.errorCode = XAException.XAER_RMERR; + throw xae; + } + + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + System.out.println("XAMessageXAResource.commit"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void start(Xid xid, int flags) throws XAException { + try { + System.out.println("XAMessageXAResource.start"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void end(Xid xid, int flags) throws XAException { + try { + System.out.println("XAMessageXAResource.end"); + // ConnectorStatus.getConnectorStatus().logAPI("MessageXAResource.end" , + // "", ""); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void forget(Xid xid) throws XAException { + System.out.println("XAMessageXAResource.forget"); + } + + public int getTransactionTimeout() throws XAException { + return 1; + } + + public boolean isSameRM(XAResource other) throws XAException { + System.out.println("XAMessageXAResource.isSameRM"); + return false; + } + + public int prepare(Xid xid) throws XAException { + ConnectorStatus.getConnectorStatus().logAPI("XAMessageXAResource.prepare", "", ""); + System.out.println("XAMessageXAResource.prepare"); + try { + return XAResource.XA_OK; + } catch (Exception ex) { + handleResourceException(ex); + return XAException.XAER_RMERR; + } + } + + public Xid[] recover(int flag) throws XAException { + System.out.println("XAMessageXAResource.recover"); + return null; + } + + public void rollback(Xid xid) throws XAException { + try { + System.out.println("XAMessageXAResource.rollback"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public boolean setTransactionTimeout(int seconds) throws XAException { + return true; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java new file mode 100644 index 0000000000..3e29f13647 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceAdapterImpl.java @@ -0,0 +1,280 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.Vector; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +public class XAResourceAdapterImpl implements ResourceAdapter, Serializable { + // IMPORTANT: for compliance, if you add non-transient member data + // here, be sure to add respective entry to equals() method below. + + private transient TestWorkManager twm; + + private transient TestBootstrapContext tbs; + + private transient LocalTxMessageListener ml; + + private String RAName; // value from ra's xml file + + private Boolean useSecurityMapping = null; // value from ra's xml file + + private int counter = 0; + + private transient javax.transaction.xa.XAResource xaresource; + + private transient LocalTxMessageWork2 work3; + + private transient WorkManager wm; + + private int mefcount = 0; + + private transient MessageEndpointFactory mef1; + + private transient MessageEndpointFactory mef2; + + private transient BootstrapContext bsc; + + public XAResourceAdapterImpl() { + ConnectorStatus.getConnectorStatus().logState("XAResourceAdapterImpl Constructor "); + System.out.println("XAResourceAdapterImpl Constructor "); + } + + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + System.out.println("XAResourceAdapter Started " + counter); + String str1 = new String("XAResourceAdapter Started " + counter); + ConnectorStatus.getConnectorStatus().logState(str1); + + // get WorkManager reference + + WorkManager wm = null; + + if (bsc != null) { + ConnectorStatus.getConnectorStatus().logState("XAResourceAdapter BootstrapContext Not Null "); + wm = bsc.getWorkManager(); + } else { + ConnectorStatus.getConnectorStatus().logState("ERROR - XAResourceAdapter BootstrapContext is Null "); + } + + if (wm != null) { + ConnectorStatus.getConnectorStatus().logState("XAResourceAdapter WorkManager Not Null "); + } else { + ConnectorStatus.getConnectorStatus().logState("WARNING XAResourceAdapter WorkManager is Null "); + } + + try { + checkAssociation(); + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + wm = ctx.getWorkManager(); + // Create TestWorkManager object + twm = new TestWorkManager(ctx); + if (this.useSecurityMapping.booleanValue() == true) { + // values from our RA xml file indicate we want to establish Case 2 + // security for the RA. This means we need security mappings. + Debug.trace(" XAResourceAdapterImpl ; calling setUseSecurityMapping(true)"); + twm.setUseSecurityMapping(true); + } else { + // use Case 1 security thus do NO mapping of identities + Debug.trace(" XAResourceAdapterImpl ; calling setUseSecurityMapping(false)"); + twm.setUseSecurityMapping(false); + } + twm.runTests(); + + // Create TestBootstrap object + tbs = new TestBootstrapContext(ctx); + tbs.runTests(); + } + + public void stop() { + // Set the TestWorkManager to null upon resource adapter shutdown. + // twm = null; + if (work3 != null) { + work3.stop(); + } + + } + + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + + } + + public XAResource[] getXAResources(ActivationSpec[] as) { + return null; + } + + private Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + if ((mef1 != null) && (!mef1.equals(mef2))) { + Debug.trace("XA MessageEndpointFactory is Unique"); + Debug.trace("XA MessageEndpointFactory equals implemented correctly"); + } + } + + /* + * This method is used to assist in the verification process of assertion Connector:SPEC:245 This method must be called + * befor the work instances 'run' method is called. This method checks if the setResourceAdapter() method was called and + * if so, then this method logs a message to indicate that it was called prior to the 'run' method of the run method. + */ + public void checkAssociation() { + Vector vLog = ConnectorStatus.getConnectorStatus().getStateLogVector(); + String toCheck1 = "XAManagedConnectionFactory setResourceAdapter 1"; + + for (int i = 0; i < vLog.size(); i++) { + String str = (String) vLog.elementAt(i); + if (str.startsWith(toCheck1)) { + ConnectorStatus.getConnectorStatus().logState("XAResourceAdapter - association exists between RA and work"); + break; + } + } + + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof XAResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + XAResourceAdapterImpl that = (XAResourceAdapterImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (this.mefcount != that.getMefcount()) { + return false; + } + + if (!Util.isEqual(this.RAName, that.getRAName())) + return false; + + if (this.getUseSecurityMapping().booleanValue() != that.getUseSecurityMapping().booleanValue()) { + return false; + } + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRAName(String name) { + ConnectorStatus.getConnectorStatus().logState("XAResourceAdapter.setRAName"); + this.RAName = name; + } + + public String getRAName() { + Debug.trace("XAResourceAdapter.getRAName"); + return RAName; + } + + public void setUseSecurityMapping(Boolean val) { + this.useSecurityMapping = val; + } + + public Boolean getUseSecurityMapping() { + return this.useSecurityMapping; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + + public void setMefcount(int val) { + this.mefcount = val; + } + + public int getMefcount() { + return this.mefcount; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java new file mode 100644 index 0000000000..7fc7f2b175 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XAResourceImpl.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import java.util.Hashtable; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; + +public class XAResourceImpl implements XAResource { + + private TSManagedConnection mc; + + private int seconds = 0; + + private Hashtable xidset = null; + + public XAResourceImpl(TSManagedConnection mc) { + this.mc = mc; + xidset = new Hashtable(); + if (mc == null) { + System.out.println("TSManagedConnection is null in XAResourceImpl"); + } + + } + + private void handleResourceException(Exception ex) throws XAException { + + XAException xae = new XAException(ex.toString()); + xae.errorCode = XAException.XAER_RMERR; + throw xae; + } + + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + System.out.println("XAResourceImpl.commit"); + // To detect two phase commit and see if the + // prepare method was called or not. + ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.commit", "", ""); + TSeis.getTSeis().getResourceManager().commit(xid, onePhase); + } catch (XAException xe) { + throw xe; + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void start(Xid xid, int flags) throws XAException { + try { + System.out.println("XAResourceImpl.start"); + TSeis.getTSeis().getResourceManager().start(xid, flags, mc.getTSConnection()); + ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.start", "", ""); + } catch (XAException xe) { + throw xe; + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void end(Xid xid, int flags) throws XAException { + try { + System.out.println("XAResourceImpl.end"); + TSeis.getTSeis().getResourceManager().end(xid, flags); + ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.end", "", ""); + } catch (XAException xe) { + throw xe; + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void forget(Xid xid) throws XAException { + System.out.println("XAResourceImpl.forget"); + } + + public int getTransactionTimeout() throws XAException { + return this.seconds; + } + + public boolean isSameRM(XAResource other) throws XAException { + System.out.println("XAResourceImpl.isSameRM"); + if (this == other) + return true; + if (other == null) + return false; + if ((other instanceof XAResourceImpl) && (this.mc != null)) { + XAResourceImpl obj = (XAResourceImpl) other; + return (this.mc.equals(obj.mc)); + } else { + return false; + } + } + + public int prepare(Xid xid) throws XAException { + ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.prepare", "", ""); + System.out.println("XAResourceImpl.prepare"); + try { + return TSeis.getTSeis().getResourceManager().prepare(xid); + } catch (XAException xe) { + throw xe; + } catch (Exception ex) { + handleResourceException(ex); + return XAException.XAER_RMERR; + } + } + + public Xid[] recover(int flag) throws XAException { + System.out.println("XAResourceImpl.recover"); + return null; + } + + public void rollback(Xid xid) throws XAException { + try { + System.out.println("XAResourceImpl.rollback"); + TSeis.getTSeis().getResourceManager().rollback(xid); + ConnectorStatus.getConnectorStatus().logAPI("XAResourceImpl.rollback", "", ""); + } catch (XAException xe) { + throw xe; + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public boolean setTransactionTimeout(int seconds) throws XAException { + this.seconds = seconds; + return true; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java new file mode 100644 index 0000000000..690e329ae1 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/XidImpl.java @@ -0,0 +1,117 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox; + +import javax.transaction.xa.Xid; + +public class XidImpl implements Xid { + + private static int ID = 0; + + public int formatID; // Format identifier + // (-1) means that the XidImpl is null + + public int branchQualifier; + + public int globalTxID; + + static public final int MAXGTRIDSIZE = 64; + + static public final int MAXBQUALSIZE = 64; + + public XidImpl() { + int foo = ++ID; + formatID = foo; + branchQualifier = foo; + globalTxID = foo; + } + + public boolean equals(Object o) { + XidImpl other; // The "other" XidImpl + int L; // Combined gtrid_length + bqual_length + int i; + + if (!(o instanceof XidImpl)) // If the other XidImpl isn't an XidImpl + { + return false; // It can't be equal + } + + other = (XidImpl) o; // The other XidImpl, now properly cast + + if (this.formatID == other.formatID && this.branchQualifier == other.branchQualifier && this.globalTxID == other.globalTxID) { + return true; + } + + return false; + } + + /** + * Compute the hash code. + * + * @return the computed hashcode + */ + public int hashCode() { + if (formatID == (-1)) { + return (-1); + } + + return formatID + branchQualifier + globalTxID; + + } + + /* + * Convert to String + * + *

This is normally used to display the XidImpl when debugging. + */ + + /** + * Return a string representing this XidImpl. + * + * @return the string representation of this XidImpl + */ + public String toString() { + + String s = new String("{XidImpl: " + "formatID(" + formatID + "), " + "branchQualifier (" + branchQualifier + "), " + "globalTxID(" + + globalTxID + ")}"); + + return s; + } + + /* + * Return branch qualifier + */ + + /** + * Returns the branch qualifier for this XidImpl. + * + * @return the branch qualifier + */ + public byte[] getBranchQualifier() { + String foo = (new Integer(branchQualifier)).toString(); + return foo.getBytes(); + } + + public int getFormatId() { + return formatID; + } + + public byte[] getGlobalTransactionId() { + String foo = (new Integer(globalTxID)).toString(); + return foo.getBytes(); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java new file mode 100644 index 0000000000..d486c60ccd --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoManagedConnectionFactory.java @@ -0,0 +1,490 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.annotated; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionDefinition; +import jakarta.resource.spi.ConnectionDefinitions; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +@ConnectionDefinitions({ + @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) +public class AnnoManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String tsrValue; + + private String password; + + private String user; + + private String userName; + + private String setterMethodVal = "DEFAULT"; + + @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) + private Integer integer; + + @ConfigProperty() + private String factoryName = "AnnoManagedConnectionFactory"; + + /* + * @name AnnoManagedConnectionFactory + * + * @desc Default conctructor + */ + public AnnoManagedConnectionFactory() { + // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 + String str = "AnnoManagedConnectionFactory factoryName=" + factoryName; + ConnectorStatus.getConnectorStatus().logState(str); + + // lets make sure we can call and set setSetterMethodVal() + setSetterMethodVal("NONDEFAULT"); + + debug(str); + } + + /* + * used to help test assertion Connector:SPEC:278 + */ + @ConfigProperty() + public void setSetterMethodVal(String val) { + setterMethodVal = val; + String str = "AnnotatedResourceAdapterImpl.setSetterMethodVal=" + setterMethodVal; + ConnectorStatus.getConnectorStatus().logState(str); + } + + public String getSetterMethodVal() { + return setterMethodVal; + } + + public void setFactoryName(String name) { + this.factoryName = name; + } + + public String getFactoryName() { + return factoryName; + } + + public Integer getInteger() { + return this.integer; + } + + public void setInteger(Integer val) { + this.integer = val; + } + + public String getUser() { + debug("AnnoManagedConnectionFactory.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + debug("AnnoManagedConnectionFactory.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + debug("AnnoManagedConnectionFactory.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + debug("AnnoManagedConnectionFactory.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + debug("AnnoManagedConnectionFactory.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + debug("AnnoManagedConnectionFactory.setPassword() with val = " + val); + password = val; + } + + public String getTsrValue() { + debug("AnnoManagedConnectionFactory getTsrValue called" + tsrValue); + return tsrValue; + } + + public void setTsrValue(String name) { + debug("AnnoManagedConnectionFactory setTsrValue called" + name); + this.tsrValue = name; + } + + public void lookupTSR(String lookup) { + try { + TSNamingContext ncxt = new TSNamingContext(); + String newStr = "java:".concat(lookup); + Object obj = (Object) ncxt.lookup(newStr); + if (obj != null) { + debug("TSR NOT Null"); + } else { + debug("TSR Null"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "AnnoManagedConnectionFactory setResourceAdapter " + count; + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("AnnoManagedConnectionFactory.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("AnnoManagedConnectionFactory.createManagedConnection(): pc == null"); + debug("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("AnnoManagedConnectionFactory.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + debug("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + dumpConnectionMetaData(mcon); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + public void dumpConnectionMetaData(ManagedConnection mcon) { + + String hdr = "AnnoManagedConnectionFactory: "; + String out; + boolean bLocal = false; + boolean bXA = false; + + try { + ManagedConnectionMetaData mdata = mcon.getMetaData(); + + out = hdr + "displayName=" + mdata.getEISProductName(); + debug(out); + + out = hdr + "version=" + mdata.getEISProductVersion(); + debug(out); + + // get transaction type + try { + mcon.getLocalTransaction(); + bLocal = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a localTransaction type"); + } + try { + mcon.getXAResource(); + bXA = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a XAResource type"); + } + + out = hdr + "transactionSupport="; + if (bLocal) { + out = out + "LocalTransaction"; + } else if (bXA) { + out = out + "XATransaction"; + } else { + // assume default case of noTx + out = out + "NoTransaction"; + } + debug(out); + } catch (ResourceException ex) { + System.out.println(ex.getMessage()); + ex.printStackTrace(); + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + + System.out.println("matchManagedConnections: couldnt find match"); + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof AnnoManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + AnnoManagedConnectionFactory that = (AnnoManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { + return false; + } else if ((this.integer == null) && !(that.getInteger() == null)) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.tsrValue, that.getTsrValue())) + return false; + + if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("AnnoManagedConnectionFactory: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java new file mode 100644 index 0000000000..c6a8e25e25 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnoWorkManager.java @@ -0,0 +1,173 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.annotated; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.WorkImpl; +import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; +import com.sun.ts.tests.common.connector.whitebox.XidImpl; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.XATerminator; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class AnnoWorkManager { + private BootstrapContext bsc = null; + + private WorkManager wmgr; + + private Xid myxid; + + private Xid mynestxid; + + private XATerminator xa; + + public AnnoWorkManager(BootstrapContext val) { + debug("enterred constructor"); + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + this.xa = bsc.getXATerminator(); + + debug("leaving constructor"); + } + + public void runTests() { + debug("enterred runTests"); + doWork(); + doTCWork(); + submitNestedXidWork(); + debug("leaving runTests"); + } + + public void doWork() { + debug("enterred doWork"); + + try { + WorkImpl workimpl = new WorkImpl(wmgr); + + ExecutionContext ec = new ExecutionContext(); + WorkListenerImpl wl = new WorkListenerImpl(); + wmgr.doWork(workimpl, 5000, ec, wl); + ConnectorStatus.getConnectorStatus().logState("AnnoWorkManager Work Object Submitted"); + debug("AnnoWorkManager Work Object Submitted"); + } catch (WorkException we) { + System.out.println("AnnoWorkManager WorkException thrown is " + we.getMessage()); + } catch (Exception ex) { + System.out.println("AnnoWorkManager Exception thrown is " + ex.getMessage()); + } + + debug("leaving doWork"); + } + + private TransactionContext startTx() { + TransactionContext tc = new TransactionContext(); + try { + Xid xid = new XidImpl(); + tc.setXid(xid); + tc.setTransactionTimeout(5 * 1000); // 5 seconds + } catch (Exception ex) { + Debug.printDebugStack(ex); + } + return tc; + } + + /* + * This will be used to help verify assertion Connector:SPEC:55 from the annotation point of view. + */ + public void doTCWork() { + try { + XidImpl myid = new XidImpl(); + WorkImpl workimpl = new WorkImpl(wmgr); + TransactionContext tc = startTx(); + tc.setXid(myid); + + Debug.trace("Creating WorkListener"); + WorkListenerImpl wl = new WorkListenerImpl(); + wmgr.doWork(workimpl, 5000, tc, wl); + ConnectorStatus.getConnectorStatus().logState("TransactionContext Work Object Submitted"); + + xa.commit(tc.getXid(), true); + } catch (XAException xe) { + Debug.trace("AnnoWorkManager.doTCWork(): XAException" + xe.getMessage()); + Debug.trace("AnnoWorkManager XAException.toString() = " + xe.toString()); + Debug.printDebugStack(xe); + } catch (WorkException we) { + Debug.trace("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + public void setXid(Xid xid) { + this.myxid = xid; + } + + public Xid getXid() { + return this.myxid; + } + + public void setNestXid(Xid xid) { + this.mynestxid = xid; + } + + public Xid getNestXid() { + return this.mynestxid; + } + + /* + * This is used to help verify assertion: Connector:SPEC:210 While the spec is clear to state that nested work contexts + * are to be supported, it appears there may be some grey area wrt nested work objects with transaction contexts. It may + * be the case that nested transaction contexts may not be clearly defined in the connector 1.6 spec - so we will test + * nested work objs where only 1 of the work objs has transactioncontext. + */ + public void submitNestedXidWork() { + try { + XidImpl myid = new XidImpl(); + NestedWorkXid1 workid = new NestedWorkXid1(wmgr, myid, NestedWorkXid1.ContextType.EXECUTION_CONTEXT); + + // setting up the xid so it can be commited later. + setNestXid(myid); + + TransactionContext tc = startTx(); + tc.setXid(myid); + wmgr.doWork(workid, wmgr.INDEFINITE, tc, null); + + Debug.trace("Anno based NestedWorkXid1 Submitted"); + ConnectorStatus.getConnectorStatus().logState("anno based NestedWorkXid1 parent context submitted"); + xa.commit(tc.getXid(), true); + + } catch (XAException xe) { + Debug.trace("AnnoWorkManager.submitNestedXidWork(): XAException" + xe.getMessage()); + Debug.trace("AnnoWorkManager XAException.toString() = " + xe.toString()); + Debug.printDebugStack(xe); + } catch (WorkException we) { + Debug.printDebugStack(we); + } catch (Exception ex) { + Debug.printDebugStack(ex); + } + } + + public void debug(String out) { + Debug.trace("AnnoWorkManager: " + out); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java new file mode 100755 index 0000000000..81e106d35e --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/AnnotatedResourceAdapterImpl.java @@ -0,0 +1,237 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.annotated; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.AuthenticationMechanism; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.SecurityPermission; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/** + * This is a sample resource adapter that will use no ra.xml info. This RA is used to assist with verifying the server + * supports annotations when there is no ra.xml (Assertion 268) and the transaction support is Local. + * + */ + +@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-anno_no_md.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(description = "Security Perm description"), transactionSupport = TransactionSupport.TransactionSupportLevel.LocalTransaction, requiredWorkContexts = { + HintsContext.class, SecurityContext.class }) +public class AnnotatedResourceAdapterImpl implements ResourceAdapter, java.io.Serializable { + + private transient BootstrapContext bsc; + + private transient AnnoWorkManager awm; + + private transient WorkManager wm; + + private transient Work work; + + private String serverSideUser = ""; // corresponds to ts.jte's 'user' property + + private String serverSidePwd = ""; // corresponds to ts.jte's 'password' + // property + + private String eisUser = ""; // corresponds to ts.jte's 'user1' property + + private String eisPwd = ""; // corresponds to ts.jte's 'password' property + + @ConfigProperty(defaultValue = "AnnotatedResourceAdapterImpl") + private String raName; + + /** + * constructor + **/ + public AnnotatedResourceAdapterImpl() { + debug("enterred constructor..."); + + this.serverSideUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.serverSidePwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); + + debug("leaving constructor..."); + } + + // + // Begin ResourceAdapter interface requirements + // + + /* must implement for ResourceAdapter interface requirement */ + public void start(BootstrapContext bsc) throws ResourceAdapterInternalException { + debug("enterred start"); + + ConnectorStatus.getConnectorStatus().logState("AnnotatedResourceAdapterImpl.start called"); + + this.bsc = bsc; + this.wm = bsc.getWorkManager(); + + this.awm = new AnnoWorkManager(bsc); + awm.runTests(); + + debug("leaving start"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void stop() { + debug("entered stop"); + debug("leaving stop"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException { + + debug("enterred endpointActivation"); + debug("leaving endpointActivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointDeactivation(MessageEndpointFactory ep, ActivationSpec spec) { + debug("enterred endpointDeactivation"); + debug("leaving endpointDeactivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { + + debug("enterred getXAResources"); + debug("leaving getXAResources"); + + throw new UnsupportedOperationException(); + } + + // + // END ResourceAdapter interface requirements + // + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof AnnotatedResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + AnnotatedResourceAdapterImpl that = (AnnotatedResourceAdapterImpl) obj; + + if (!Util.isEqual(this.serverSideUser, that.getServerSideUser())) + return false; + + if (!Util.isEqual(this.serverSidePwd, that.getServerSidePwd())) + return false; + + if (!Util.isEqual(this.eisUser, that.getEisUser())) + return false; + + if (!Util.isEqual(this.eisPwd, that.getEisPwd())) + return false; + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRaName(String name) { + this.raName = name; + + // this helps verify assertion Connector:SPEC:279 + String str = "setRAName called with raname=" + raName; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + public String getRaName() { + debug("AnnotatedResourceAdapterImpl.getRAName"); + return raName; + } + + public void debug(String out) { + Debug.trace("AnnotatedResourceAdapterImpl: " + out); + } + + public void setServerSideUser(String val) { + this.serverSideUser = val; + } + + public String getServerSideUser() { + return this.serverSideUser; + } + + public void setServerSidePwd(String val) { + this.serverSidePwd = val; + } + + public String getServerSidePwd() { + return this.serverSidePwd; + } + + public void setEisUser(String val) { + this.eisUser = val; + } + + public String getEisUser() { + return this.eisUser; + } + + public void setEisPwd(String val) { + this.eisUser = val; + } + + public String getEisPwd() { + return this.eisPwd; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java new file mode 100644 index 0000000000..e11a8818b8 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/NestedWorkXid1.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.annotated; + +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.NestedWorkXid; + +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkCompletedException; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; +import jakarta.resource.spi.work.WorkRejectedException; + +public class NestedWorkXid1 implements Work { + + public enum ContextType { + EXECUTION_CONTEXT, TRANSACTION_CONTEXT, SECURITY_CONTEXT + }; + + private WorkManager wm; + + private Xid xid; + + private ContextType contxtType; + + public NestedWorkXid1(WorkManager wm, Xid xid, ContextType contxt) { + this.wm = wm; + this.xid = xid; + this.contxtType = contxt; + + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.constructor", "", ""); + Debug.trace("NestedWorkXid1.constructor"); + } + + public void release() { + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.release", "", ""); + Debug.trace("NestedWorkXid1.release"); + } + + public void run() { + String strPass = "anno based NestedWorkXid1 child context submitted"; + try { + Debug.trace("NestedWorkXid1.run"); + ConnectorStatus.getConnectorStatus().logAPI("NestedWorkXid1.run", "", ""); + Debug.trace("Got the xid"); + NestedWorkXid workid = new NestedWorkXid(); + + if (contxtType == ContextType.TRANSACTION_CONTEXT) { + Debug.trace("Using TRANSACTION_CONTEXT to set the xid in tc"); + TransactionContext tc = new TransactionContext(); + tc.setXid(this.xid); + wm.doWork(workid, wm.INDEFINITE, tc, null); + } else { + // assume ExecutionContext - no need for SecurityContext yet + Debug.trace("Using EXECUTION_CONTEXT to set the xid in ec"); + ExecutionContext ec = new ExecutionContext(); + ec.setXid(this.xid); + wm.doWork(workid, wm.INDEFINITE, ec, null); + } + + // flow could make it here or could throw WorkCompletedException + Debug.trace(strPass); + ConnectorStatus.getConnectorStatus().logState(strPass); + + } catch (WorkCompletedException we) { + // could make it here upon successful completion of work + Debug.trace(strPass); + ConnectorStatus.getConnectorStatus().logState(strPass); + } catch (WorkRejectedException we) { + // should not make it here + Debug.trace("WorkRejectedException in NestedWorkXid1"); + } catch (WorkException we) { + // should not make it here + Debug.trace("WorkException in NestedWorkXid1"); + } catch (Exception ex) { + // should not make it here + Debug.trace("Exception in NestedWorkXid1"); + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/annotated/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpec.java.BAK b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpec.java.BAK similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpec.java.BAK rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpec.java.BAK diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java new file mode 100644 index 0000000000..4ee422c270 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecChild.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; + +import jakarta.resource.spi.Activation; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.InvalidPropertyException; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; + +/* + * This extends the parent class and MUST have a different listener than the parent. + * This must inherit any configProperty annotations from parent. + * This will implement ResourceAdaperAssociation as part of test for + * Connector:SPEC:282. Since this implements ResourceAdaperAssociation, we should + * see that the setResourceAdapter() class gets called. + */ +@Activation(messageListeners = { com.sun.ts.tests.common.connector.util.TSMessageListenerInterface.class }) +public class IBAnnoActivationSpecChild extends IBAnnoActivationSpecParent implements ResourceAdapterAssociation, ActivationSpec { + + private String annoDestinationName; + + private String annoDestinationType; + + private ResourceAdapter resourceAdapter; + + /** + * Default constructor. + */ + public IBAnnoActivationSpecChild() { + Debug.trace("IBAnnoActivationSpecChild.constructor"); + } + + public String getAnnoDestinationName() { + Debug.trace("IBAnnoActivationSpecChild.getAnnoDestinationName :" + this.annoDestinationName); + return this.annoDestinationName; + } + + public void setAnnoDestinationName(String name) { + this.annoDestinationName = name; + Debug.trace("IBAnnoActivationSpecChild.setAnnoDestinationName :" + name); + } + + public String getAnnoDestinationType() { + Debug.trace("IBAnnoActivationSpecChild.getDestinationType :" + this.annoDestinationType); + return this.annoDestinationType; + } + + public void setAnnoDestinationType(String type) { + Debug.trace("IBAnnoActivationSpecChild.setAnnoDestinationType :" + type); + this.annoDestinationType = type; + } + + public ResourceAdapter getResourceAdapter() { + return this.resourceAdapter; + } + + public void setResourceAdapter(ResourceAdapter ra) { + String str = "IBAnnoActivationSpecChild.setResourceAdatper called"; + ConnectorStatus.getConnectorStatus().logState(str); + Debug.trace(str); + this.resourceAdapter = ra; + } + + public void validate() throws InvalidPropertyException { + Debug.trace("IBAnnoActivationSpecChild.validate called"); + } + + public void setPropName(String name) { + propName = name; + } + + public String getPropName() { + return propName; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java new file mode 100644 index 0000000000..38ce2a03b8 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoActivationSpecParent.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import com.sun.ts.tests.common.connector.whitebox.Debug; + +import jakarta.resource.spi.Activation; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.InvalidPropertyException; +import jakarta.resource.spi.ResourceAdapter; + +/* + * This class shouldnt really be used for anything. This will be extended + * by the child activation class and checks will be done to ensure that + * proper annotation processing, inheritance, etc are occurring. + * In this parent, we set a dummy listener of WorkListener, and in our + * subclass, we will have a different, more speciif listener. + * + * Also, we expect that the ConfigProperty annotation in this parent + * will/must be inherited by any child/sub classes. + * + */ +@Activation(messageListeners = { jakarta.resource.spi.work.WorkListener.class }) +public class IBAnnoActivationSpecParent implements ActivationSpec, java.io.Serializable { + + private String annoDestinationName; + + private String annoDestinationType; + + @ConfigProperty() + protected String propName = "IBAnnoConfigPropVal"; + + private ResourceAdapter resourceAdapter; + + /** + * Default constructor. + */ + public IBAnnoActivationSpecParent() { + Debug.trace("IBAnnoActivationSpecParent.constructor"); + } + + public String getAnnoDestinationName() { + Debug.trace("IBAnnoActivationSpecParent.getAnnoDestinationName :" + this.annoDestinationName); + return this.annoDestinationName; + } + + public void setAnnoDestinationName(String name) { + this.annoDestinationName = name; + Debug.trace("IBAnnoActivationSpecParent.setAnnoDestinationName :" + name); + } + + public String getAnnoDestinationType() { + Debug.trace("IBAnnoActivationSpecParent.getDestinationType :" + this.annoDestinationType); + return this.annoDestinationType; + } + + public void setAnnoDestinationType(String type) { + Debug.trace("IBAnnoActivationSpecParent.setAnnoDestinationType :" + type); + this.annoDestinationType = type; + } + + public ResourceAdapter getResourceAdapter() { + return this.resourceAdapter; + } + + public void setResourceAdapter(ResourceAdapter ra) { + Debug.trace("IBAnnoActivationSpecParent.setResourceAdatper called"); + this.resourceAdapter = ra; + } + + public void validate() throws InvalidPropertyException { + Debug.trace("IBAnnoActivationSpecParent.validate called"); + } + + public void setPropName(String name) { + propName = name; + } + + public String getPropName() { + return propName; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java new file mode 100644 index 0000000000..8c76cafd14 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoManagedConnectionFactory.java @@ -0,0 +1,499 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionDefinition; +import jakarta.resource.spi.ConnectionDefinitions; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +@ConnectionDefinitions({ + @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) +public class IBAnnoManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String TSRValue; + + private String password; + + private String user; + + private String userName; + + private String setterMethodVal = "DEFAULT"; + + @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) + private Integer integer; + + @ConfigProperty() + private String factoryName = "IBAnnoManagedConnectionFactory"; + + /* + * @name IBAnnoManagedConnectionFactory + * + * @desc Default conctructor + */ + public IBAnnoManagedConnectionFactory() { + + // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 + String str = "IBAnnoManagedConnectionFactory factoryName=" + factoryName; + debug(str); + + // lets make sure we can call and set setSetterMethodVal() + setSetterMethodVal("NONDEFAULT"); + + debug(str); + } + + /* + * used to help test assertion Connector:SPEC:278 + */ + @ConfigProperty() + public void setSetterMethodVal(String val) { + setterMethodVal = val; + String str = "AnnotatedResourceAdapterImpl.setSetterMethodVal=" + setterMethodVal; + ConnectorStatus.getConnectorStatus().logState(str); + } + + public String getSetterMethodVal() { + return setterMethodVal; + } + + public void setFactoryName(String name) { + debug("IBAnnoManagedConnectionFactory.setFactoryName"); + this.factoryName = name; + } + + public String getFactoryName() { + debug("IBAnnoManagedConnectionFactory.getFactoryName"); + return factoryName; + } + + public Integer getInteger() { + return this.integer; + } + + public void setInteger(Integer val) { + this.integer = val; + } + + public String getUser() { + debug("IBAnnoManagedConnectionFactory.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + debug("IBAnnoManagedConnectionFactory.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + debug("IBAnnoManagedConnectionFactory.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + debug("IBAnnoManagedConnectionFactory.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + debug("IBAnnoManagedConnectionFactory.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + debug("IBAnnoManagedConnectionFactory.setPassword() with val = " + val); + password = val; + } + + public String getTSRValue() { + debug("IBAnnoManagedConnectionFactory getTSRValue called" + TSRValue); + return TSRValue; + } + + public void setTSRValue(String name) { + debug("IBAnnoManagedConnectionFactory.setTSRValue called with: " + name); + this.TSRValue = name; + } + + public void lookupTSR(String lookup) { + debug("IBAnnoManagedConnectionFactory.lookupTSR"); + try { + TSNamingContext ncxt = new TSNamingContext(); + String newStr = "java:".concat(lookup); + Object obj = (Object) ncxt.lookup(newStr); + if (obj != null) { + debug("TSR Lookup Successful"); + } else { + debug("TSR Null"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("IBAnnoManagedConnectionFactory.createConnectionFactory", "cxManager", + "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("IBAnnoManagedConnectionFactory.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "IBAnnoManagedConnectionFactory setResourceAdapter " + count; + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("IBAnnoManagedConnectionFactory.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("IBAnnoManagedConnectionFactory.createManagedConnection", "subject|info", + "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("IBAnnoManagedConnectionFactory.createManagedConnection(): pc == null"); + debug("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("IBAnnoManagedConnectionFactory.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + debug("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + dumpConnectionMetaData(mcon); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + public void dumpConnectionMetaData(ManagedConnection mcon) { + + String hdr = "IBAnnoManagedConnectionFactory: "; + String out; + boolean bLocal = false; + boolean bXA = false; + + try { + ManagedConnectionMetaData mdata = mcon.getMetaData(); + + out = hdr + "displayName=" + mdata.getEISProductName(); + debug(out); + + out = hdr + "version=" + mdata.getEISProductVersion(); + debug(out); + + // get transaction type + try { + mcon.getLocalTransaction(); + bLocal = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a localTransaction type"); + } + try { + mcon.getXAResource(); + bXA = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a XAResource type"); + } + + out = hdr + "transactionSupport="; + if (bLocal) { + out = out + "LocalTransaction"; + } else if (bXA) { + out = out + "XATransaction"; + } else { + // assume default case of noTx + out = out + "NoTransaction"; + } + debug(out); + } catch (ResourceException ex) { + System.out.println(ex.getMessage()); + ex.printStackTrace(); + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("IBAnnoManagedConnectionFactory.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + + System.out.println("matchManagedConnections: couldnt find match"); + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + if ((obj == null) || !(obj instanceof IBAnnoManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + IBAnnoManagedConnectionFactory that = (IBAnnoManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { + return false; + } else if ((this.integer == null) && !(that.getInteger() == null)) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.TSRValue, that.getTSRValue())) + return false; + + if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("IBAnnoManagedConnectionFactory: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java new file mode 100644 index 0000000000..305cd37189 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageListener.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import javax.transaction.xa.XAException; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.XidImpl; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.XATerminator; +import jakarta.resource.spi.work.WorkEvent; +import jakarta.resource.spi.work.WorkListener; + +public class IBAnnoMessageListener implements WorkListener { + + private XidImpl xid; + + private BootstrapContext bsc; + + public IBAnnoMessageListener(XidImpl xid, BootstrapContext bsc) { + this.xid = xid; + this.bsc = bsc; + } + + public void workAccepted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("IBAnnoMessageListener.workAccepted"); + if (xid != null) { + System.out.println("IBAnnoMessageListener.workAccepted() for XID = " + xid.getFormatId()); + } else { + // should not get here but just in case... + System.out.println("IBAnnoMessageListener.workAccepted() for XID = null"); + } + } + + public void workRejected(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("IBAnnoMessageListener.workRejected"); + if (xid != null) { + System.out.println("IBAnnoMessageListener.workRejected() for XID = " + xid.getFormatId()); + } else { + // should not get here but just in case... + System.out.println("IBAnnoMessageListener.workRejected() for XID = null"); + } + } + + public void workStarted(WorkEvent e) { + ConnectorStatus.getConnectorStatus().logState("IBAnnoMessageListener.workStarted"); + System.out.println("IBAnnoMessageListener.workStarted"); + } + + public void workCompleted(WorkEvent e) { + try { + XATerminator xt = bsc.getXATerminator(); + System.out.println("IBAnnoMessageListener.workCompleted and about to call XATerminator.commit()"); + System.out.println("XID getting used in XATerminator [ " + xid.getFormatId() + " ]"); + xt.commit(this.xid, true); + ConnectorStatus.getConnectorStatus().logState("IBAnnoMessageListener committed Xid"); + } catch (XAException ex) { + Debug.trace("IBAnnoMessageListener.workCompleted() got XAException"); + Debug.trace("XAException.toString() = " + ex.toString()); + ex.printStackTrace(); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java new file mode 100644 index 0000000000..d417e16ec5 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork.java @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.XAMessageXAResource; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkContext; +import jakarta.resource.spi.work.WorkContextProvider; + +public class IBAnnoMessageWork implements Work, WorkContextProvider { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private XAMessageXAResource msgxa = new XAMessageXAResource(); + + private MessageEndpoint ep2; + + private List contextsList = new ArrayList(); + + public IBAnnoMessageWork(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + + Debug.trace("IBAnnoMessageWork constructor"); + } + + public void run() { + + while (!stop) { + try { + + // Createing ep and ep1 for comparison + MessageEndpoint ep1 = factory.createEndpoint(null); + ep2 = factory.createEndpoint(null); + + // creating xaep to check if the message delivery is transacted. + MessageEndpoint xaep = factory.createEndpoint(msgxa); + + if (!ep2.equals(ep1)) { + Debug.trace("IBAnnoMessageWork XA Unique MessageEndpoint returned"); + } + + chkMessageEndpointImpl(ep1); + + Method onMessage = getOnMessageMethod(); + ep1.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep1).onMessage("IBAnnoMessageWork XA Message To MDB"); + ep1.afterDelivery(); + + Method onMessagexa = getOnMessageMethod(); + xaep.beforeDelivery(onMessagexa); + ((TSMessageListenerInterface) xaep).onMessage("IBAnnoMessageWork XA Non Transacted Message To MDB1"); + xaep.afterDelivery(); + + boolean de = factory.isDeliveryTransacted(onMessagexa); + + callSysExp(); + callAppExp(); + + if (!de) { + Debug.trace("IBAnnoMessageWork XA MDB1 delivery is not transacted"); + } else { + Debug.trace("IBAnnoMessageWork XA MDB1 delivery is transacted"); + } + + break; + + } catch (AppException ex) { + ex.printStackTrace(); + + } catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + + } catch (NoSuchMethodException ns) { + ns.printStackTrace(); + + } catch (ResourceException re) { + re.printStackTrace(); + } + } + + } + + public void callSysExp() { + + try { + Debug.trace(" in IBAnnoMessageWork.callSysExp()"); + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw SysException from IBAnnoMessageWork"); + + } catch (NoSuchMethodException e) { + System.out.println("IBAnnoMessageWork: NoSuchMethodException"); + e.getMessage(); + e.printStackTrace(); + } catch (UnavailableException e) { + System.out.println("IBAnnoMessageWork: UnavailableException"); + e.printStackTrace(); + } catch (ResourceException re) { + System.out.println("IBAnnoMessageWork: ResourceException"); + re.printStackTrace(); + } catch (AppException ae) { + System.out.println("IBAnnoMessageWork: AppException"); + ae.printStackTrace(); + } catch (Exception e) { + // if we are in here, we will assume that our exception was of type ejb + // but we + // should not code only to ejb as the messaging could be POJO's and not + // ejb.... + System.out.println("EJBException thrown by NotSupported MDB"); + ConnectorStatus.getConnectorStatus().logState("EJBException thrown by NotSupported"); + e.printStackTrace(); + } finally { + try { + // this ensures that before and + // after delivery calls are properly matched. + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + } + + public void callAppExp() { + + try { + Debug.trace(" in IBAnnoMessageWork.callAppExp()"); + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw AppException from IBAnnoMessageWork"); + + } catch (AppException ejbe) { + System.out.println("AppException thrown by NotSupported MDB"); + ConnectorStatus.getConnectorStatus().logState("AppException thrown by NotSupported"); + + } catch (NoSuchMethodException ns) { + ns.printStackTrace(); + + } catch (ResourceException re) { + re.printStackTrace(); + + } finally { + try { + // this ensures that before and + // after delivery calls are properly matched. + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + private void chkMessageEndpointImpl(MessageEndpoint ep) { + if ((ep instanceof MessageEndpoint) && (ep instanceof TSMessageListenerInterface)) { + Debug.trace("IBANNO XA MessageEndpoint interface implemented"); + Debug.trace("IBANNO XA TSMessageListener interface implemented"); + } else { + Debug.trace("IBANNO XA MessageEndpoint and TSMessageListenerInterface not implemented"); + } + + } + + public List getWorkContexts() { + return contextsList; + } + + public void addWorkContext(WorkContext ic) { + contextsList.add(ic); + } + + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java new file mode 100644 index 0000000000..f9b688bf3b --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork1.java @@ -0,0 +1,187 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import java.lang.reflect.Method; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; +import com.sun.ts.tests.common.connector.whitebox.Debug; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; + +public class IBAnnoMessageWork1 implements Work { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private IBAnnoMessageXAResource1 msgxa = new IBAnnoMessageXAResource1(); + + private MessageEndpoint xaep; + + private MessageEndpoint ep2; + + public IBAnnoMessageWork1(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + System.out.println("IBAnnoMessageWork1.constructor"); + } + + public void run() { + + while (!stop) { + try { + System.out.println("Inside the IBAnnoMessageWork1 run "); + // creating xaep to check if the message delivery is transacted. + xaep = factory.createEndpoint(msgxa); + + ep2 = factory.createEndpoint(null); + + Method onMessagexa = getOnMessageMethod(); + xaep.beforeDelivery(onMessagexa); + ((TSMessageListenerInterface) xaep).onMessage("IBAnno MDB2 Transacted Message To MDB"); + xaep.afterDelivery(); + Debug.trace("IBAnno MDB2 Transacted Message To MDB"); + + callSysExp(); + callAppExp(); + + boolean de = factory.isDeliveryTransacted(onMessagexa); + + if (de) { + Debug.trace("IBAnno MDB2 delivery is transacted"); + } + break; + } catch (AppException ex) { + ex.printStackTrace(); + } + + catch (NoSuchMethodException e) { + e.printStackTrace(); + } + + catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + } catch (ResourceException re) { + re.printStackTrace(); + } + + } + + } + + public void callSysExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw IBAnnoSysException from Required"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (NoSuchMethodException e) { + System.out.println("IBAnnoMessageWork1: NoSuchMethodException"); + e.getMessage(); + e.printStackTrace(); + } catch (UnavailableException e) { + System.out.println("IBAnnoMessageWork1: UnavailableException"); + e.printStackTrace(); + } catch (ResourceException re) { + System.out.println("IBAnnoMessageWork1: ResourceException"); + re.printStackTrace(); + } catch (AppException ae) { + System.out.println("IBAnnoMessageWork1: AppException"); + ae.printStackTrace(); + } catch (Exception e) { + // if we are in here, we will assume that our exception was of type ejb + // but it + // could also be from a non-ejb POJO - thus we use this Exception type. + Debug.trace("IBAnnoEJBException thrown but Required"); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + + } + + public void callAppExp() { + + try { + Method onMessage = getOnMessageMethod(); + ep2.beforeDelivery(onMessage); + ((TSMessageListenerInterface) ep2).onMessage("Throw IBAnnoAppException from Required"); + // this has been moved to finally clause to ensure that before and + // after delivery calls are properly matched. + // ep2.afterDelivery(); + } catch (AppException ejbe) { + System.out.println("AppException thrown by Required MDB"); + ConnectorStatus.getConnectorStatus().logState("AppException thrown by Required"); + } catch (NoSuchMethodException ns) { + ns.printStackTrace(); + } catch (ResourceException re) { + re.printStackTrace(); + } finally { + try { + ep2.afterDelivery(); + } catch (ResourceException re2) { + re2.printStackTrace(); + } + } + + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java new file mode 100644 index 0000000000..f5b04d1db0 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageWork2.java @@ -0,0 +1,105 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import java.lang.reflect.Method; + +import com.sun.ts.tests.common.connector.util.AppException; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.LocalTxMessageXAResource; + +import jakarta.resource.spi.UnavailableException; +import jakarta.resource.spi.endpoint.MessageEndpoint; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; + +public class IBAnnoMessageWork2 implements Work { + + private String name; + + private boolean stop = false; + + private MessageEndpointFactory factory; + + private LocalTxMessageXAResource msgxa = new LocalTxMessageXAResource("LocalTxMessageXAResource2"); + + public IBAnnoMessageWork2(String name, MessageEndpointFactory factory) { + this.factory = factory; + this.name = name; + System.out.println("IBAnnoMessageWork2.constructor"); + } + + public void run() { + + while (!stop) { + try { + + // creating xaep to check if the message delivery is transacted. + MessageEndpoint xaep = factory.createEndpoint(msgxa); + MessageEndpoint xaep1 = factory.createEndpoint(msgxa); + MessageEndpoint xaep2 = factory.createEndpoint(msgxa); + + Method onMessagexa = getOnMessageMethod(); + ((TSMessageListenerInterface) xaep).onMessage("IBAnnoMessageWork2 MDB2 Transacted Message1"); + ((TSMessageListenerInterface) xaep1).onMessage("IBAnnoMessageWork2 MDB2 Transacted Message2"); + ((TSMessageListenerInterface) xaep2).onMessage("IBAnnoMessageWork2 MDB2 Transacted Message3"); + + Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message1"); + Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message2"); + Debug.trace("IBAnnoMessageWork2 MDB2 Transacted Message3"); + + break; + } catch (AppException ex) { + ex.printStackTrace(); + } catch (UnavailableException ex) { + try { + Thread.currentThread().sleep(3000); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + } + + public Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + public void release() { + } + + public void stop() { + this.stop = true; + } + + public String toString() { + return name; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java new file mode 100644 index 0000000000..645f346da6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoMessageXAResource1.java @@ -0,0 +1,104 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import javax.transaction.xa.XAException; +import javax.transaction.xa.XAResource; +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; + +public class IBAnnoMessageXAResource1 implements XAResource { + + public IBAnnoMessageXAResource1() { + Debug.trace("IBAnnoMessageXAResource1 constructor"); + } + + private void handleResourceException(Exception ex) throws XAException { + + XAException xae = new XAException(ex.toString()); + xae.errorCode = XAException.XAER_RMERR; + throw xae; + } + + public void commit(Xid xid, boolean onePhase) throws XAException { + try { + Debug.trace("IBAnnoMessageXAResource1.commit"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void start(Xid xid, int flags) throws XAException { + try { + Debug.trace("IBAnnoMessageXAResource1.start"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void end(Xid xid, int flags) throws XAException { + try { + Debug.trace("IBAnnoMessageXAResource1.end"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public void forget(Xid xid) throws XAException { + Debug.trace("IBAnnoMessageXAResource1.forget"); + } + + public int getTransactionTimeout() throws XAException { + return 1; + } + + public boolean isSameRM(XAResource other) throws XAException { + Debug.trace("IBAnnoMessageXAResource1.isSameRM"); + return false; + } + + public int prepare(Xid xid) throws XAException { + ConnectorStatus.getConnectorStatus().logAPI("IBAnnoMessageXAResource1.prepare", "", ""); + Debug.trace("IBAnnoMessageXAResource1.prepare"); + try { + return XAResource.XA_OK; + } catch (Exception ex) { + handleResourceException(ex); + return XAException.XAER_RMERR; + } + } + + public Xid[] recover(int flag) throws XAException { + Debug.trace("IBAnnoMessageXAResource1.recover"); + return null; + } + + public void rollback(Xid xid) throws XAException { + try { + Debug.trace("IBAnnoMessageXAResource1.rollback"); + } catch (Exception ex) { + handleResourceException(ex); + } + } + + public boolean setTransactionTimeout(int seconds) throws XAException { + return true; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java new file mode 100644 index 0000000000..8a05933ca9 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnoWorkManager.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.WorkImpl; +import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; +import com.sun.ts.tests.common.connector.whitebox.XidImpl; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class IBAnnoWorkManager { + private BootstrapContext bsc = null; + + private WorkManager wmgr; + + private Xid myxid; + + private Xid mynestxid; + + public IBAnnoWorkManager(BootstrapContext val) { + debug("enterred constructor"); + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + + debug("leaving constructor"); + } + + public void runTests() { + debug("enterred runTests"); + doWork(); + doTCWork(); + debug("leaving runTests"); + } + + public void doWork() { + debug("enterred doWork"); + + try { + WorkImpl workimpl = new WorkImpl(wmgr); + + ExecutionContext ec = new ExecutionContext(); + WorkListenerImpl wl = new WorkListenerImpl(); + wmgr.doWork(workimpl, 5000, ec, wl); + ConnectorStatus.getConnectorStatus().logState("IBAnnoWorkManager Work Object Submitted"); + debug("IBAnnoWorkManager Work Object Submitted"); + } catch (WorkException we) { + System.out.println("IBAnnoWorkManager WorkException thrown is " + we.getMessage()); + } catch (Exception ex) { + System.out.println("IBAnnoWorkManager Exception thrown is " + ex.getMessage()); + } + + debug("leaving doWork"); + } + + private TransactionContext startTx() { + TransactionContext tc = new TransactionContext(); + try { + Xid xid = new XidImpl(); + tc.setXid(xid); + tc.setTransactionTimeout(5 * 1000); // 5 seconds + } catch (Exception ex) { + Debug.printDebugStack(ex); + } + return tc; + } + + /* + * This will be used to help verify assertion Connector:SPEC:55 from the annotation point of view. + */ + public void doTCWork() { + try { + WorkImpl workimpl = new WorkImpl(wmgr); + TransactionContext tc = startTx(); + + Debug.trace("Creating IBAnnoMessageListener"); + XidImpl myid = new XidImpl(); + IBAnnoMessageListener wl = new IBAnnoMessageListener(myid, this.bsc); + wmgr.doWork(workimpl, 5000, tc, wl); + ConnectorStatus.getConnectorStatus().logState("TransactionContext Work Object Submitted"); + } catch (WorkException we) { + Debug.trace("TestWorkManager Exception thrown is " + we.getMessage()); + } + } + + public void setXid(Xid xid) { + this.myxid = xid; + } + + public Xid getXid() { + return this.myxid; + } + + public void setNestXid(Xid xid) { + this.mynestxid = xid; + } + + public Xid getNestXid() { + return this.mynestxid; + } + + public void debug(String out) { + Debug.trace("IBAnnoWorkManager: " + out); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java new file mode 100755 index 0000000000..1eff8611ab --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/IBAnnotatedResourceAdapterImpl.java @@ -0,0 +1,295 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.ibanno; + +import java.lang.reflect.Method; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.util.TSMessageListenerInterface; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; +import com.sun.ts.tests.common.connector.whitebox.XidImpl; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.AuthenticationMechanism; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.SecurityPermission; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/** + * This is a sample resource adapter that will use no ra.xml info. This RA is used to assist with verifying the server + * supports annotations when there is no ra.xml (Assertion 268) and the transaction support is Local. It is also testing + * inbound messaging support. + * + */ + +@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-anno_no_md.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.XATransaction, requiredWorkContexts = { + TransactionContext.class }) +public class IBAnnotatedResourceAdapterImpl implements ResourceAdapter, java.io.Serializable { + + private transient BootstrapContext bsc; + + private transient IBAnnoWorkManager awm; + + private transient WorkManager wm; + + private transient Work work; + + private transient MessageEndpointFactory mef2; + + private transient IBAnnoMessageWork1 work1; + + private transient IBAnnoMessageWork2 work2; + + private transient IBAnnoMessageListener ml; + + @ConfigProperty(defaultValue = "IBAnnotatedResourceAdapterImpl") + private String raName; + + /** + * constructor + **/ + public IBAnnotatedResourceAdapterImpl() { + debug("enterred IBAnnotatedResourceAdapterImpl() constructor..."); + } + + // + // Begin ResourceAdapter interface requirements + // + + /* must implement for ResourceAdapter interface requirement */ + public void start(BootstrapContext bsc) throws ResourceAdapterInternalException { + debug("enterred start"); + + this.bsc = bsc; + this.wm = bsc.getWorkManager(); + this.awm = new IBAnnoWorkManager(bsc); + awm.runTests(); + + debug("leaving start"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void stop() { + debug("entered stop"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + try { + debug("IBAnnotatedResourceAdapterImpl.endpointActivation()"); + + // check if endpointActivation has been called + Method onMessagexa = getOnMessageMethod(); + boolean de = mef.isDeliveryTransacted(onMessagexa); + + if (!de) { + // For MDB with Not Supported transaction attribute + // we should not get here since our mdb is msginflow_mdb2.ear which + // has transaction set to required in the dd. + debug("should NOT have found mdb with unsupported transaction attribute!"); + } else { + // For MDB with Required transaction attribute + // Endpoint requires a tranaction but no incoming transaction + String str2 = "IBAnnotatedResourceAdapterImpl Required transaction"; + ConnectorStatus.getConnectorStatus().logState(str2); + mef2 = mef; + debug("IBAnnoResourceAdapter preparing work1"); + String destinationName = ((IBAnnoActivationSpecChild) as).getAnnoDestinationName(); + debug("Destination name is " + destinationName); + + logMEFActivationInfo(mef); + + // help verify assertion Connector:SPEC:282 + ResourceAdapter ra = ((IBAnnoActivationSpecChild) as).getResourceAdapter(); + if (ra != null) { + ConnectorStatus.getConnectorStatus().logState("IBAnnoActivationSpecChild.getResourceAdapter() not null."); + } else { + debug("IBAnnoActivationSpecChild.getResourceAdapter() = null, failed assertion Connector:SPEC:282"); + } + + // lets verify the child activation spec inherits @configProp info from + // parent + String childPropname = ((IBAnnoActivationSpecChild) as).getPropName(); + String strp = "IBAnnoActivationSpecChild.propName = " + childPropname; + debug(strp); + ConnectorStatus.getConnectorStatus().logState(strp); + + // now setup work inst + work1 = new IBAnnoMessageWork1(destinationName, mef2); + debug("IBAnnoResourceAdapter work1 created"); + wm.scheduleWork(work1, wm.INDEFINITE, null, null); + debug("IBAnnoResourceAdapter work1 scheduled"); + + // Endpoint requires a tranaction and there is an incoming transaction + work2 = new IBAnnoMessageWork2(destinationName, mef2); + XidImpl myid = new XidImpl(); + ExecutionContext ec = new ExecutionContext(); + int idcount = myid.getFormatId(); + debug("XID getting used [ " + idcount + " ]"); + ec.setXid(myid); + ml = new IBAnnoMessageListener(myid, this.bsc); + wm.scheduleWork(work2, wm.INDEFINITE, ec, ml); + + } + + } catch (Throwable ex) { + ex.printStackTrace(); + } + + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointDeactivation(MessageEndpointFactory ep, ActivationSpec spec) { + debug("enterred endpointDeactivation"); + + if ((mef2 != null) && (mef2.equals(ep))) { + mef2 = null; + } else { + // print some warnings - may or may not be issue + if (mef2 == null) { + debug("WARNING: endpointDeactivation() mef2 == null"); + } else { + debug("WARNING: endpointDeactivation() mef2 != ep!"); + } + } + + debug("leaving endpointDeactivation"); + } + + private void logMEFActivationInfo(MessageEndpointFactory mef) { + try { + Debug.trace("enterred logMEFActivationInfo()"); + if (mef != null) { + String str = "IBAnnotatedResourceAdapterImpl.endpointActivation() getEndpointClass() returned: "; + Class clazz = mef.getEndpointClass(); + if (clazz != null) { + // should be getting class name of + // com.sun.ts.tests.connector.mdb.JCAMessageBean + str = str + clazz.getName(); + } else { + // should not get here + str = str + "null from class.getName()"; + } + Debug.trace(str); + ConnectorStatus.getConnectorStatus().logState(str); + + String activationName = mef.getActivationName(); + str = "IBAnnotatedResourceAdapterImpl.endpointActivation() getActivationName() returned "; + if (activationName != null) { + // should get here...this could be any unique name + str = str + "nonNull name " + activationName; + } else { + // should not get here + str = str + "null from mef.getActivationName()"; + } + Debug.trace(str); + ConnectorStatus.getConnectorStatus().logState(str); + } + } catch (Exception ex) { + ex.printStackTrace(); + } + } + + private Method getOnMessageMethod() { + + Method onMessageMethod = null; + try { + Class msgListenerClass = TSMessageListenerInterface.class; + Class[] paramTypes = { java.lang.String.class }; + onMessageMethod = msgListenerClass.getMethod("onMessage", paramTypes); + + } catch (NoSuchMethodException ex) { + ex.printStackTrace(); + } + return onMessageMethod; + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof IBAnnotatedResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + IBAnnotatedResourceAdapterImpl that = (IBAnnotatedResourceAdapterImpl) obj; + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* must implement for ResourceAdapter interface requirement */ + public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { + + debug("IBAnno getXAResources called"); + + return null; + } + + // + // END ResourceAdapter interface requirements + // + + public void setRaName(String name) { + this.raName = name; + } + + public String getRaName() { + return raName; + } + + public void debug(String out) { + Debug.trace("IBAnnotatedResourceAdapterImpl: " + out); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/README.txt b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/README.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/README.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/README.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ibanno/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java new file mode 100644 index 0000000000..51c07b09da --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDAnnotatedMCF.java @@ -0,0 +1,414 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mdcomplete; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionDefinition; +import jakarta.resource.spi.ConnectionDefinitions; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +/* + * This is an annotated ManagedConenctionFactory class. This class should NOT get + * used. The ra.xml in this directory (eg ra-md-complete.xml) has metadata-complete="true" + * and specifies a different MCF than this one be used. So this is assisting with the + * testing of assertion: Connector:SPEC:266. + * + */ +@ConnectionDefinitions({ + @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) +public class MDAnnotatedMCF implements ManagedConnectionFactory, ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String TSRValue; + + private String password; + + private String user; + + private String userName; + + @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false, supportsDynamicUpdates = false, confidential = false) + private Integer integer; + + private String factoryName = "MDAnnotatedMCF"; + + /* + * @name MDAnnotatedMCF + * + * @desc Default conctructor + */ + public MDAnnotatedMCF() { + ConnectorStatus.getConnectorStatus().logState("MDAnnotatedMCF constructor"); + } + + public void setFactoryName(String name) { + debug("MDAnnotatedMCF.setFactoryName"); + this.factoryName = name; + } + + public String getFactoryName() { + debug("MDAnnotatedMCF.getFactoryName"); + return factoryName; + } + + public Integer getInteger() { + debug("MDAnnotatedMCF.getInteger"); + return this.integer; + } + + public void setInteger(Integer val) { + debug("MDAnnotatedMCF.setInteger"); + this.integer = val; + } + + public String getUser() { + debug("MDAnnotatedMCF.getUser"); + return user; + } + + public void setUser(String val) { + debug("MDAnnotatedMCF.setUser"); + user = val; + } + + public String getUserName() { + debug("MDAnnotatedMCF.getUserName"); + return userName; + } + + public void setUserName(String val) { + debug("MDAnnotatedMCF.setUserName"); + userName = val; + } + + public String getPassword() { + debug("MDAnnotatedMCF.getPassword"); + return password; + } + + public void setPassword(String val) { + debug("MDAnnotatedMCF.setPassword"); + password = val; + } + + public String getTSRValue() { + debug("MDAnnotatedMCF.getTSRValue"); + return TSRValue; + } + + public void setTSRValue(String name) { + debug("MDAnnotatedMCF.setTSRValue"); + this.TSRValue = name; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("MDAnnotatedMCF setResourceAdapter " + count); + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("MDAnnotatedMCF getResourceAdapter"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.createManagedConnection", "subject|info", "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("MDAnnotatedMCF.createManagedConnection(): pc == null"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("MDAnnotatedMCF.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + + debug("matchManagedConnections: couldnt find match"); + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.setLogWriter", "out", ""); + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDAnnotatedMCF.getLogWriter", "", ""); + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof MDAnnotatedMCF)) { + return false; + } + if (obj == this) { + return true; + } + + MDAnnotatedMCF that = (MDAnnotatedMCF) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { + return false; + } else if ((this.integer == null) && !(that.getInteger() == null)) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.TSRValue, that.getTSRValue())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("MDAnnotatedMCF: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java new file mode 100644 index 0000000000..a2244da71c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteMCF.java @@ -0,0 +1,428 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mdcomplete; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.security.PasswordCredential; + +public class MDCompleteMCF + implements ManagedConnectionFactory, ResourceAdapterAssociation, TransactionSupport, Serializable, jakarta.resource.Referenceable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String TSRValue; + + private String password; + + private String user; + + private String userName; + + @ConfigProperty(description = "String value", ignore = false) + String factoryName = "MDCompleteMCF"; + + /* + * @name MDCompleteMCF + * + * @desc Default conctructor + */ + public MDCompleteMCF() { + ConnectorStatus.getConnectorStatus().logState("MDCompleteMCF constructor"); + } + + /* + * @name getTransactionSupport + * + * @desc this is required for interface TransacationSupport + */ + public TransactionSupportLevel getTransactionSupport() { + + // this is used to assist with assertion: Connector:SPEC:206 and + // Connector:SPEC:316. + String str = "MDCompleteMCF.getTransactionSupport called"; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + return TransactionSupport.TransactionSupportLevel.NoTransaction; + } + + public void setFactoryName(String name) { + debug("MDCompleteMCF.setFactoryName"); + + // this helps verify assertion Connector:SPEC:307 and Connector:SPEC:277 + // and this behavior is described in connector 1.6 spec section 18.5 + String str = "MDCompleteMCF factoryname=" + name; + debug(str); + + this.factoryName = name; + } + + public String getFactoryName() { + debug("MDCompleteMCF.getFactoryName"); + return factoryName; + } + + public String getUser() { + debug("MDCompleteMCF.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + debug("MDCompleteMCF.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + debug("MDCompleteMCF.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + debug("MDCompleteMCF.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + debug("MDCompleteMCF.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + debug("MDCompleteMCF.setPassword() with val = " + val); + password = val; + } + + public String getTSRValue() { + debug("MDCompleteMCF.getTSRValue"); + return TSRValue; + } + + public void setTSRValue(String name) { + debug("MDCompleteMCF.setTSRValue"); + this.TSRValue = name; + } + + public void lookupTSR(String lookup) { + debug("MDCompleteMCF.lookupTSR"); + try { + TSNamingContext ncxt = new TSNamingContext(); + String newStr = "java:".concat(lookup); + Object obj = (Object) ncxt.lookup(newStr); + if (obj != null) { + debug("TSR Lookup Successful"); + } else { + debug("TSR Null"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("MDCompleteMCF setResourceAdapter " + count); + debug(newStr1); + this.resourceAdapter = ra; + + // if we made it here, we assume no exceptions thrown thus validating + // Connector:SPEC:226 + ConnectorStatus.getConnectorStatus().logState(newStr1); + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("MDCompleteMCF.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.createManagedConnection", "subject|info", "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("MDCompleteMCF.createManagedConnection(): pc == null"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("MDCompleteMCF.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && mcf.equals(this)) { + return mc; + } + } + } + + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.setLogWriter", "out", ""); + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MDCompleteMCF.getLogWriter", "", ""); + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof MDCompleteMCF)) { + return false; + } + if (obj == this) { + return true; + } + + MDCompleteMCF that = (MDCompleteMCF) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.TSRValue, that.getTSRValue())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("MDCompleteMCF: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java new file mode 100755 index 0000000000..bdba8b5d0c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteRAImpl.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mdcomplete; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.AuthenticationMechanism; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.SecurityPermission; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/** + * This is a sample resource adapter that will use some ra.xml info. This RA is used to assist with verifying the server + * supports annotations when there is no ra.xml (Assertion 268) and the transaction support is Local. + * + */ + +@Connector(description = "CTS Test Resource Adapter with No DD", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { + HintsContext.class, TransactionContext.class, SecurityContext.class }) +public class MDCompleteRAImpl implements ResourceAdapter, java.io.Serializable { + + private transient BootstrapContext bsc; + + private transient MDCompleteWorkManager mdwm; + + private transient WorkManager wm; + + private transient Work work; + + // this should cause the setter to get invoked + @ConfigProperty(defaultValue = "BAD_RAName_value", description = "String value", ignore = false) + String RAName; + + /** + * constructor + **/ + public MDCompleteRAImpl() { + debug("enterred constructor..."); + + debug("leaving constructor..."); + } + + // + // Begin ResourceAdapter interface requirements + // + + /* must implement for ResourceAdapter interface requirement */ + public void start(BootstrapContext bsc) throws ResourceAdapterInternalException { + debug("enterred start"); + + debug("MDCompleteRAImpl.start called"); + + this.bsc = bsc; + this.wm = bsc.getWorkManager(); + + this.mdwm = new MDCompleteWorkManager(bsc); + mdwm.runTests(); + + debug("leaving start"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void stop() { + debug("entered stop"); + debug("leaving stop"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException { + + debug("enterred endpointActivation"); + debug("leaving endpointActivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointDeactivation(MessageEndpointFactory ep, ActivationSpec spec) { + debug("enterred endpointDeactivation"); + debug("leaving endpointDeactivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { + + debug("enterred getXAResources"); + debug("leaving getXAResources"); + + throw new UnsupportedOperationException(); + } + + // + // END ResourceAdapter interface requirements + // + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof MDCompleteRAImpl)) { + return false; + } + if (obj == this) { + return true; + } + + MDCompleteRAImpl that = (MDCompleteRAImpl) obj; + + if (!Util.isEqual(this.RAName, that.getRAName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * this is the setter for the ConfigProperty annotation = RAName. According to onnector 1.6 spec, section 18.5, this + * setter must be invoked since it belongs to a ConfigProperty annotation for the ResourceAdapter JavaBean. + */ + public void setRAName(String name) { + this.RAName = name; + + // this helps verify assertion Connector:SPEC:279 + String str = "setRAName called with raname=" + RAName; + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + } + + public String getRAName() { + debug("MDCompleteRAImpl.getRAName"); + return RAName; + } + + public void debug(String out) { + Debug.trace("MDCompleteRAImpl: " + out); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java new file mode 100644 index 0000000000..d471f92f10 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/MDCompleteWorkManager.java @@ -0,0 +1,321 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mdcomplete; + +import javax.transaction.xa.Xid; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.ContextWork; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.NestWork; +import com.sun.ts.tests.common.connector.whitebox.TSSecurityContext; +import com.sun.ts.tests.common.connector.whitebox.TSSecurityContextWithListener; +import com.sun.ts.tests.common.connector.whitebox.WorkImpl; +import com.sun.ts.tests.common.connector.whitebox.XidImpl; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.TransactionContext; +import jakarta.resource.spi.work.WorkCompletedException; +import jakarta.resource.spi.work.WorkContextErrorCodes; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class MDCompleteWorkManager { + private BootstrapContext bsc = null; + + private WorkManager wmgr; + + private String sicUser = ""; + + private String sicPwd = ""; + + private String eisUser = ""; + + private String eisPwd = ""; + + public MDCompleteWorkManager(BootstrapContext val) { + debug("enterred constructor"); + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + + this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); + debug("leaving constructor"); + } + + public void runTests() { + debug("enterred runTests"); + doWork(); + testNestedContext(); + testNestedContext2(); + testNestedContext3(); + submitTICWork(); + debug("leaving runTests"); + } + + public void doWork() { + debug("MDCompleteWorkManager enterred doWork"); + + try { + WorkImpl workimpl = new WorkImpl(wmgr); + ExecutionContext ec = startTx(); + ContextWork w1 = new ContextWork(wmgr); + + // helps test: Connector:SPEC:72, Connector:SPEC:73, Connector:SPEC:214 + // this better generate an end result of a WorkCompletedException with + // an error code == WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE + debug("MDCompleteWorkManager.doWork() submitting UnknownWorkContext generate error code."); + + UnknownWorkContext uwc = new UnknownWorkContext(); + uwc.setXid(ec.getXid()); + w1.addWorkContext(uwc); + + // submitting work inst w/ an unknown work context shoudl throw + // proper error code... + wmgr.doWork(w1); + + } catch (WorkCompletedException e) { + // this must throw exception == + // WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE + debug("MDCompleteWorkManager WorkCompletedException thrown is " + e.getMessage()); + + // this helps verify assertion Connector:SPEC:214 + // get error code and make sure we get one that makes sense + String strErrorCode = e.getErrorCode(); + if (WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE.equals(strErrorCode)) { + // excellant - this is what we expect + ConnectorStatus.getConnectorStatus().logState("MDCompleteWorkManager threw WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE"); + debug("MDCompleteWorkManager threw WorkContextErrorCodes.UNSUPPORTED_CONTEXT_TYPE"); + } else { + // doh! we got incorrect error code + debug("MDCompleteWorkManager threw WorkContextErrorCodes = " + strErrorCode); + } + } catch (WorkException we) { + debug("MDCompleteWorkManager WorkException thrown is " + we.getMessage()); + Debug.printDebugStack(we); + } catch (Exception ex) { + debug("MDCompleteWorkManager Exception thrown is " + ex.getMessage()); + Debug.printDebugStack(ex); + } + + debug("MDCompleteWorkManager leaving doWork"); + } + + /* + * this method is used to facilitate testing assertion Connector:SPEC:305 the idea here is to test as follows: - create + * parent work obj - add valid SIC to parent work obj - create 2nd work obj to be child and get nested within parent + * work obj - assign NO SIC to child work obj - add child work obj into parent - execute parent work obj - parent has + * valid SIC so should be okay but child has NO SIC and should NOT inherit the parents SIC so the child workobj XXXX: + * how to verify the workInst with no SIC did not inherit! + */ + public void testNestedContext2() { + + try { + debug("enterred testNestedWork2()"); + + // to properly test assert Connector:SPEC:305 we need to have nested + // work objects where each work has a context set. + ContextWork parent = new ContextWork(wmgr); + NestWork nw = new NestWork(); + + // create valid sic / creds for parent work obj + SecurityContext psic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, false); + + // lets add SIC to our parent work obj only + parent.addWorkContext(psic); // add SIC w/ valid creds + + // add our child workobj(ie nw) into our parent work obj + parent.addNestedWork(nw); + + wmgr.doWork(parent); + + } catch (WorkException e) { + debug("testNestedWork2() - got WorkException()"); + } catch (Exception e) { + // flow should not go here + debug("got exception in testNestedContext2() with user = " + sicUser + " pwd = " + sicPwd + " principal=" + eisUser); + debug(e.toString()); + Debug.printDebugStack(e); + } + debug("leaving testNestedContext2()"); + } + + /* + * This method is used to facilitate testing assertion Connector:SPEC:210 The following steps are needed to validate + * assertion 210. - create parent work obj - add valid SIC to parent work obj - create 2nd work obj to be child and get + * nested within parent work obj - assign another valid (authenticatable) SIC to child work obj - add child work obj + * into parent work obj - execute parent work obj (which, in turn, attempts to execute child ) - parent has valid SIC so + * should be okay - but child does not + * + * The goal here is to show that the AS supports nested contexts by supplying 2 different SIC contexts (one valid and + * one invalid). + * + */ + public void testNestedContext3() { + + try { + debug("enterred testNestedWork3()"); + + // to properly test assert Connector:SPEC:305 we need to have nested + // work objects where each work has a context set. + ContextWork parent = new ContextWork(wmgr); + NestWork nw = new NestWork(); + + // create valid sic / creds for parent work obj + TSSecurityContext psic = new TSSecurityContext(sicUser, sicPwd, eisUser, false); + + // create invalid sic / creds for child work obj + // note we pass 'false' as we expect it should fail to authenticate + // with teh bogus creds we are passing in...if it fails to authenticate, + // it should log appropriate msg stating so which menas that our + // child/nested work context did not inherit security from parent. + TSNestedSecurityContext csic = new TSNestedSecurityContext("phakeUsr", "phakePwd", "phakeEis", false, false); + nw.addWorkContext(csic); // add SIC w/ invalid creds + + // lets add SIC to our parent work obj only + parent.addWorkContext(psic); // add SIC w/ valid creds + + // add our child workobj(ie nw) into our parent work obj + parent.addNestedWork(nw); + + wmgr.doWork(parent); + + } catch (WorkException e) { + debug("testNestedWork3() - got WorkException()"); + } catch (Exception e) { + // flow should not go here + debug("got exception in testSecurityInflow() with user = " + sicUser + " pwd = " + sicPwd + " principal=" + eisUser); + debug(e.toString()); + Debug.printDebugStack(e); + } + + debug("leaving testNestedContext3()"); + } + + /* + * This method is used to facilitate testing assertion Connector:SPEC:210 The following steps are needed to validate + * assertion 210. - create parent work obj - add valid SIC to parent work obj - create 2nd work obj to be child and get + * nested within parent work obj - assign another valid (authenticatable) SIC to child work obj - add child work obj + * into parent work obj - execute parent work obj (which, in turn, attempts to execute child ) - parent has valid SIC so + * should be okay - same with child + * + * The goal here is to show that the AS supports nested contexts by supplying 2 different SIC contexts (both valid). + * + */ + public void testNestedContext() { + + String strPass = "Nested Work and Nested Security Context worked."; + + try { + debug("enterred testNestedContext()"); + + // to properly test assert Connector:SPEC:210 we need to have nested + // work objects where each work has a context set. + ContextWork parent = new ContextWork(wmgr); + NestWork nw = new NestWork(); + SecurityContext sic = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, false); + + // add SIC that should not be able to authenticate + SecurityContext sic2 = new TSSecurityContextWithListener(sicUser, sicPwd, eisUser, false); + + // lets add two different SICs to our work objs + parent.addWorkContext(sic); // valid creds + nw.addWorkContext(sic2); // valid creds + + // add our child workobj(ie nw) into our parent work obj + parent.addNestedWork(nw); + + // this may or may not throw WorkCompletedException upon + // successful execution of work. + wmgr.doWork(parent); + + // note: flow should make it here and NOT yeild any exceptions. + ConnectorStatus.getConnectorStatus().logState(strPass); + debug(strPass); + + } catch (WorkCompletedException e) { + // could get here upon success work completion + ConnectorStatus.getConnectorStatus().logState(strPass); + debug(strPass); + } catch (Exception e) { + // should not get here + debug("got exception in testSecurityInflow() with user = " + sicUser + " pwd = " + sicPwd + " principal=" + eisUser); + debug(e.toString()); + Debug.printDebugStack(e); + } + debug("leaving testNestedContext()"); + } + + public void submitTICWork() { + + try { + debug("enterred submitTICWork()"); + + ExecutionContext ec = startTx(); + ContextWork w1 = new ContextWork(wmgr); + TransactionContext tic = new TransactionContext(); + tic.setXid(ec.getXid()); + + // add same tic twice and AS should throw + // WorkContextErrorCodes.DUPLICATE_CONTEXTS + debug("adding Duplicate WorkContext (with dup TIC Listener) should throw WorkContextErrorCodes.DUPLICATE_CONTEXTS."); + w1.addWorkContext(tic); + w1.addWorkContext(tic); + wmgr.doWork(w1); + + debug("submitted Duplicate WorkContext with dup TIC Listener"); + + } catch (WorkCompletedException e) { + String strErrorCode = e.getErrorCode(); + if (WorkContextErrorCodes.DUPLICATE_CONTEXTS.equals(strErrorCode)) { + // excellant - this is what we expect + ConnectorStatus.getConnectorStatus().logState("MDCompleteWorkManager threw WorkContextErrorCodes.DUPLICATE_CONTEXTS"); + debug("MDCompleteWorkManager correctly threw WorkContextErrorCodes.DUPLICATE_CONTEXTS"); + } else { + // doh! we got incorrect error code + debug("MDCompleteWorkManager threw improper WorkContextErrorCodes = " + strErrorCode); + } + debug("MDCompleteWorkManager threw WorkContextErrorCodes = " + strErrorCode); + } catch (Exception e) { + debug("got bad exception when testing for WorkContextErrorCodes.DUPLICATE_CONTEXTS"); + Debug.printDebugStack(e); + } + debug("leaving submitTICWork()"); + } + + private ExecutionContext startTx() { + ExecutionContext ec = new ExecutionContext(); + try { + Xid xid = new XidImpl(); + ec.setXid(xid); + ec.setTransactionTimeout(5 * 1000); // 5 seconds + } catch (Exception ex) { + Debug.printDebugStack(ex); + } + return ec; + } + + public void debug(String out) { + Debug.trace("MDCompleteWorkManager: " + out); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java new file mode 100755 index 0000000000..8e06a76eb2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/TSNestedSecurityContext.java @@ -0,0 +1,375 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mdcomplete; + +import java.io.IOException; +import java.security.Principal; +import java.util.ArrayList; +import java.util.List; + +import javax.security.auth.Subject; +import javax.security.auth.callback.Callback; +import javax.security.auth.callback.CallbackHandler; +import javax.security.auth.callback.UnsupportedCallbackException; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.SimplePrincipal; + +import jakarta.resource.spi.work.SecurityContext; +import jakarta.security.auth.message.callback.CallerPrincipalCallback; +import jakarta.security.auth.message.callback.GroupPrincipalCallback; +import jakarta.security.auth.message.callback.PasswordValidationCallback; + +/* + * This is used to facilitate testing of the SecurityContext class. + * The things to note/remember about this class are: + * - there are two types of security scenarios RA's utilize for + * passing creds: Case-1 and Case-2 security. + * Case-1: use creds that are expected to exist on the Appserver + * Case-2: set up mappings in appserver (to map EIS creds to AS creds) + * then the RA can flow EIS creds to AS and let AS handle mappings. + * - a RA can NOT do case-1 and case-2 at the same time. a RA must be + * configured to do only ONE case at a time. (the configuration is usually + * done by AS ina proprietary way. For RI(GFv3), Case-1 is default, and + * Case-2 is done by specifying mapping in domain.xml. + * - CPC *must* be called after GPC and PVC + * - PVC *should* have same creds as CPC + * - due to spec optimization, GPC can be called without CPC but this + * is somewhat controversial and not recommended. + * + */ +public class TSNestedSecurityContext extends SecurityContext { + + private String userName; // server side username + + private String password; // server side pwd + + private String eisPrincipalName; // eis principal name + + private boolean translationRequired; + + private Subject subject; + + private String description; + + private String sicName; + + protected boolean expectPVCSuccess = true; + + // unlike TSSecurityContext, we want these all enabled by default + private boolean useCPC = true; + + private boolean useGPC = true; + + private boolean usePVC = true; + + public TSNestedSecurityContext(String userName, String password, String eisPrincipalName, boolean translationRequired) { + this(userName, password, eisPrincipalName, translationRequired, true); + } + + public TSNestedSecurityContext(String userName, String password, String eisPrincipalName, boolean translationRequired, + boolean expectSuccess) { + this.userName = userName; + this.password = password; + this.eisPrincipalName = eisPrincipalName; + this.translationRequired = translationRequired; + + this.sicName = super.getName(); + this.description = super.getDescription(); + this.expectPVCSuccess = expectSuccess; + } + + public void setCallbacks(boolean bCPC, boolean bGPC, boolean bPVC) { + this.useCPC = bCPC; + this.useGPC = bGPC; + this.usePVC = bPVC; + } + + public void setUserName(String val) { + this.userName = val; + } + + public String getUserName() { + return this.userName; + } + + public void setDescription(String val) { + this.description = val; + } + + public String getDescription() { + return this.description; + } + + public void setName(String val) { + this.sicName = val; + } + + public String getName() { + return this.sicName; + } + + public void setUseCPC(boolean val) { + this.useCPC = val; + } + + public boolean getUseCPC() { + return this.useCPC; + } + + public void setUseGPC(boolean val) { + this.useGPC = val; + } + + public boolean getUseGPC() { + return this.useGPC; + } + + public void setUsePVC(boolean val) { + this.usePVC = val; + } + + public boolean getUsePVC() { + return this.usePVC; + } + + public boolean isTranslationRequired() { + return translationRequired; + } + + /* + * This is used to help verify assertion Connector:SPEC:229, which states a couple requirements with the following being + * focused on within this method: "The following conditions are applicable to the application server provider while + * calling the setupSecurityContext method: the CallbackHandler implementation passed as the argument handler to + * setupSecurityContext must support the following JSR-196 Callbacks: CallerPrincipalCallback, GroupPrincipalCallback, + * and PasswordValidationCallback" + * + */ + public void doCallbackVerification(CallbackHandler callbackHandler, Subject execSubject, Subject serviceSubject, Principal principal) { + List callbacks = new ArrayList(); + + debug("in doCallbackVerification() " + " translationRequired=" + translationRequired + " expectPVCSuccess=" + expectPVCSuccess); + + GroupPrincipalCallback gpc = null; + String[] gpcGroups = { "phakegrp1", "phakegrp2" }; + if (useGPC) { + // we are passing invalid grps to the GPC but it should not + // matter if the CPC is specified after the GPC. + debug("doCallbackVerification(): initializing PVC"); + gpc = new GroupPrincipalCallback(execSubject, gpcGroups); + debug("GPC with groups={phakegrp1, phakegrp2} "); + callbacks.add(gpc); + } + + PasswordValidationCallback pvc = null; + if (usePVC && !translationRequired) { + // per JCA 1.6 spec (16.4.2) PVC can be used in Case-1 only. + // NOTE: PVC user should match that of CPC + debug("doCallbackVerification(): initializing PVC"); + char[] pwd = null; + if (password != null) { + // if password is supplied - use that first + pwd = password.toCharArray(); + } + + if (userName != null) { + // if userName is supplied - use that first + pvc = new PasswordValidationCallback(execSubject, userName, pwd); + debug("setting PVC with user [ " + userName + " ] + password [ " + password + " ]"); + } else { + // null username - likely a problem if here. + pvc = new PasswordValidationCallback(execSubject, null, pwd); + debug("setting PVC with user=null + password [ " + password + " ]"); + } + callbacks.add(pvc); + } + + CallerPrincipalCallback cpc = null; + if (usePVC || useCPC) { + execSubject.getPrincipals().add(new SimplePrincipal(userName, password)); + debug("setting CPC with userName : " + userName + " pwd = " + password); + cpc = new CallerPrincipalCallback(execSubject, userName); + + callbacks.add(cpc); + } + + Callback callbackArray[] = new Callback[callbacks.size()]; + try { + callbackHandler.handle(callbacks.toArray(callbackArray)); + + // if we made it here, then no exceptions - we can assume success since + // we got no unsupported callback exceptions. + String sval = "setupSecurityContext callbackhandler supports required callback types."; + debug(sval); + + if ((pvc != null) && (!pvc.getResult())) { + sval = "Password validation callback failure for userName = " + userName; + debug(sval); + if (this.expectPVCSuccess) { + String str = "ERROR: got unexpected PVC failed for user " + userName; + debug(str); + throw new Error(str); + } else { + // NOTE: if here - we expected to fail and it happened - this is good! + String str = "TSNestedSecurityContext expected PVC failure and got it."; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + } else { + // this file is designed so that we *should* be getting a pvc failure + // back but + // if we are in here, it implies we had something go wrong. + if (pvc == null) { + debug("ERROR : pvc = null but should have be non-null"); + debug("usePVC = " + usePVC); + } else { + debug("ERROR : pvc.getResult()=" + pvc.getResult()); + debug("usePVC = " + usePVC); + } + } + + } catch (UnsupportedCallbackException e) { + String sval = "setupSecurityContext() callbackhandler does not support a required callback type!"; + debug("doCallbackVerification(): " + sval); + debug("UnsupportedCallbackException message is : " + e.getMessage()); + e.printStackTrace(); + + } catch (IOException e) { + e.printStackTrace(); + debug("doCallbackVerification(): exception occured : " + e.getMessage()); + } + + } + + public void setupSecurityContext(CallbackHandler callbackHandler, Subject execSubject, Subject serviceSubject) { + + // validate args are spec compliant + validateCallbackHandler(callbackHandler); + validateExecSubject(execSubject); + validateServiceSubject(serviceSubject); + + Principal principal = null; + if (translationRequired && (eisPrincipalName != null)) { + // add eis principal that needs a security mapping in app server domain + principal = new SimplePrincipal(eisPrincipalName); + debug("setupSecurityContext(): translationRequired && (eisPrincipalName != null)"); + } else if (!translationRequired && (userName != null)) { + // add principal that exists in App Server Security domain + principal = new SimplePrincipal(userName); + debug("setupSecurityContext(): !translationRequired && (userName != null)"); + } + + // assist with assertion Connector:SPEC:229 + if (callbackHandler != null) { + String str = "setupSecurityContext() called with non-null callbackHandler"; + debug(str); + + // now make sure the 3 callback types are supported by the App Server + doCallbackVerification(callbackHandler, execSubject, serviceSubject, principal); + + } else { + debug("setupSecurityContext() called with invalid (null) callbackHandler"); + } + + } + + /* + * this method is used to perform a simple validation that the callbackHandler is spec compliant per assertion + * Connector:SPEC:229 + */ + private void validateCallbackHandler(CallbackHandler callbackHandler) { + + // assist with assertion Connector:SPEC:229 + if (callbackHandler != null) { + String str = "setupSecurityContext() called with non-null callbackHandler"; + debug(str); + } else { + String str = "setupSecurityContext() called with invalid (null) callbackHandler"; + debug(str); + } + } + + /* + * this method is used to perform a simple validation that the execSubject is spec compliant per assertion + * Connector:SPEC:230 + */ + private void validateExecSubject(Subject execSubject) { + + if ((execSubject != null) && (!execSubject.isReadOnly())) { + String str = "setupSecurityContext() called with valid executionSubject"; + debug(str); + } else { + String str = "ERROR: setupSecurityContext() called with invalid executionSubject"; + debug(str); + } + + } + + /* + * this method is used to perform a simple validation that the serviceSubject is spec compliant per assertion + * Connector:SPEC:231 + */ + private void validateServiceSubject(Subject serviceSubject) { + + if ((serviceSubject != null) && (!serviceSubject.isReadOnly())) { + // this is good: if serviceSubject != null, then it must not be readonly + String str = "setupSecurityContext() called with valid serviceSubject"; + debug(str); + } else if ((serviceSubject != null) && (serviceSubject.isReadOnly())) { + // ohoh, serviceSubject !=null but it is readonly and this is not valid! + String str = "setupSecurityContext() called with invalid executionSubject"; + debug(str); + } else if (serviceSubject == null) { + // invalid serviceSubject called - according to API doc -it cant be null + String str = "ERROR - setupSecurityContext() called with null serviceSubject."; + } else { + // this is also a valid serviceSubject for our setupSecurityContext() + String str = "setupSecurityContext() called with valid serviceSubject"; + debug(str); + } + + } + + public Subject getSubject() { + if (translationRequired) { + if (subject == null) { + // setting translation required for principal + subject = new Subject(); + subject.getPrincipals().add(new SimplePrincipal(eisPrincipalName)); + } + return subject; + } else { + return null; + } + } + + public String toString() { + StringBuffer toString = new StringBuffer("{"); + toString.append("userName : " + userName); + toString.append(", password : " + password); + toString.append(", eisPrincipalName : " + eisPrincipalName); + toString.append(", translationRequired : " + translationRequired); + toString.append("}"); + return toString.toString(); + } + + public void debug(String message) { + Debug.trace(" in TSNestedSecurityContext: " + message); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java similarity index 65% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java index bca937e880..84b64778ec 100644 --- a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/UnknownWorkContext.java @@ -20,22 +20,20 @@ import jakarta.resource.spi.work.WorkContext; /** - * This class is to be used to test assertion Connector:SPEC:214. The server - * should not have knowledge of this work context class and so attempts to - * submit this context class to the appserver via a WorkInst should cause the - * server to throw a proper error code. + * This class is to be used to test assertion Connector:SPEC:214. The server should not have knowledge of this work + * context class and so attempts to submit this context class to the appserver via a WorkInst should cause the server to + * throw a proper error code. */ -public class UnknownWorkContext extends ExecutionContext - implements WorkContext { +public class UnknownWorkContext extends ExecutionContext implements WorkContext { - private static final String id = "UnknownWorkContext"; + private static final String id = "UnknownWorkContext"; - public String getDescription() { - return "UnknownWorkContext"; - } + public String getDescription() { + return "UnknownWorkContext"; + } - public String getName() { - return "UnknownWorkContext"; - } + public String getName() { + return "UnknownWorkContext"; + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/ra-md-complete.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/ra-md-complete.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/ra-md-complete.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mdcomplete/ra-md-complete.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java new file mode 100644 index 0000000000..af8f30c65e --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDManagedConnectionFactory.java @@ -0,0 +1,395 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mixedmode; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionDefinition; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +@ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) + +public class PMDManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String password; + + private String user; + + private String userName; + + @ConfigProperty(defaultValue = "PMDManagedConnectionFactory", description = "String value", ignore = false, supportsDynamicUpdates = false, confidential = false) + String factoryName; + + @ConfigProperty(description = "String value", ignore = false) + String noDefaultValue = "NO_DEFAULT_VAL"; + + /* + * @name PMDManagedConnectionFactory + * + * @desc Default conctructor + */ + public PMDManagedConnectionFactory() { + } + + public void setFactoryName(String name) { + // this helps verify assertion Connector:SPEC:307 and Connector:SPEC:267 + // and this behavior is described in connector 1.6 spec section 18.5 + String str = "PMDManagedConnectionFactory factoryname=" + name; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + + this.factoryName = name; + + // this helps verify assertion Connector:SPEC:277 + // and this behavior is described in connector 1.6 spec section 18.5 + str = "PMDManagedConnectionFactory noDefaultValue=" + this.noDefaultValue; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + public String getFactoryName() { + return factoryName; + } + + public void setNoDefaultValue(String val) { + this.noDefaultValue = val; + } + + public String getNoDefaultValue() { + return noDefaultValue; + } + + public String getUser() { + debug("PMDManagedConnectionFactory.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + debug("PMDManagedConnectionFactory.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + debug("PMDManagedConnectionFactory.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + debug("PMDManagedConnectionFactory.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + debug("PMDManagedConnectionFactory.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + debug("PMDManagedConnectionFactory.setPassword() with val = " + val); + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("PMDManagedConnectionFactory.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("PMDManagedConnectionFactory.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("PMDManagedConnectionFactory setResourceAdapter " + count); + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("PMDManagedConnectionFactory.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("PMDManagedConnectionFactory.createManagedConnection", "subject|info", + "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("PMDManagedConnectionFactory.createManagedConnection(): pc == null"); + debug("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("PMDManagedConnectionFactory.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + debug("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("PMDManagedConnectionFactory.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof PMDManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + PMDManagedConnectionFactory that = (PMDManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + if (!Util.isEqual(this.noDefaultValue, that.getNoDefaultValue())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("PMDManagedConnectionFactory: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java new file mode 100755 index 0000000000..aeb87cf88c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDResourceAdapterImpl.java @@ -0,0 +1,222 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mixedmode; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.AuthenticationMechanism; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.SecurityPermission; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/** + * This is a sample resource adapter that will use some ra.xml info. This RA is used to assist with verifying the server + * supports annotations when there is no ra.xml (Assertion 268) and the transaction support is Local. + * + */ + +@Connector(description = "CTS Test Resource Adapter with No DD", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { + HintsContext.class, SecurityContext.class }) +public class PMDResourceAdapterImpl implements ResourceAdapter, java.io.Serializable { + + private transient BootstrapContext bsc; + + private transient PMDWorkManager pwm; + + private transient WorkManager wm; + + private transient Work work; + + // this should cause the setter to get invoked + @ConfigProperty(defaultValue = "PartialMDResourceAdapter", description = "String value", ignore = false) + String raName; + + @ConfigProperty(defaultValue = "VAL_FROM_ANNOTATION", description = "String value", ignore = false) + String overRide; + + String mdPropOnly; + + /** + * constructor + **/ + public PMDResourceAdapterImpl() { + debug("enterred constructor..."); + + debug("leaving constructor..."); + } + + // + // Begin ResourceAdapter interface requirements + // + + /* must implement for ResourceAdapter interface requirement */ + public void start(BootstrapContext bsc) throws ResourceAdapterInternalException { + debug("enterred start"); + debug("PMDResourceAdapterImpl.start called"); + + this.bsc = bsc; + this.wm = bsc.getWorkManager(); + + this.pwm = new PMDWorkManager(bsc); + pwm.runTests(); + + debug("leaving start"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void stop() { + debug("entered stop"); + debug("leaving stop"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException { + + debug("enterred endpointActivation"); + debug("leaving endpointActivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointDeactivation(MessageEndpointFactory ep, ActivationSpec spec) { + debug("enterred endpointDeactivation"); + debug("leaving endpointDeactivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { + + debug("enterred getXAResources"); + debug("leaving getXAResources"); + + throw new UnsupportedOperationException(); + } + + // + // END ResourceAdapter interface requirements + // + + /* + * this is the setter for the ConfigProperty annotation = raName. According to onnector 1.6 spec, section 18.5, this + * setter must be invoked since it belongs to a ConfigProperty annotation for the ResourceAdapter JavaBean. + */ + public void setRaName(String name) { + this.raName = name; + + // this helps verify assertion Connector:SPEC:279 + String str = "setRAName called with raname=" + raName; + debug(str); + ConnectorStatus.getConnectorStatus().logState(str); + } + + public String getRaName() { + return raName; + } + + public void setOverRide(String name) { + + // this is used to help test behavior is described in connector1.6 + // spec in section 18.3.2 - where the ConfigProperty specified in the DD + // file + // should override the ConfigProperty in this file. + String str = "PMDResourceAdapterImpl overRide=" + name; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + + this.overRide = name; + } + + public String getOverRide() { + return overRide; + } + + public void setMdPropOnly(String name) { + + // this is used to help test assertion Connector:SPEC:273 + String str = "PMDResourceAdapterImpl mdPropOnly=" + name; + debug(str); + + this.mdPropOnly = name; + } + + public String getMdPropOnly() { + return mdPropOnly; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof PMDResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + PMDResourceAdapterImpl that = (PMDResourceAdapterImpl) obj; + + if (!Util.isEqual(this.mdPropOnly, that.getMdPropOnly())) + return false; + + if (!Util.isEqual(this.overRide, that.getOverRide())) + return false; + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void debug(String out) { + Debug.trace("PMDResourceAdapterImpl: " + out); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java new file mode 100644 index 0000000000..7ba0d1e3c2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/PMDWorkManager.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.mixedmode; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.WorkImpl; +import com.sun.ts.tests.common.connector.whitebox.WorkListenerImpl; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.work.ExecutionContext; +import jakarta.resource.spi.work.WorkException; +import jakarta.resource.spi.work.WorkManager; + +public class PMDWorkManager { + private BootstrapContext bsc = null; + + private WorkManager wmgr; + + private String sicUser = ""; + + private String sicPwd = ""; + + private String eisUser = ""; + + public PMDWorkManager(BootstrapContext val) { + debug("enterred constructor"); + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + + this.sicUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.sicPwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + debug("leaving constructor"); + } + + public void runTests() { + debug("enterred runTests"); + doWork(); + debug("leaving runTests"); + } + + public void doWork() { + debug("enterred doWork"); + + try { + WorkImpl workimpl = new WorkImpl(wmgr); + + ExecutionContext ec = new ExecutionContext(); + WorkListenerImpl wl = new WorkListenerImpl(); + wmgr.doWork(workimpl, 5000, ec, wl); + debug("PMDWorkManager Work Object Submitted"); + } catch (WorkException we) { + System.out.println("PMDWorkManager WorkException thrown is " + we.getMessage()); + } catch (Exception ex) { + System.out.println("PMDWorkManager Exception thrown is " + ex.getMessage()); + } + + debug("leaving doWork"); + } + + public void debug(String out) { + Debug.trace("PMDWorkManager: " + out); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/ra-mixedmode.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/ra-mixedmode.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/ra-mixedmode.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/mixedmode/ra-mixedmode.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java new file mode 100644 index 0000000000..7574e6cbd6 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAManagedConnectionFactory.java @@ -0,0 +1,339 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +public class MAManagedConnectionFactory + implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String password; + + private String user; + + private String userName; + + /* + * @name MAManagedConnectionFactory + * + * @desc Default conctructor + */ + public MAManagedConnectionFactory() { + + } + + public String getUser() { + return user; + } + + public void setUser(String val) { + user = val; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String val) { + userName = val; + } + + public String getPassword() { + return password; + } + + public void setPassword(String val) { + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MAManagedConnectionFactory.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MAManagedConnectionFactory.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("MAManagedConnectionFactory setResourceAdapter " + count); + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("MAManagedConnectionFactory.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("MAManagedConnectionFactory.createManagedConnection", "subject|info", + "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("MAManagedConnectionFactory.createManagedConnection(): pc == null"); + debug("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("MAManagedConnectionFactory.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + debug("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + return new TSManagedConnection(this, pc, null, con, false, true); + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("MAManagedConnectionFactory.matchManagedConnection", "connectionSet|subject|info", + "TSEISDataSource"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof MAManagedConnectionFactory)) { + return false; + } + if (obj == this) { + return true; + } + + MAManagedConnectionFactory that = (MAManagedConnectionFactory) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + + private void debug(String str) { + Debug.trace(str); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java new file mode 100644 index 0000000000..16fbaaf262 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/MAResourceAdapterImpl.java @@ -0,0 +1,185 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.Serializable; +import java.lang.reflect.Method; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +public class MAResourceAdapterImpl implements ResourceAdapter, Serializable { + private String overRide = "default"; + + private String raName; + + private int counter = 0; + + private transient WorkManager wm; + + private transient BootstrapContext bsc; + + public MAResourceAdapterImpl() { + Debug.trace("MAResourceAdapterImpl Constructor "); + } + + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + String str1 = new String("MAResourceAdapterImpl Started " + counter); + ConnectorStatus.getConnectorStatus().logState(str1); + + // get WorkManager reference + wm = bsc.getWorkManager(); + + try { + checkAssociation(); + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + Debug.trace("MAResourceAdapterImpl.myStart "); + } + + public void stop() { + Debug.trace("MAResourceAdapterImpl.stop "); + } + + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + Debug.trace("MAResourceAdapterImpl.endpointActivation "); + } + + public XAResource[] getXAResources(ActivationSpec[] as) { + Debug.trace("MAResourceAdapterImpl.getXAResources "); + return null; + } + + private Method getOnMessageMethod() { + Debug.trace("MAResourceAdapterImpl.getOnMessageMethod "); + Method onMessageMethod = null; + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + Debug.trace("MAResourceAdapterImpl.chkUniqueMessageEndpointFactory"); + } + + public void checkAssociation() { + Debug.trace("MAResourceAdapterImpl.checkAssociation"); + } + + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + Debug.trace("MAResourceAdapterImpl.endpointDeactivation "); + } + + public void setRaName(String name) { + Debug.trace("MAResourceAdapterImpl.setRAName"); + this.raName = name; + } + + public String getRaName() { + Debug.trace("MAResourceAdapterImpl.getRAName"); + return raName; + } + + public void setOverRide(String val) { + Debug.trace("MAResourceAdapterImpl.setOverRide = " + val); + this.overRide = val; + } + + public String getOverRide() { + Debug.trace("MAResourceAdapterImpl.getOverRide"); + return overRide; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof MAResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + MAResourceAdapterImpl that = (MAResourceAdapterImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + if (!Util.isEqual(this.overRide, that.getOverRide())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java new file mode 100644 index 0000000000..d9b4776663 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherMCF.java @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +/* + * This class shouldnt really get used. The ra.xml should be specifying to + * use an MCF other than this one. (This is in order to assist with validating + * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312. + * + */ +public class OtherMCF implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String password; + + private String user; + + private String userName; + + /* + * @name OtherMCF + * + * @desc Default conctructor + */ + public OtherMCF() { + + } + + public String getUser() { + return user; + } + + public void setUser(String val) { + user = val; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String val) { + userName = val; + } + + public String getPassword() { + return password; + } + + public void setPassword(String val) { + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("OtherMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("OtherMCF.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("OtherMCF setResourceAdapter " + count); + Debug.trace(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("OtherMCF.createManagedConnection", "subject|info", "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + Debug.trace("OtherMCF.createManagedConnection(): pc == null"); + Debug.trace("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + Debug.trace("OtherMCF.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + Debug.trace("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + return new TSManagedConnection(this, pc, null, con, false, true); + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("OtherMCF.matchManagedConnection", "connectionSet|subject|info", "TSEISDataSource"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("setLogWriter", "out", ""); + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("getLogWriter", "", ""); + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof OtherMCF)) { + return false; + } + if (obj == this) { + return true; + } + + OtherMCF that = (OtherMCF) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java new file mode 100644 index 0000000000..915e36b163 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/OtherRAImpl.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.Serializable; +import java.lang.reflect.Method; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/* + * This class shouldnt really get used. The ra.xml should be specifying to + * use a RAImple other than this one. (This is in order to assist with validating + * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312. + * + */ +@Connector(description = "CTS test RA specified in DD is used", displayName = "OtherRAImpl", vendorName = "Java Software", eisType = "TS EIS", version = "1.0", licenseDescription = "CTS License Required", licenseRequired = true, reauthenticationSupport = false, transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { + HintsContext.class, SecurityContext.class }) + +public class OtherRAImpl implements ResourceAdapter, Serializable { + private String raName; + + private int counter = 0; + + private transient WorkManager wm; + + private transient BootstrapContext bsc; + + public OtherRAImpl() { + Debug.trace("OtherRAImpl Constructor "); + } + + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + String str1 = new String("OtherRAImpl Started " + counter); + Debug.trace(str1); + + // get WorkManager reference + + wm = bsc.getWorkManager(); + + try { + checkAssociation(); + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + Debug.trace("OtherRAImpl.myStart "); + } + + public void stop() { + Debug.trace("OtherRAImpl.stop "); + } + + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + public XAResource[] getXAResources(ActivationSpec[] as) { + Debug.trace("OtherRAImpl.getXAResources "); + return null; + } + + private Method getOnMessageMethod() { + Method onMessageMethod = null; + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + } + + public void checkAssociation() { + } + + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof OtherRAImpl)) { + return false; + } + if (obj == this) { + return true; + } + + OtherRAImpl that = (OtherRAImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRaName(String name) { + this.raName = name; + } + + public String getRaName() { + return raName; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java new file mode 100644 index 0000000000..c555ec04c8 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdMCF.java @@ -0,0 +1,340 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +/* + * This class shouldnt really get used. The ra.xml should be specifying to + * use an MCF other than this one. (This is in order to assist with validating + * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312, + * Connector:SPEC:274. + * + */ +public class ThirdMCF implements ManagedConnectionFactory, ResourceAdapterAssociation, Serializable, jakarta.resource.Referenceable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String password; + + private String user; + + private String userName; + + /* + * @name ThirdMCF + * + * @desc Default conctructor + */ + public ThirdMCF() { + } + + public String getUser() { + return user; + } + + public void setUser(String val) { + user = val; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String val) { + userName = val; + } + + public String getPassword() { + return password; + } + + public void setPassword(String val) { + password = val; + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("ThirdMCF.createConnectionFactory", "cxManager", "TSEISDataSource"); + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("ThirdMCF.createConnectionFactory", "", "TSEISDataSource"); + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = new String("ThirdMCF setResourceAdapter " + count); + Debug.trace(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + ConnectorStatus.getConnectorStatus().logAPI("ThirdMCF.createManagedConnection", "subject|info", "TSManagedConnection"); + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + Debug.trace("ThirdMCF.createManagedConnection(): pc == null"); + Debug.trace("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + Debug.trace("ThirdMCF.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + Debug.trace("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + return new TSManagedConnection(this, pc, null, con, false, true); + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("ThirdMCF.matchManagedConnection", "connectionSet|subject|info", "TSEISDataSource"); + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && mcf.equals(this)) { + return mc; + } + } + } + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("setLogWriter", "out", ""); + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + ConnectorStatus.getConnectorStatus().logAPI("getLogWriter", "", ""); + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof ThirdMCF)) { + return false; + } + if (obj == this) { + return true; + } + + ThirdMCF that = (ThirdMCF) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java new file mode 100644 index 0000000000..ed9bbe4e5c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ThirdRAImpl.java @@ -0,0 +1,176 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.multianno; + +import java.io.Serializable; +import java.lang.reflect.Method; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/* + * This class shouldnt really get used. The ra.xml should be specifying to + * use a RAImple other than this one. (This is in order to assist with validating + * assertions Connector:SPEC:272, Connector:SPEC:310, and Connector:SPEC:312, + * Connector:SPEC:274. + * + */ +@Connector(description = "CTS test RA specified in DD is used", displayName = "ThirdRAImpl", vendorName = "Java Software", eisType = "TS EIS", version = "1.0", licenseDescription = "CTS License Required", licenseRequired = true, reauthenticationSupport = false, transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { + HintsContext.class, SecurityContext.class }) + +public class ThirdRAImpl implements ResourceAdapter, Serializable { + private String raName; + + private int counter = 0; + + private transient WorkManager wm; + + private transient BootstrapContext bsc; + + public ThirdRAImpl() { + Debug.trace("ThirdRAImpl Constructor "); + } + + public void start(final BootstrapContext bsc) throws ResourceAdapterInternalException { + // setup network endpoints + counter++; + this.bsc = bsc; + String str1 = new String("ThirdRAImpl Started " + counter); + Debug.trace(str1); + + // get WorkManager reference + wm = bsc.getWorkManager(); + + try { + checkAssociation(); + bsc.getWorkManager().startWork(new Work() { + public void run() { + myStart(bsc); + } + + public void release() { + } + + }); + } catch (jakarta.resource.spi.work.WorkException we) { + throw new ResourceAdapterInternalException(); + } + + } + + private void myStart(final BootstrapContext ctx) { + Debug.trace("ThirdRAImpl.myStart "); + } + + public void stop() { + Debug.trace("ThirdRAImpl.stop "); + } + + public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + public XAResource[] getXAResources(ActivationSpec[] as) { + Debug.trace("ThirdRAImpl.getXAResources "); + return null; + } + + private Method getOnMessageMethod() { + Method onMessageMethod = null; + return onMessageMethod; + } + + private void chkUniqueMessageEndpointFactory() { + } + + public void checkAssociation() { + } + + public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as) { + } + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof ThirdRAImpl)) { + return false; + } + if (obj == this) { + return true; + } + + ThirdRAImpl that = (ThirdRAImpl) obj; + + if (this.counter != that.getCounter()) { + return false; + } + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRaName(String name) { + this.raName = name; + } + + public String getRaName() { + return raName; + } + + public void setCounter(int val) { + this.counter = val; + } + + public int getCounter() { + return this.counter; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ra-multianno.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ra-multianno.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ra-multianno.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/multianno/ra-multianno.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java new file mode 100644 index 0000000000..d1d87eb8d3 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDMCF.java @@ -0,0 +1,489 @@ +/* + * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.permissiondd; + +import java.io.PrintWriter; +import java.io.Serializable; +import java.util.Iterator; +import java.util.Set; + +import javax.security.auth.Subject; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.TSConnection; +import com.sun.ts.tests.common.connector.whitebox.TSConnectionImpl; +import com.sun.ts.tests.common.connector.whitebox.TSEISDataSource; +import com.sun.ts.tests.common.connector.whitebox.TSManagedConnection; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.ConnectionDefinition; +import jakarta.resource.spi.ConnectionDefinitions; +import jakarta.resource.spi.ConnectionManager; +import jakarta.resource.spi.ConnectionRequestInfo; +import jakarta.resource.spi.EISSystemException; +import jakarta.resource.spi.ManagedConnection; +import jakarta.resource.spi.ManagedConnectionFactory; +import jakarta.resource.spi.ManagedConnectionMetaData; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterAssociation; +import jakarta.resource.spi.security.PasswordCredential; + +@ConnectionDefinitions({ + @ConnectionDefinition(connectionFactory = com.sun.ts.tests.common.connector.whitebox.TSConnectionFactory.class, connectionFactoryImpl = com.sun.ts.tests.common.connector.whitebox.TSEISDataSource.class, connection = com.sun.ts.tests.common.connector.whitebox.TSConnection.class, connectionImpl = com.sun.ts.tests.common.connector.whitebox.TSEISConnection.class) }) +public class PermissionDDMCF implements ManagedConnectionFactory, ResourceAdapterAssociation, jakarta.resource.Referenceable, Serializable { + private javax.naming.Reference reference; + + private ResourceAdapter resourceAdapter; + + private int count; + + private String tsrValue; + + private String password; + + private String user; + + private String userName; + + private String setterMethodVal = "DEFAULT"; + + @ConfigProperty(defaultValue = "10", type = Integer.class, description = "Integer value", ignore = false) + private Integer integer; + + @ConfigProperty() + private String factoryName = "PermissionDDMCF"; + + /* + * @name PermissionDDMCF + * + * @desc Default conctructor + */ + public PermissionDDMCF() { + // this helps verify assertion Connector:SPEC:279 and Connector:SPEC:277 + String str = "PermissionDDMCF factoryName=" + factoryName; + ConnectorStatus.getConnectorStatus().logState(str); + + // lets make sure we can call and set setSetterMethodVal() + setSetterMethodVal("NONDEFAULT"); + + debug(str); + } + + /* + * used to help test assertion Connector:SPEC:278 + */ + @ConfigProperty() + public void setSetterMethodVal(String val) { + setterMethodVal = val; + String str = "PermissionDDResourceAdapterImpl.setSetterMethodVal=" + setterMethodVal; + ConnectorStatus.getConnectorStatus().logState(str); + } + + public String getSetterMethodVal() { + return setterMethodVal; + } + + public void setFactoryName(String name) { + this.factoryName = name; + } + + public String getFactoryName() { + return factoryName; + } + + public Integer getInteger() { + return this.integer; + } + + public void setInteger(Integer val) { + this.integer = val; + } + + public String getUser() { + debug("PermissionDDMCF.getUser() returning: " + user); + return user; + } + + public void setUser(String val) { + debug("PermissionDDMCF.setUser() with val = " + val); + user = val; + } + + public String getUserName() { + debug("PermissionDDMCF.getUserName() returning: " + userName); + return userName; + } + + public void setUserName(String val) { + debug("PermissionDDMCF.setUserName() with val = " + val); + userName = val; + } + + public String getPassword() { + debug("PermissionDDMCF.getPassword() returning: " + password); + return password; + } + + public void setPassword(String val) { + debug("PermissionDDMCF.setPassword() with val = " + val); + password = val; + } + + public String getTsrValue() { + debug("PermissionDDMCF getTsrValue called" + tsrValue); + return tsrValue; + } + + public void setTsrValue(String name) { + debug("PermissionDDMCF setTsrValue called" + name); + this.tsrValue = name; + } + + public void lookupTSR(String lookup) { + try { + TSNamingContext ncxt = new TSNamingContext(); + String newStr = "java:".concat(lookup); + Object obj = (Object) ncxt.lookup(newStr); + if (obj != null) { + debug("TSR NOT Null"); + } else { + debug("TSR Null"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @param ConnectionManager + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException { + return new TSEISDataSource(this, cxManager); + } + + /* + * @name createConnectionFactory + * + * @desc Creates a new connection factory instance + * + * @return Object + * + * @exception ResourceException + */ + public Object createConnectionFactory() throws ResourceException { + return new TSEISDataSource(this, null); + } + + /* + * @name setResourceAdapter + * + * @desc sets the Resource Adapter for this ManagedConnectionFactory + * + * @return + * + * @exception ResourceException + */ + public void setResourceAdapter(ResourceAdapter ra) throws ResourceException { + count++; + String newStr1 = "PermissionDDMCF setResourceAdapter " + count; + debug(newStr1); + this.resourceAdapter = ra; + } + + /* + * @name getResourceAdapter + * + * @desc gets the Resource Adapter for this ManagedConnectionFactory + * + * @return Object + * + * @exception ResourceException + */ + public ResourceAdapter getResourceAdapter() { + debug("PermissionDDMCF.getResource"); + return resourceAdapter; + } + + /* + * @name createManagedConnection + * + * @desc Creates a new managed connection to the underlying EIS + * + * @param Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection createManagedConnection(Subject subject, ConnectionRequestInfo info) throws ResourceException { + + try { + + TSConnection con = null; + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + if (pc == null) { + debug("PermissionDDMCF.createManagedConnection(): pc == null"); + debug("TSConnectionImpl.getConnection()"); + con = new TSConnectionImpl().getConnection(); + } else { + debug("PermissionDDMCF.createManagedConnection(): pc != null"); + setUser(pc.getUserName()); + setUserName(pc.getUserName()); + setPassword(new String(pc.getPassword())); + debug("TSConnectionImpl.getConnection(u,p)"); + con = new TSConnectionImpl().getConnection(pc.getUserName(), pc.getPassword()); + } + + ManagedConnection mcon = new TSManagedConnection(this, pc, null, con, false, true); + dumpConnectionMetaData(mcon); + + return mcon; + } catch (Exception ex) { + ResourceException re = new EISSystemException("Exception: " + ex.getMessage()); + re.initCause(ex); + throw re; + } + + } + + public void dumpConnectionMetaData(ManagedConnection mcon) { + + String hdr = "PermissionDDMCF: "; + String out; + boolean bLocal = false; + boolean bXA = false; + + try { + ManagedConnectionMetaData mdata = mcon.getMetaData(); + + out = hdr + "displayName=" + mdata.getEISProductName(); + debug(out); + + out = hdr + "version=" + mdata.getEISProductVersion(); + debug(out); + + // get transaction type + try { + mcon.getLocalTransaction(); + bLocal = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a localTransaction type"); + } + try { + mcon.getXAResource(); + bXA = true; + } catch (ResourceException ex) { + System.out.println(hdr + "not a XAResource type"); + } + + out = hdr + "transactionSupport="; + if (bLocal) { + out = out + "LocalTransaction"; + } else if (bXA) { + out = out + "XATransaction"; + } else { + // assume default case of noTx + out = out + "NoTransaction"; + } + debug(out); + } catch (ResourceException ex) { + System.out.println(ex.getMessage()); + ex.printStackTrace(); + } + } + + /* + * @name matchManagedConnection + * + * @desc Return the existing connection from the connection pool + * + * @param Set, Subject, ConnectionRequestInfo + * + * @return ManagedConnection + * + * @exception ResourceException + */ + public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info) + throws ResourceException { + + PasswordCredential pc = Util.getPasswordCredential(this, subject, info); + Iterator it = connectionSet.iterator(); + + while (it.hasNext()) { + Object obj = it.next(); + if (obj instanceof TSManagedConnection) { + TSManagedConnection mc = (TSManagedConnection) obj; + ManagedConnectionFactory mcf = mc.getManagedConnectionFactory(); + if (Util.isPasswordCredentialEqual(mc.getPasswordCredential(), pc) && (mcf != null) && mcf.equals(this)) { + return mc; + } + } + } + + System.out.println("matchManagedConnections: couldnt find match"); + return null; + } + + /* + * @name setLogWriter + * + * @desc Sets the Print Writer + * + * @param PrintWriter + * + * @exception ResourceException + */ + public void setLogWriter(PrintWriter out) throws ResourceException { + } + + /* + * @name getLogWriter + * + * @desc Gets the Print Writer + * + * @return PrintWriter + * + * @exception ResourceException + */ + public PrintWriter getLogWriter() throws ResourceException { + return null; + } + + /* + * @name equals + * + * @desc Compares the given object to the ManagedConnectionFactory instance. + * + * @param Object + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof PermissionDDMCF)) { + return false; + } + if (obj == this) { + return true; + } + + PermissionDDMCF that = (PermissionDDMCF) obj; + + if ((this.reference != null) && !(this.reference.equals(that.getReference()))) { + return false; + } else if ((this.reference == null) && !(that.getReference() == null)) { + return false; + } + + if ((this.resourceAdapter != null) && !(this.resourceAdapter.equals(that.getResourceAdapter()))) { + return false; + } else if ((this.resourceAdapter == null) && !(that.getResourceAdapter() == null)) { + return false; + } + + if (this.count != that.getCount()) { + return false; + } + + if ((this.integer != null) && (!this.integer.equals(that.getInteger()))) { + return false; + } else if ((this.integer == null) && !(that.getInteger() == null)) { + return false; + } + + if (!Util.isEqual(this.password, that.getPassword())) + return false; + + if (!Util.isEqual(this.user, that.getUser())) + return false; + + if (!Util.isEqual(this.userName, that.getUserName())) + return false; + + if (!Util.isEqual(this.tsrValue, that.getTsrValue())) + return false; + + if (!Util.isEqual(this.setterMethodVal, that.getSetterMethodVal())) + return false; + + if (!Util.isEqual(this.factoryName, that.getFactoryName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc Gives a hash value to a ManagedConnectionFactory Obejct. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + /* + * @name getReference + * + * @desc Gives the reference of the class + * + * @return javax.naming.Reference + */ + public javax.naming.Reference getReference() { + javax.naming.Reference ref; + + ref = this.reference; + return ref; + } + + /* + * @name setReference + * + * @desc sets the reference of the class + * + * @param javax.naming.Reference + */ + public void setReference(javax.naming.Reference ref) { + this.reference = ref; + } + + public void debug(String out) { + Debug.trace("PermissionDDMCF: " + out); + } + + public int getCount() { + return this.count; + } + + public void setCount(int val) { + this.count = val; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java new file mode 100755 index 0000000000..554a67586a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDResourceAdapterImpl.java @@ -0,0 +1,235 @@ +/* + * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.permissiondd; + +import javax.transaction.xa.XAResource; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; +import com.sun.ts.tests.common.connector.whitebox.Util; + +import jakarta.resource.NotSupportedException; +import jakarta.resource.ResourceException; +import jakarta.resource.spi.ActivationSpec; +import jakarta.resource.spi.AuthenticationMechanism; +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.ConfigProperty; +import jakarta.resource.spi.Connector; +import jakarta.resource.spi.ResourceAdapter; +import jakarta.resource.spi.ResourceAdapterInternalException; +import jakarta.resource.spi.SecurityPermission; +import jakarta.resource.spi.TransactionSupport; +import jakarta.resource.spi.endpoint.MessageEndpointFactory; +import jakarta.resource.spi.work.HintsContext; +import jakarta.resource.spi.work.SecurityContext; +import jakarta.resource.spi.work.Work; +import jakarta.resource.spi.work.WorkManager; + +/** + * This RA is used to assist with verifying the server supports permissions.xml security enforcement within a rar file. + */ + +@Connector(description = "CTS Test Resource Adapter with No DD", displayName = "whitebox-permissiondd.rar", vendorName = "Java Software", eisType = "TS EIS", version = "1.6", licenseDescription = "CTS License Required", licenseRequired = true, authMechanisms = @AuthenticationMechanism(credentialInterface = AuthenticationMechanism.CredentialInterface.PasswordCredential, authMechanism = "BasicPassword", description = "Basic Password Authentication"), reauthenticationSupport = false, securityPermissions = @SecurityPermission(description = "Security Perm description", permissionSpec = ""), transactionSupport = TransactionSupport.TransactionSupportLevel.NoTransaction, requiredWorkContexts = { + HintsContext.class, SecurityContext.class }) +public class PermissionDDResourceAdapterImpl implements ResourceAdapter, java.io.Serializable { + + private transient BootstrapContext bsc; + + private transient PermissionDDWorkManager awm; + + private transient WorkManager wm; + + private transient Work work; + + private String serverSideUser = ""; // corresponds to ts.jte's 'user' property + + private String serverSidePwd = ""; // corresponds to ts.jte's 'password' + // property + + private String eisUser = ""; // corresponds to ts.jte's 'user1' property + + private String eisPwd = ""; // corresponds to ts.jte's 'password' property + + @ConfigProperty(defaultValue = "PermissionDDResourceAdapterImpl") + private String raName; + + /** + * constructor + **/ + public PermissionDDResourceAdapterImpl() { + debug("enterred constructor..."); + + this.serverSideUser = TestUtil.getSystemProperty("j2eelogin.name"); + this.serverSidePwd = TestUtil.getSystemProperty("j2eelogin.password"); + this.eisUser = TestUtil.getSystemProperty("eislogin.name"); + this.eisPwd = TestUtil.getSystemProperty("eislogin.password"); + + debug("leaving constructor..."); + } + + // + // Begin ResourceAdapter interface requirements + // + + /* must implement for ResourceAdapter interface requirement */ + public void start(BootstrapContext bsc) throws ResourceAdapterInternalException { + debug("enterred start"); + + ConnectorStatus.getConnectorStatus().logState("PermissionDDResourceAdapterImpl.start called"); + + this.bsc = bsc; + this.wm = bsc.getWorkManager(); + + this.awm = new PermissionDDWorkManager(bsc); + awm.runTests(); + + debug("leaving start"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void stop() { + debug("entered stop"); + debug("leaving stop"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointActivation(MessageEndpointFactory factory, ActivationSpec spec) throws NotSupportedException { + + debug("enterred endpointActivation"); + debug("leaving endpointActivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public void endpointDeactivation(MessageEndpointFactory ep, ActivationSpec spec) { + debug("enterred endpointDeactivation"); + debug("leaving endpointDeactivation"); + } + + /* must implement for ResourceAdapter interface requirement */ + public XAResource[] getXAResources(ActivationSpec[] specs) throws ResourceException { + + debug("enterred getXAResources"); + debug("leaving getXAResources"); + + throw new UnsupportedOperationException(); + } + + // + // END ResourceAdapter interface requirements + // + + /* + * @name equals + * + * @desc compares this object with the given object. + * + * @param Object obj + * + * @return boolean + */ + public boolean equals(Object obj) { + + if ((obj == null) || !(obj instanceof PermissionDDResourceAdapterImpl)) { + return false; + } + if (obj == this) { + return true; + } + + PermissionDDResourceAdapterImpl that = (PermissionDDResourceAdapterImpl) obj; + + if (!Util.isEqual(this.serverSideUser, that.getServerSideUser())) + return false; + + if (!Util.isEqual(this.serverSidePwd, that.getServerSidePwd())) + return false; + + if (!Util.isEqual(this.eisUser, that.getEisUser())) + return false; + + if (!Util.isEqual(this.eisPwd, that.getEisPwd())) + return false; + + if (!Util.isEqual(this.raName, that.getRaName())) + return false; + + return true; + } + + /* + * @name hashCode + * + * @desc gets the hashcode for this object. + * + * @return int + */ + public int hashCode() { + return this.getClass().getName().hashCode(); + } + + public void setRaName(String name) { + this.raName = name; + + // this helps verify assertion Connector:SPEC:279 + String str = "setRAName called with raname=" + raName; + ConnectorStatus.getConnectorStatus().logState(str); + debug(str); + } + + public String getRaName() { + debug("PermissionDDResourceAdapterImpl.getRAName"); + return raName; + } + + public void debug(String out) { + Debug.trace("PermissionDDResourceAdapterImpl: " + out); + } + + public void setServerSideUser(String val) { + this.serverSideUser = val; + } + + public String getServerSideUser() { + return this.serverSideUser; + } + + public void setServerSidePwd(String val) { + this.serverSidePwd = val; + } + + public String getServerSidePwd() { + return this.serverSidePwd; + } + + public void setEisUser(String val) { + this.eisUser = val; + } + + public String getEisUser() { + return this.eisUser; + } + + public void setEisPwd(String val) { + this.eisUser = val; + } + + public String getEisPwd() { + return this.eisPwd; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java new file mode 100644 index 0000000000..7d5b12fb03 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/PermissionDDWorkManager.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2014, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.connector.whitebox.permissiondd; + +import java.io.FilePermission; +import java.net.SocketPermission; +import java.security.AccessControlException; +import java.security.AccessController; +import java.security.Permission; +import java.security.PrivilegedExceptionAction; +import java.util.PropertyPermission; + +import javax.transaction.xa.Xid; + +import com.sun.ts.tests.common.connector.util.ConnectorStatus; +import com.sun.ts.tests.common.connector.whitebox.Debug; + +import jakarta.resource.spi.BootstrapContext; +import jakarta.resource.spi.work.WorkManager; + +public class PermissionDDWorkManager { + private BootstrapContext bsc = null; + + private WorkManager wmgr; + + private Xid myxid; + + private Xid mynestxid; + + public PermissionDDWorkManager(BootstrapContext val) { + debug("enterred constructor"); + this.bsc = val; + this.wmgr = bsc.getWorkManager(); + + debug("leaving constructor"); + } + + public void runTests() { + debug("enterred runTests"); + + validateRequiredPermSet(); + validateRestrictedLocalPerm(); + + // doWork(); + // doTCWork(); + // submitNestedXidWork(); + debug("leaving runTests"); + } + + public void validateRequiredPermSet() { + try { + RuntimePermission rtperm = new RuntimePermission("loadLibrary.*"); + doCheckPermission(rtperm); + debug("validateRequiredPermSet(): valid perm for: " + rtperm.toString()); + + RuntimePermission rtperm2 = new RuntimePermission("queuePrintJob"); + doCheckPermission(rtperm2); + debug("validateRequiredPermSet(): valid perm for: " + rtperm2.toString()); + + SocketPermission socperm = new SocketPermission("*", "connect"); + doCheckPermission(socperm); + debug("validateRequiredPermSet(): valid perm for: " + socperm.toString()); + + FilePermission fperm = new FilePermission("*", "read"); + doCheckPermission(fperm); + debug("validateRequiredPermSet(): valid perm for: " + fperm.toString()); + + PropertyPermission pperm = new PropertyPermission("*", "read"); + doCheckPermission(pperm); + debug("validateRequiredPermSet(): valid perm for: " + pperm.toString()); + + // if we have perms we should get here + debug("SUCCESS: validateRequiredPermSet passed."); + ConnectorStatus.getConnectorStatus().logState("SUCCESS: validateRequiredPermSet passed."); + } catch (AccessControlException ex) { + debug("FAILURE: validateRequiredPermSet throwing AccessControlException."); + ConnectorStatus.getConnectorStatus().logState("FAILURE: validateRequiredPermSet throwing AccessControlException."); + Debug.printDebugStack(ex); + } catch (Exception ex) { + debug("FAILURE: validateRequiredPermSet had unexpected Exception."); + ConnectorStatus.getConnectorStatus().logState("FAILURE: validateRequiredPermSet had unexpected Exception."); + Debug.printDebugStack(ex); + } + + debug("returning from validateRequiredPermSet()"); + return; + } + + public void validateRestrictedLocalPerm() { + try { + // call a priviledged method + PropertyPermission readPropertyPerm = new PropertyPermission("TestPropertyPerm", "read"); + + try { + doCheckPermission(readPropertyPerm); + // should get here + debug("SUCCESS: validateRestrictedLocalPerm() has grant for read of TestPropertyPerm"); + } catch (AccessControlException ex) { + // should not get here. + debug("FAILURE: validateRestrictedLocalPerm() threw unexpected exception for read of TestPropertyPerm."); + ConnectorStatus.getConnectorStatus().logState("FAILURE: validateRestrictedLocalPerm() threw AccessControlException."); + Debug.printDebugStack(ex); + return; + } + debug("SUCCESS: validateRestrictedLocalPerm passed."); + ConnectorStatus.getConnectorStatus().logState("SUCCESS: validateRestrictedLocalPerm passed."); + + } catch (Exception ex) { + debug("FAILURE: validateRestrictedLocalPerm had unexpected exception."); + ConnectorStatus.getConnectorStatus().logState("FAILURE: validateRestrictedLocalPerm had unexpected exception."); + Debug.printDebugStack(ex); + } + + debug("returning from validateRestrictedLocalPerm()"); + return; + } + + public void doCheckPermission(Permission pp) throws Exception { + final Permission perm = pp; + AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Void run() throws AccessControlException { + AccessController.checkPermission(perm); + return null; + } + }); + } + + public void setXid(Xid xid) { + this.myxid = xid; + } + + public Xid getXid() { + return this.myxid; + } + + public void setNestXid(Xid xid) { + this.mynestxid = xid; + } + + public Xid getNestXid() { + return this.mynestxid; + } + + public void debug(String out) { + Debug.trace("PermissionDDWorkManager: " + out); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/permissions.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/permissions.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/permissions.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/permissions.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/ra.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/ra.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/ra.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/permissiondd/ra.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx-param.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx-param.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx-param.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx-param.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-notx.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx-param.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx-param.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx-param.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx-param.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-tx.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa-param.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa-param.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa-param.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa-param.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa.xml b/tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/connector/whitebox/ra-xa.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/ejb/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java similarity index 70% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java index 1d63c7f438..53759a51f5 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/SimpleArgument.java @@ -21,23 +21,23 @@ package com.sun.ts.tests.common.ejb.calleebeans; public class SimpleArgument implements java.io.Serializable { - protected int value; + protected int value; - public SimpleArgument(int initialValue) throws IllegalArgumentException { + public SimpleArgument(int initialValue) throws IllegalArgumentException { - if (0 == initialValue) { - throw new IllegalArgumentException("Cannot be zero!"); - } + if (0 == initialValue) { + throw new IllegalArgumentException("Cannot be zero!"); + } - this.value = initialValue; - } + this.value = initialValue; + } - public void modify() { - value += value; - } + public void modify() { + value += value; + } - public int getValue() { - return value; - } + public int getValue() { + return value; + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java similarity index 91% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java index 5426034387..de07f353d0 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCallee.java @@ -27,6 +27,6 @@ public interface StatefulCallee extends EJBObject { - public void call(Properties props, SimpleArgument arg) throws RemoteException; + public void call(Properties props, SimpleArgument arg) throws RemoteException; } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java new file mode 100644 index 0000000000..0615573285 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeEJB.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.calleebeans; + +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.ejb.wrappers.StatefulWrapper; + +import jakarta.ejb.CreateException; + +public class StatefulCalleeEJB extends StatefulWrapper { + + /** Modify arg and call StatefulWrapper create method */ + public void ejbCreate(Properties p, SimpleArgument arg) throws CreateException { + + try { + TestUtil.init(p); + TestUtil.logTrace("[StatefulCallee] ejbCreate()"); + super.ejbCreate(p); + logArgStatus("create input", arg); + arg.modify(); + logArgStatus("create output", arg); + } catch (Exception e) { + TestUtil.logErr("[StatefulCallee] Caught exception: ", e); + throw new CreateException(e.getMessage()); + } + } + + public void ejbPostCreate(Properties p, SimpleArgument arg) throws CreateException { + TestUtil.logTrace("[StatefulCallee] ejbPostCreate()"); + } + + public void call(Properties props, SimpleArgument arg) { + logArgStatus("input", arg); + arg.modify(); + logArgStatus("output", arg); + } + + public void logArgStatus(String msg, SimpleArgument arg) { + TestUtil.logTrace("[StatefulCallee] " + msg + " arg = " + arg.getValue()); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java similarity index 82% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java index abf5ed3240..0d3c3058e7 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeHome.java @@ -28,10 +28,8 @@ public interface StatefulCalleeHome extends EJBHome { - public StatefulCallee create(Properties p) - throws RemoteException, CreateException; + public StatefulCallee create(Properties p) throws RemoteException, CreateException; - public StatefulCallee create(Properties p, SimpleArgument arg) - throws RemoteException, CreateException; + public StatefulCallee create(Properties p, SimpleArgument arg) throws RemoteException, CreateException; } diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java similarity index 93% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java index 426ea2e1da..c257fee25b 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocal.java @@ -26,6 +26,6 @@ public interface StatefulCalleeLocal extends EJBLocalObject { - public void call(Properties props, SimpleArgument arg); + public void call(Properties props, SimpleArgument arg); } diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java similarity index 84% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java index 1501938c47..bfcf2e8ba8 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/StatefulCalleeLocalHome.java @@ -27,8 +27,7 @@ public interface StatefulCalleeLocalHome extends EJBLocalHome { - public StatefulCalleeLocal create(Properties p, SimpleArgument arg) - throws CreateException; + public StatefulCalleeLocal create(Properties p, SimpleArgument arg) throws CreateException; - public StatefulCalleeLocal create(Properties p) throws CreateException; + public StatefulCalleeLocal create(Properties p) throws CreateException; } diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/calleebeans/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java new file mode 100644 index 0000000000..b78f104240 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundDBSupport.java @@ -0,0 +1,175 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; + +/** + * DB Support object for DB table using whose primary key is an 'float'. + */ +public class CompoundDBSupport extends DBSupport implements java.io.Serializable { + + /** Name of the property whose value is the DB table name */ + protected static final String compoundTablePrefix = "compoundPKTable"; + + PreparedStatement pStmt = null; + + ResultSet result = null; + + /* + * Cached data + */ + protected CompoundPK cofID = null; /* Coffee ID (Primary Key) */ + + protected String cofName = null; /* Coffee Name */ + + protected float cofPrice = 0; /* Coffee Price */ + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object. + */ + public CompoundDBSupport() throws Exception { + super(compoundTablePrefix); + } + + public static void initTable(Properties props) throws Exception { + DBSupport.initTable(compoundTablePrefix, props); + } + + public boolean keyExists(CompoundPK pkey) throws SQLException { + try { + TestUtil.logTrace("[CompoundDBSupport] keyExists(" + pkey + ")"); + + getDBConnection(); + pStmt = getStmt("Select_PK"); + pStmt.setInt(1, pkey.pmIDInteger.intValue()); + pStmt.setString(2, pkey.pmIDString); + pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); + result = pStmt.executeQuery(); + + return result.next(); + } catch (SQLException e) { + throw new SQLException("SQL Exception in keyExists:" + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void createNewRow(CompoundPK cofID, String cofName, float cofPrice) throws CreateException, SQLException { + + try { + TestUtil.logTrace("[CompoundDBSupport] createNewRow(" + cofID + ", " + cofName + ", " + cofPrice + ")"); + + pStmt = getStmt("Insert"); + pStmt.setInt(1, cofID.pmIDInteger.intValue()); + pStmt.setString(2, cofID.pmIDString); + pStmt.setFloat(3, cofID.pmIDFloat.floatValue()); + pStmt.setString(4, cofName); + pStmt.setFloat(5, cofPrice); + TestUtil.logTrace("[CompoundDBSupport] Execute stmt" + pStmt); + if (1 != pStmt.executeUpdate()) { + throw new CreateException("INSERT failed in createNewRow"); + } else { + /* Keep cached state */ + this.cofID = cofID; + this.cofName = cofName; + this.cofPrice = cofPrice; + } + } catch (SQLException e) { + TestUtil.printStackTrace(e); + throw new SQLException("SQL Exception in createNewRow" + e); + } finally { + closeStmt(pStmt, null); + } + + TestUtil.logTrace("[CompoundDBSupport] New row created !"); + } + + public float loadPrice(CompoundPK pkey) throws SQLException { + + try { + TestUtil.logTrace("[CompoundDBSupport] loadPrice(" + pkey + ")"); + + pStmt = getStmt("Select_Price"); + pStmt.setInt(1, pkey.pmIDInteger.intValue()); + pStmt.setString(2, pkey.pmIDString); + pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); + result = pStmt.executeQuery(); + if (!result.next()) { + throw new SQLException("No record for PK = " + pkey); + } + + return result.getFloat(1); + } catch (SQLException e) { + throw new SQLException("SQLException in loadPrice(): " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void storePrice(CompoundPK pkey, float cofPrice) throws SQLException { + + try { + TestUtil.logTrace("[CompoundDBSupport] storePrice()"); + pStmt = getStmt("Update"); + pStmt.setFloat(1, cofPrice); + pStmt.setInt(2, pkey.pmIDInteger.intValue()); + pStmt.setString(3, pkey.pmIDString); + pStmt.setFloat(4, pkey.pmIDFloat.floatValue()); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("SQL UPDATE failed in storePrice"); + } + + this.cofPrice = cofPrice; + } catch (SQLException e) { + throw new SQLException("SQL Exception in storePrice(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + + public void removeRow(CompoundPK pkey) throws SQLException { + + try { + TestUtil.logTrace("[CompoundDBSupport] removeRow()"); + pStmt = getStmt("Delete"); + pStmt.setInt(1, pkey.pmIDInteger.intValue()); + pStmt.setString(2, pkey.pmIDString); + pStmt.setFloat(3, pkey.pmIDFloat.floatValue()); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("DELETE failed in removeRow"); + } + } catch (SQLException e) { + throw new SQLException("SQL Exception in removeRow(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java new file mode 100644 index 0000000000..ccbe89a9eb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/CompoundPK.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +/* + * Class used to define a compound primary key for Entity beans. + */ +public class CompoundPK implements java.io.Serializable { + /* Fields */ + public Integer pmIDInteger; + + public String pmIDString; + + public Float pmIDFloat; + + /** Standard Constructor */ + public CompoundPK(int intID, String strID, float floatID) { + this.pmIDInteger = new Integer(intID); + this.pmIDString = strID; + this.pmIDFloat = new Float(floatID); + } + + /** Public constructor with no parameters */ + public CompoundPK() { + this.pmIDInteger = new Integer(0); + this.pmIDString = "Limbo"; + this.pmIDFloat = new Float(0.0); + } + + /** Override java.lang.Object method */ + public int hashCode() { + int myHash; + + myHash = this.pmIDInteger.hashCode() + this.pmIDString.hashCode() + this.pmIDFloat.hashCode(); + + return myHash; + } + + /** Override java.lang.Object method */ + public boolean equals(Object o) { + CompoundPK other; + boolean same = true; + + if (!(o instanceof CompoundPK)) { + return false; + } + other = (CompoundPK) o; + + same &= this.pmIDInteger.equals(other.pmIDInteger); + same &= this.pmIDString.equals(other.pmIDString); + same &= this.pmIDFloat.equals(other.pmIDFloat); + + return same; + } + + /** Override java.lang.Object method */ + public String toString() { + return "CompoundPK [ " + pmIDInteger + ", " + pmIDString + ", " + pmIDFloat + " ]"; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java new file mode 100644 index 0000000000..c22a3e1cf9 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/DBSupport.java @@ -0,0 +1,200 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.Properties; + +import javax.sql.DataSource; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +/** + * Provide basic DB support for TS deployment tests, using The Datasource referenced as 'jdbc/DB1' in the component + * environment. + * + * This class is not intended to be used "as is", but rather to be sub-classed by other DB support classes focusing on a + * particular DB schema (and in particular on a type of primary key). + */ +public class DBSupport implements java.io.Serializable { + + /** Prefix used for JNDI lookups */ + protected static final String prefix = "java:comp/env/"; + + /** JNDI name used to lookup the DataSource */ + protected static final String DBLookupName = prefix + "jdbc/DB1"; + + /** DB table prefix. Used to get the appropriate SQL properties */ + protected String tablePrefix = null; + + protected DataSource ds = null; + + protected transient Connection dbConnection = null; + + protected TSNamingContext nctx = null; + + /* + * Cached data + */ + protected int cofID = 0; // Coffee ID (Primary Key) + + protected String cofName = null; // Coffee Name + + protected float cofPrice = 0; // Coffee Price + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object (so that you can safely use TestUtil.getProperty). + * + * @param tablePrefix Prefix to use for SQL properties lookups. + */ + public DBSupport(String tablePrefix) throws Exception { + + this.tablePrefix = tablePrefix; + TestUtil.logTrace("[DBSupport] Getting naming context..."); + this.nctx = new TSNamingContext(); + + TestUtil.logTrace("[DBSupport] Lookup DataSource " + DBLookupName); + ds = (DataSource) nctx.lookup(DBLookupName); + } + + /** + * Initialize DB table (remove all existing rows). + * + * Method is static so that it can be easily called from the Application Client setup method. + */ + public static void initTable(String tablePrefix, Properties props) throws Exception { + + String cleanupPropName = "DEPLOY_" + tablePrefix + "_Cleanup"; + DataSource ds = null; + Connection conn = null; + Statement stmt = null; + TSNamingContext nctx; + String sqlStr; + + TestUtil.logTrace("[DBSupport] initTable()"); + try { + if (null == tablePrefix) { /* Sanity check */ + throw new Exception("tablePrefix cannot be null!"); + } + + TestUtil.logTrace("[DBSupport] Getting naming context..."); + nctx = new TSNamingContext(); + + TestUtil.logTrace("[DBSupport] Lookup DataSource " + DBLookupName); + ds = (DataSource) nctx.lookup(DBLookupName); + + TestUtil.logTrace("[DBSupport] Getting DB connection..."); + conn = ds.getConnection(); + + TestUtil.logTrace("[DBSupport] Cleanup table"); + stmt = conn.createStatement(); + TestUtil.logTrace("[DBSupport] Use SQL prop " + cleanupPropName); + sqlStr = TestUtil.getProperty(cleanupPropName); + TestUtil.logTrace("[DBSupport] SQL = '" + sqlStr + "'"); + stmt.executeUpdate(sqlStr); + TestUtil.logTrace("[DBSupport] Table cleaned up!"); + + } catch (SQLException e) { + TestUtil.logErr("[DBSupport] Cannot init table :" + e); + throw new SQLException("SQL Exception in initTable: " + e); + } finally { + try { + if (null != stmt) { + stmt.close(); + } + if (null != conn) { + conn.close(); + } + } catch (SQLException e) { + TestUtil.logTrace("[DBSupport] Ignoring Exception (cleanup): " + e); + } + } + } + + /** Make sure we have a valid DB connection handy */ + public void getDBConnection() throws SQLException { + TestUtil.logTrace("[DBSupport] getDBConnection()"); + if (null == dbConnection) { + dbConnection = ds.getConnection(); + } + } + + /** Close current DB connection, if applicable */ + public void closeDBConnection() throws SQLException { + TestUtil.logTrace("[DBSupport] closeDBConnection()"); + if (null != dbConnection) { + dbConnection.close(); + dbConnection = null; /* Detect later we closed it */ + } + } + + /** + * Generic method to get a SQL statement for current table. + * + * We get the SQL code associated with the DEPLOY__ TS property. + */ + public PreparedStatement getStmt(String suffix) throws SQLException { + PreparedStatement pStmt; + String sqlPropName; + String sqlStr; + + TestUtil.logTrace("getStmt()"); + getDBConnection(); + TestUtil.logMsg("connection = " + dbConnection); + sqlPropName = "DEPLOY_" + tablePrefix + "_" + suffix; + TestUtil.logTrace("[DBSupport] Get SQL for " + sqlPropName); + sqlStr = TestUtil.getProperty(sqlPropName); + TestUtil.logMsg("[DBSupport] SQL = " + sqlStr); + TestUtil.logMsg("[DBSupport] getStatement: " + dbConnection); + pStmt = dbConnection.prepareStatement(sqlStr); + + return pStmt; + } + + /** + * Close the ResultSet and the PreparedStatement in a safely manner and ignoring any SQLException that could be thrown. + * This method is designed to be called from a finally block to ensure the release of associated resources. + */ + public void closeStmt(PreparedStatement pStmt, ResultSet result) { + try { + if (null != result) { + result.close(); + } + } catch (SQLException e) { + TestUtil.logTrace("[DBSupport] Ignoring Exception while " + "closing ResultSet: " + e); + } + + try { + if (null != pStmt) { + pStmt.close(); + } + } catch (SQLException e) { + TestUtil.logTrace("[DBSupport] Ignoring Exception while " + "closing PreparedStatement: " + e); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java new file mode 100644 index 0000000000..7f936c67fa --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/FloatDBSupport.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; + +/** + * DB Support object for DB table using whose primary key is an 'float'. + */ +public class FloatDBSupport extends DBSupport implements java.io.Serializable { + + /** Name of the property whose value is the DB table name */ + protected static final String floatTablePrefix = "floatPKTable"; + + PreparedStatement pStmt = null; + + ResultSet result = null; + + /* + * Cached data + */ + protected float cofID = 0; /* Coffee ID (Primary Key) */ + + protected String cofName = null; /* Coffee Name */ + + protected float cofPrice = 0; /* Coffee Price */ + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object. + */ + public FloatDBSupport() throws Exception { + super(floatTablePrefix); + } + + public static void initTable(Properties props) throws Exception { + DBSupport.initTable(floatTablePrefix, props); + } + + public boolean keyExists(float pkey) throws SQLException { + try { + TestUtil.logTrace("[FloatDBSupport] keyExists(" + pkey + ")"); + + getDBConnection(); + pStmt = getStmt("Select_PK"); + pStmt.setFloat(1, pkey); + result = pStmt.executeQuery(); + + return result.next(); + } catch (SQLException e) { + throw new SQLException("SQL Exception in keyExists: " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void createNewRow(float cofID, String cofName, float cofPrice) throws CreateException, SQLException { + + try { + TestUtil.logTrace("[FloatDBSupport] createNewRow(" + cofID + ", " + cofName + ", " + cofPrice + ")"); + + pStmt = getStmt("Insert"); + pStmt.setFloat(1, cofID); + pStmt.setString(2, cofName); + pStmt.setFloat(3, cofPrice); + TestUtil.logTrace("[FloatDBSupport] Execute stmt" + pStmt); + if (1 != pStmt.executeUpdate()) { + throw new CreateException("INSERT failed in createNewRow"); + } else { + /* Keep cached state */ + this.cofID = cofID; + this.cofName = cofName; + this.cofPrice = cofPrice; + } + } catch (SQLException e) { + TestUtil.printStackTrace(e); + throw new SQLException("SQL Exception in createNewRow" + e); + } finally { + closeStmt(pStmt, null); + } + + TestUtil.logTrace("[FloatDBSupport] New row created !"); + } + + public float loadPrice(float pkey) throws SQLException { + + try { + TestUtil.logTrace("[FloatDBSupport] loadPrice(" + pkey + ")"); + + pStmt = getStmt("Select_Price"); + pStmt.setFloat(1, pkey); + result = pStmt.executeQuery(); + if (!result.next()) { + throw new SQLException("No record for PK = " + pkey); + } + + return result.getFloat(1); + } catch (SQLException e) { + throw new SQLException("SQLException in loadPrice(): " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void storePrice(float pkey, float cofPrice) throws SQLException { + + try { + TestUtil.logTrace("[FloatDBSupport] storePrice()"); + pStmt = getStmt("Update"); + pStmt.setFloat(1, cofPrice); + pStmt.setFloat(2, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("SQL UPDATE failed in storePrice"); + } + + this.cofPrice = cofPrice; + } catch (SQLException e) { + throw new SQLException("SQLException in storePrice(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + + public void removeRow(float pkey) throws SQLException { + + try { + TestUtil.logTrace("[FloatDBSupport] removeRow()"); + pStmt = getStmt("Delete"); + pStmt.setFloat(1, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("DELETE failed in removeRow"); + } + } catch (SQLException e) { + throw new SQLException("SQLException in removeRow(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java new file mode 100644 index 0000000000..f812d4310d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/IntegerDBSupport.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; + +/** + * DB Support object for DB table using whose primary key is an 'int'. + */ +public class IntegerDBSupport extends DBSupport implements java.io.Serializable { + + /** Name of the property whose value is the DB table name */ + protected static final String intTablePrefix = "intPKTable"; + + PreparedStatement pStmt = null; + + ResultSet result = null; + + /* + * Cached data + */ + protected int cofID = 0; /* Coffee ID (Primary Key) */ + + protected String cofName = null; /* Coffee Name */ + + protected float cofPrice = 0; /* Coffee Price */ + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object. + */ + public IntegerDBSupport() throws Exception { + super(intTablePrefix); + } + + public static void initTable(Properties props) throws Exception { + DBSupport.initTable(intTablePrefix, props); + } + + public boolean keyExists(int pkey) throws SQLException { + try { + TestUtil.logTrace("[IntegerDBSupport] keyExists(" + pkey + ")"); + + getDBConnection(); + pStmt = getStmt("Select_PK"); + pStmt.setInt(1, pkey); + result = pStmt.executeQuery(); + + return result.next(); + } catch (SQLException e) { + throw new SQLException("SQLException in keyExists: " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void createNewRow(int cofID, String cofName, float cofPrice) throws CreateException, SQLException { + + try { + TestUtil.logTrace("[IntegerDBSupport] createNewRow(" + cofID + ", " + cofName + ", " + cofPrice + ")"); + + pStmt = getStmt("Insert"); + pStmt.setInt(1, cofID); + pStmt.setString(2, cofName); + pStmt.setFloat(3, cofPrice); + TestUtil.logTrace("[IntegerDBSupport] Execute stmt" + pStmt); + if (1 != pStmt.executeUpdate()) { + throw new CreateException("INSERT failed in createNewRow"); + } else { + /* Keep cached state */ + this.cofID = cofID; + this.cofName = cofName; + this.cofPrice = cofPrice; + } + } catch (SQLException e) { + TestUtil.printStackTrace(e); + throw new SQLException("SQLException in createNewRow" + e); + } finally { + closeStmt(pStmt, null); + } + + TestUtil.logTrace("[IntegerDBSupport] New row created !"); + } + + public float loadPrice(int pkey) throws SQLException { + + try { + TestUtil.logTrace("[IntegerDBSupport] loadPrice(" + pkey + ")"); + + pStmt = getStmt("Select_Price"); + pStmt.setInt(1, pkey); + result = pStmt.executeQuery(); + if (!result.next()) { + throw new SQLException("No record for PK = " + pkey); + } + + return result.getFloat(1); + } catch (SQLException e) { + throw new SQLException("SQLException in loadPrice(): " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void storePrice(int pkey, float cofPrice) throws SQLException { + + try { + TestUtil.logTrace("[IntegerDBSupport] storePrice()"); + pStmt = getStmt("Update"); + pStmt.setFloat(1, cofPrice); + pStmt.setInt(2, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("UPDATE failed in storePrice"); + } + + this.cofPrice = cofPrice; + } catch (SQLException e) { + throw new SQLException("SQLException in storePrice(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + + public void removeRow(int pkey) throws SQLException { + + try { + TestUtil.logTrace("[IntegerDBSupport] removeRow()"); + pStmt = getStmt("Delete"); + pStmt.setInt(1, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("DELETE failed in removeRow"); + } + } catch (SQLException e) { + throw new SQLException("SQLException in removeRow(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java new file mode 100644 index 0000000000..1c9de976d7 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/LongDBSupport.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; + +/** + * DB Support object for DB table using whose primary key is an 'long'. + */ +public class LongDBSupport extends DBSupport implements java.io.Serializable { + + /** Name of the property whose value is the DB table name */ + protected static final String longTablePrefix = "longPKTable"; + + PreparedStatement pStmt = null; + + ResultSet result = null; + + /* + * Cached data + */ + protected long cofID = 0; /* Coffee ID (Primary Key) */ + + protected String cofName = null; /* Coffee Name */ + + protected float cofPrice = 0; /* Coffee Price */ + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object. + */ + public LongDBSupport() throws Exception { + super(longTablePrefix); + } + + public static void initTable(Properties props) throws Exception { + DBSupport.initTable(longTablePrefix, props); + } + + public boolean keyExists(long pkey) throws SQLException { + try { + TestUtil.logTrace("[LongDBSupport] keyExists(" + pkey + ")"); + + getDBConnection(); + pStmt = getStmt("Select_PK"); + pStmt.setLong(1, pkey); + result = pStmt.executeQuery(); + + return result.next(); + } catch (SQLException e) { + throw new SQLException("SQLException in keyExists: " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void createNewRow(long cofID, String cofName, float cofPrice) throws CreateException, SQLException { + + try { + TestUtil.logTrace("[LongDBSupport] createNewRow(" + cofID + ", " + cofName + ", " + cofPrice + ")"); + + pStmt = getStmt("Insert"); + pStmt.setLong(1, cofID); + pStmt.setString(2, cofName); + pStmt.setFloat(3, cofPrice); + TestUtil.logTrace("[LongDBSupport] Execute stmt" + pStmt); + if (1 != pStmt.executeUpdate()) { + throw new CreateException("INSERT failed in createNewRow"); + } else { + /* Keep cached state */ + this.cofID = cofID; + this.cofName = cofName; + this.cofPrice = cofPrice; + } + } catch (SQLException e) { + TestUtil.printStackTrace(e); + throw new SQLException("SQLException in createNewRow" + e); + } finally { + closeStmt(pStmt, null); + } + + TestUtil.logTrace("[LongDBSupport] New row created !"); + } + + public float loadPrice(long pkey) throws SQLException { + + try { + TestUtil.logTrace("[LongDBSupport] loadPrice(" + pkey + ")"); + + pStmt = getStmt("Select_Price"); + pStmt.setLong(1, pkey); + result = pStmt.executeQuery(); + if (!result.next()) { + throw new SQLException("No record for PK = " + pkey); + } + + return result.getFloat(1); + } catch (SQLException e) { + throw new SQLException("SQLException in loadPrice(): " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void storePrice(long pkey, float cofPrice) throws SQLException { + + try { + TestUtil.logTrace("[LongDBSupport] storePrice()"); + pStmt = getStmt("Update"); + pStmt.setFloat(1, cofPrice); + pStmt.setLong(2, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("UPDATE failed in storePrice"); + } + + this.cofPrice = cofPrice; + } catch (SQLException e) { + throw new SQLException("SQLException in storePrice(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + + public void removeRow(long pkey) throws SQLException { + + try { + TestUtil.logTrace("[LongDBSupport] removeRow()"); + pStmt = getStmt("Delete"); + pStmt.setLong(1, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("DELETE failed in removeRow"); + } + } catch (SQLException e) { + throw new SQLException("SQLException in removeRow(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java new file mode 100644 index 0000000000..8b8eb77420 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/StringDBSupport.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.dba; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; + +/** + * DB Support object for DB table using whose primary key is an 'int'. + */ +public class StringDBSupport extends DBSupport implements java.io.Serializable { + + /** Name of the property whose value is the DB table name */ + protected static final String strTablePrefix = "strPKTable"; + + PreparedStatement pStmt = null; + + ResultSet result = null; + + /* + * Cached data + */ + protected String cofID = null; /* Coffee ID (Primary Key) */ + + protected String cofName = null; /* Coffee Name */ + + protected float cofPrice = 0; /* Coffee Price */ + + /** + * Create a new DBSupport object. If called from an EJB or a Web component, you must make sure to call TestUtil.init() + * before creating a new DBSupport object. + */ + public StringDBSupport() throws Exception { + super(strTablePrefix); + } + + public static void initTable(Properties props) throws Exception { + DBSupport.initTable(strTablePrefix, props); + } + + public boolean keyExists(String pkey) throws SQLException { + try { + TestUtil.logTrace("[StringDBSupport] keyExists(" + pkey + ")"); + + getDBConnection(); + pStmt = getStmt("Select_PK"); + pStmt.setString(1, pkey); + result = pStmt.executeQuery(); + + return result.next(); + } catch (SQLException e) { + throw new SQLException("SQLException in keyExists: " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void createNewRow(String cofID, String cofName, float cofPrice) throws CreateException, SQLException { + + try { + TestUtil.logTrace("[StringDBSupport] createNewRow(" + cofID + ", " + cofName + ", " + cofPrice + ")"); + + pStmt = getStmt("Insert"); + pStmt.setString(1, cofID); + pStmt.setString(2, cofName); + pStmt.setFloat(3, cofPrice); + TestUtil.logTrace("[StringDBSupport] Execute stmt" + pStmt); + if (1 != pStmt.executeUpdate()) { + throw new CreateException("INSERT failed in createNewRow"); + } else { + /* Keep cached state */ + this.cofID = cofID; + this.cofName = cofName; + this.cofPrice = cofPrice; + } + } catch (SQLException e) { + TestUtil.printStackTrace(e); + throw new SQLException("SQLException in createNewRow" + e); + } finally { + closeStmt(pStmt, null); + } + + TestUtil.logTrace("[StringDBSupport] New row created !"); + } + + public float loadPrice(String pkey) throws SQLException { + + try { + TestUtil.logTrace("[StringDBSupport] loadPrice(" + pkey + ")"); + + pStmt = getStmt("Select_Price"); + pStmt.setString(1, pkey); + result = pStmt.executeQuery(); + if (!result.next()) { + throw new SQLException("No record for PK = " + pkey); + } + + return result.getFloat(1); + } catch (SQLException e) { + throw new SQLException("SQLException in loadPrice(): " + e); + } finally { + closeStmt(pStmt, result); + } + } + + public void storePrice(String pkey, float cofPrice) throws SQLException { + + try { + TestUtil.logTrace("[StringDBSupport] storePrice()"); + pStmt = getStmt("Update"); + pStmt.setFloat(1, cofPrice); + pStmt.setString(2, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("UPDATE failed in storePrice"); + } + + this.cofPrice = cofPrice; + } catch (SQLException e) { + throw new SQLException("SQLException in storePrice(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + + public void removeRow(String pkey) throws SQLException { + + try { + TestUtil.logTrace("[StringDBSupport] removeRow()"); + pStmt = getStmt("Delete"); + pStmt.setString(1, pkey); + if (1 != pStmt.executeUpdate()) { + throw new SQLException("DELETE failed in removeRow"); + } + } catch (SQLException e) { + throw new SQLException("SQLException in removeRow(): " + e); + } finally { + closeStmt(pStmt, null); + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/dba/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/ejb/dba/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/dba/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java new file mode 100644 index 0000000000..3405ebfa0a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/MDBWrapper.java @@ -0,0 +1,203 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.wrappers; + +import java.lang.reflect.Method; +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import com.sun.ts.tests.jms.common.JmsUtil; +import jakarta.ejb.EJBException; +import jakarta.ejb.MessageDrivenBean; +import jakarta.ejb.MessageDrivenContext; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageListener; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.TextMessage; + +/** + * Life cyle and test invocation methods for MDB. Actual test methods are defined in subclasses of this class. + * + * WARNING: We assume the MDB is CMT. Do not use this wrapper for a BMT MDB! + */ +public class MDBWrapper implements MessageDrivenBean, MessageListener { + + protected static final String prefix = "java:comp/env/jms/"; + + protected static final String qFactoryLookup = prefix + "myQueueConnectionFactory"; + + protected static final String replyQueueLookup = prefix + "replyQueue"; + + public TSNamingContext nctx = null; + + protected MessageDrivenContext mctx = null; + + protected QueueConnectionFactory qFactory; + + protected QueueConnection conn = null; + + protected Queue replyQueue = null; + + protected QueueSender mSender = null; + + protected boolean result = false; + + public void ejbCreate() { + try { + TestUtil.logTrace("[MDBWrapper] ejbCreate()"); + nctx = new TSNamingContext(); + TestUtil.logTrace("[MDBWrapper] Looking up " + qFactoryLookup); + qFactory = (QueueConnectionFactory) nctx.lookup(qFactoryLookup); + TestUtil.logTrace("[MDBWrapper] Looking up " + replyQueueLookup); + replyQueue = (Queue) nctx.lookup(replyQueueLookup); + } catch (Exception e) { + TestUtil.logErr("[MDBWrapper] Exception in ejbCreate()", e); + /* Send instance to "does not exist" state */ + throw new EJBException("Exception in ejbCreate()", e); + } + } + + public void setMessageDrivenContext(MessageDrivenContext mctx) { + TestUtil.logTrace("[MDBWrapper] setMessageDrivenContext()"); + this.mctx = mctx; + } + + public void ejbRemove() { + TestUtil.logTrace("[MDBWrapper] ejbRemove()"); + } + + public void onMessage(Message msg) { + QueueSession session = null; + TextMessage messageSent = null; + String testName = "Undefined"; + Properties props = null; + boolean pass = false; + + try { + props = getProperties(msg); + TestUtil.init(props); + testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); + + // if we're cleaning up, no need to report test results + if (testName.equals("cleanUpBean")) { + TestUtil.logTrace("[MDBWrapper] Removing stateful session bean"); + runTest(testName, msg, session, props); + return; + } + pass = runTest(testName, msg, session, props); + + conn = qFactory.createQueueConnection(); + session = conn.createQueueSession(true, 0); + JmsUtil.sendTestResults(testName, pass, session, replyQueue); + } catch (Exception e) { + TestUtil.logErr("[MDBWrapper] Exception in onMessage(): ", e); + } finally { + cleanup(conn); + } + + } + + /** + * Run corresponding test by invoking test method on the current instance (also used for cleanup of stateful session + * beans). + */ + protected boolean runTest(String testName, Message msg, QueueSession session, Properties props) { + + Boolean pass = Boolean.FALSE; + Class testDriverClass; + Method testMethod; + Class params[] = { Properties.class }; + Object args[] = new Object[1]; + + TestUtil.logTrace("[MDBWrapper] runTest()"); + + try { + TestUtil.logTrace("[MDBWrapper] run test '" + testName + "'"); + testDriverClass = this.getClass(); + testMethod = testDriverClass.getMethod(testName, params); + args[0] = props; + pass = (Boolean) testMethod.invoke(this, args); + } catch (NoSuchMethodException e) { + TestUtil.logErr("[MDBWrapper] Cannot find method '" + testName + "' make sure it is defined " + "in sub-class", e); + pass = Boolean.FALSE; + } catch (Exception e) { + TestUtil.logErr("[MDBWrapper] Unexpected exception", e); + pass = Boolean.FALSE; + } + + return pass.booleanValue(); + } + + /** + * Construct a property object needed by TS harness for logging. We retrieve the properties from the Message object + * passed into the MDB onMessage() method + */ + protected Properties getProperties(Message msg) throws JMSException { + Properties props; + String hostname = null; + String traceflag = null; + String logport = null; + Enumeration propNames; + + props = new Properties(); + + /* + * Because a JMS property name cannot contain '.' the following properties are a special case + */ + hostname = msg.getStringProperty("harnesshost"); + props.put("harness.host", hostname); + traceflag = msg.getStringProperty("harnesslogtraceflag"); + props.put("harness.log.traceflag", traceflag); + logport = msg.getStringProperty("harnesslogport"); + props.put("harness.log.port", logport); + + /* + * now pull out the rest of the properties from the message + */ + propNames = msg.getPropertyNames(); + for (String name = null; propNames.hasMoreElements();) { + name = (String) propNames.nextElement(); + props.put(name, msg.getStringProperty(name)); + } + + return props; + } + + /** Cleanup method designed to be called within a finally block */ + protected void cleanup(QueueConnection conn) { + try { + if (null != conn) { + conn.close(); + } + } catch (Exception e) { + TestUtil.logErr("[MDBWrapper] Ignoring Exception on " + "QueueConnection cleanup: ", e); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java new file mode 100644 index 0000000000..25f1bc6606 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateful3xWrapper.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.wrappers; + +import java.util.Properties; + +import com.sun.ts.lib.util.RemoteLoggingInitException; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.EJBException; + +/** + * Stateful wrapper that provides common methods for a Stateful Session bean. This class is intended to be subclassed by + * the final bean class that will provide the test logic (business methods). + */ +public class Stateful3xWrapper { + + protected TSNamingContext nctx = null; + + protected Properties props; + + /* + * Business methods. + */ + + /** + * Initialize TS logging. + * + * @param props TS properties need by TestUtil + * + */ + public void initLogging(Properties props) { + try { + this.props = props; + TestUtil.logTrace("[Stateful3xWrapper] initLogging()"); + TestUtil.init(props); + TestUtil.logTrace("[Stateful3xWrapper] initLogging OK"); + } catch (RemoteLoggingInitException e) { + TestUtil.logMsg("initLogging failed."); + throw new EJBException(e.getMessage()); + } + } + + public void createNamingContext() { + TestUtil.logTrace("[Stateful3xWrapper] createNamingContext()"); + + try { + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.logErr("[Stateful3xWrapper] Cannot create Naming Context: " + e); + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java new file mode 100644 index 0000000000..57b9a73035 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatefulWrapper.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.wrappers; + +import java.util.Properties; + +import com.sun.ts.lib.util.RemoteLoggingInitException; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; +import jakarta.ejb.SessionBean; +import jakarta.ejb.SessionContext; + +/** + * Stateful wrapper that provide the bean life cycle methods for a Stateful Session bean. This class is intended to be + * subclassed by the final entity bean class that will provide the test logic (business methods). + */ +public class StatefulWrapper implements SessionBean { + + protected TSNamingContext nctx = null; + + protected SessionContext sctx = null; + + protected Properties props; + + /* + * Bean life cycle + */ + + public void ejbCreate(Properties props) throws CreateException { + try { + this.props = props; + TestUtil.init(props); + TestUtil.logTrace("[StatefulWrapper] ejbCreate()"); + } catch (RemoteLoggingInitException e) { + throw new CreateException(e.getMessage()); + } + TestUtil.logTrace("[StatefulWrapper] ejbCreate OK"); + } + + public void ejbPostCreate(Properties props) throws CreateException { + TestUtil.logTrace("[StatefulWrapper] ejbPostCreate()"); + } + + public void setSessionContext(SessionContext sc) { + TestUtil.logTrace("[StatefulWrapper] setSessionContext()"); + sctx = sc; + try { + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.logErr("[StatefulWrapper] Cannot create Naming Context: " + e); + } + } + + public void ejbRemove() { + TestUtil.logTrace("[StatefulWrapper] ejbRemove()"); + } + + public void ejbActivate() { + TestUtil.logTrace("[StatefulWrapper] ejbActivate()"); + } + + public void ejbPassivate() { + TestUtil.logTrace("[StatefulWrapper] ejbPassivate()"); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java similarity index 51% rename from common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java index 78409007fc..3fa3d39d70 100644 --- a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/Stateless3xWrapper.java @@ -29,43 +29,41 @@ import jakarta.ejb.EJBException; /** - * Stateless wrapper that provides common methods for a Stateless - * Session bean. This class is intended to be subclassed by the final - * bean class that will provide the test logic (business methods). + * Stateless wrapper that provides common methods for a Stateless Session bean. This class is intended to be subclassed + * by the final bean class that will provide the test logic (business methods). */ public class Stateless3xWrapper { - protected TSNamingContext nctx = null; + protected TSNamingContext nctx = null; - /* - * Business methods. - */ + /* + * Business methods. + */ - /** - * Initialize TS logging. - * - * @param props - * TS properties need by TestUtil - * - */ - public void initLogging(Properties props) { - try { - TestUtil.logTrace("[Stateless3xWrapper] initLogging()"); - TestUtil.init(props); - TestUtil.logTrace("[Stateless3xWrapper] initLogging OK."); - } catch (RemoteLoggingInitException e) { - TestUtil.logMsg("initLogging failed."); - throw new EJBException(e.getMessage()); + /** + * Initialize TS logging. + * + * @param props TS properties need by TestUtil + * + */ + public void initLogging(Properties props) { + try { + TestUtil.logTrace("[Stateless3xWrapper] initLogging()"); + TestUtil.init(props); + TestUtil.logTrace("[Stateless3xWrapper] initLogging OK."); + } catch (RemoteLoggingInitException e) { + TestUtil.logMsg("initLogging failed."); + throw new EJBException(e.getMessage()); + } } - } - public void createNamingContext() { - TestUtil.logTrace("[Stateless3xWrapper] createNamingContext()"); + public void createNamingContext() { + TestUtil.logTrace("[Stateless3xWrapper] createNamingContext()"); - try { - nctx = new TSNamingContext(); - } catch (Exception e) { - TestUtil.logErr("[Stateless3xWrapper] Cannot create Naming Context: " + e); + try { + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.logErr("[Stateless3xWrapper] Cannot create Naming Context: " + e); + } } - } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java new file mode 100644 index 0000000000..8d5c8343ea --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/StatelessWrapper.java @@ -0,0 +1,100 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.ejb.wrappers; + +import java.util.Properties; + +import com.sun.ts.lib.util.RemoteLoggingInitException; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.CreateException; +import jakarta.ejb.EJBException; +import jakarta.ejb.SessionBean; +import jakarta.ejb.SessionContext; + +/** + * Stateless wrapper that provide the bean life cycle methods for a Stateless Session bean. This class is intended to be + * subclassed by the final entity bean class that will provide the test logic (business methods). + */ +public class StatelessWrapper implements SessionBean { + + protected TSNamingContext nctx = null; + + protected SessionContext sctx = null; + + /* + * Business methods. + */ + + /** + * Initialize TS logging. + * + * @param props TS properties need by TestUtil + * + */ + public void initLogging(Properties props) { + + try { + TestUtil.logTrace("[StatelessWrapper] initLogging()"); + TestUtil.init(props); + TestUtil.logTrace("[StatelessWrapper] initLogging OK."); + } catch (RemoteLoggingInitException e) { + TestUtil.logMsg("initLogging failed."); + throw new EJBException(e.getMessage()); + } + } + + /* + * Bean life cycle + */ + + public void ejbCreate() throws CreateException { + TestUtil.logTrace("[StatelessWrapper] ejbCreate()"); + } + + public void ejbPostCreate() throws CreateException { + TestUtil.logTrace("[StatelessWrapper] ejbPostCreate()"); + } + + public void setSessionContext(SessionContext sc) { + TestUtil.logTrace("[StatelessWrapper] setSessionContext()"); + sctx = sc; + try { + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.logErr("[StatelessWrapper] Cannot create Naming Context: " + e); + } + } + + public void ejbRemove() { + TestUtil.logTrace("[StatelessWrapper] ejbRemove()"); + } + + public void ejbActivate() { + TestUtil.logTrace("[StatelessWrapper] ejbActivate()"); + } + + public void ejbPassivate() { + TestUtil.logTrace("[StatelessWrapper] ejbPassivate()"); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/ejb/wrappers/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java new file mode 100644 index 0000000000..f2ff1bf95f --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/expression/ExpressionTest.java @@ -0,0 +1,376 @@ +/* + * Copyright (c) 2009, 2021 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.el.api.expression; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.lang.annotation.Annotation; + +import jakarta.el.ELContext; +import jakarta.el.Expression; +import jakarta.el.MethodExpression; +import jakarta.el.MethodInfo; +import jakarta.el.MethodReference; +import jakarta.el.PropertyNotWritableException; +import jakarta.el.ValueExpression; + +public class ExpressionTest { + + // Set New Line from system prop, if not defined used "\n as default." + private static final String NLINE = System.getProperty("line.separator", "\n"); + + private ExpressionTest() { + } + + public static boolean testMethodInfo(MethodInfo minfo, String expectedName, Class expectedReturnType, int expectedNumParams, + Class[] expectedParamTypes, StringBuffer buf) { + + boolean pass = true; + String name = minfo.getName(); + Class returnType = minfo.getReturnType(); + Class[] paramTypes = minfo.getParamTypes(); + int numParams = paramTypes.length; + + if (!name.equals(expectedName)) { + buf.append("Did not get expected method name." + NLINE); + buf.append("Expected name = " + expectedName + NLINE); + buf.append("Computed name = " + name + NLINE); + pass = false; + } + if (!returnType.equals(expectedReturnType)) { + buf.append("Did not get expected return type." + NLINE); + buf.append("Expected return type = " + expectedReturnType.getName() + NLINE); + buf.append("Computed return type = " + returnType.getName() + NLINE); + pass = false; + } + if (numParams != expectedNumParams) { + buf.append("Did not get expected number of parameters." + NLINE); + buf.append("Expected number of parameters = " + expectedNumParams + NLINE); + buf.append("Computed number of parameters = " + numParams + NLINE); + pass = false; + } else { + for (int i = 0; i < numParams; ++i) { + if (!(paramTypes[i].equals(expectedParamTypes[i]))) { + buf.append("Did not get expected parameter type." + NLINE); + buf.append("Expected parameter type = " + expectedParamTypes[i].getName() + NLINE); + buf.append("Computed parameter type = " + paramTypes[i].getName() + NLINE); + pass = false; + } + } + } + return pass; + } + + public static boolean testMethodReference(MethodReference mref, Object expectedBase, MethodInfo expectedMethodInfo, + Class[] expectedAnnotationTypes, Object[] expectedParamValues, StringBuffer buf) { + + boolean pass = true; + + Object base = mref.getBase(); + MethodInfo minfo = mref.getMethodInfo(); + Annotation[] annotations = mref.getAnnotations(); + Object[] parameterValues = mref.getEvaluatedParameters(); + + if (base == null) { + buf.append("Did not get expected base object." + NLINE); + buf.append("Expected base = " + expectedBase + NLINE); + buf.append("Computed name = null" + NLINE); + pass = false; + } else if (!base.equals(expectedBase)) { + buf.append("Did not get expected base object." + NLINE); + buf.append("Expected base = " + expectedBase + NLINE); + buf.append("Computed base = " + base + NLINE); + pass = false; + } + + if (minfo == null) { + buf.append("Did not get expected MethodInfo object." + NLINE); + buf.append("Expected MethodInfo = " + expectedMethodInfo + NLINE); + buf.append("Computed MethodInfo = null" + NLINE); + pass = false; + } else if (!minfo.equals(expectedMethodInfo)) { + buf.append("Did not get expected base object." + NLINE); + buf.append("Expected MethodInfo = " + expectedMethodInfo + NLINE); + buf.append("Computed MethodInfo = " + minfo + NLINE); + pass = false; + } + + if (annotations == null) { + buf.append("Did not get expected annotation array." + NLINE); + buf.append("Computed array was null" + NLINE); + pass = false; + } else if (annotations.length != expectedAnnotationTypes.length) { + buf.append("Did not get expected number of annotations." + NLINE); + buf.append("Expected annotation array length = " + expectedAnnotationTypes.length + NLINE); + buf.append("Computed annotation array length = " + annotations.length + NLINE); + pass = false; + } else { + for (int i = 0; i < annotations.length; i++) { + if (!annotations[i].annotationType().equals(expectedAnnotationTypes[i])) { + buf.append("Did not get expected annotation type for array index = " + i + NLINE); + buf.append("Expected type = " + expectedAnnotationTypes[i] + NLINE); + buf.append("Computed type = " + annotations[i].getClass() + NLINE); + pass = false; + } + } + } + + if (parameterValues == null) { + buf.append("Did not get expected parameter value array." + NLINE); + buf.append("Computed array was null" + NLINE); + pass = false; + } else if (parameterValues.length != expectedParamValues.length) { + buf.append("Did not get expected number of parameter values." + NLINE); + buf.append("Expected annotation array length = " + expectedParamValues.length + NLINE); + buf.append("Computed annotation array length = " + parameterValues.length + NLINE); + pass = false; + } else { + for (int i = 0; i < parameterValues.length; i++) { + if (!parameterValues[i].equals(expectedParamValues[i])) { + buf.append("Did not get expected parameter value for array index = " + i + NLINE); + buf.append("Expected type = " + expectedParamValues[i] + NLINE); + buf.append("Computed type = " + parameterValues[i] + NLINE); + pass = false; + } + } + } + + return pass; + } + + public static boolean testValueExpression(ValueExpression vexp, ELContext context, String exprStr, Class expectedType, + Object expectedValue, boolean expectedReadOnly, boolean expectedLiteralText, StringBuffer buf) { + + boolean pass = true; + + // getValue() + Object retrievedValue = vexp.getValue(context); + if (!retrievedValue.equals(expectedValue)) { + pass = false; + buf.append("getValue() does not return expected value" + NLINE); + buf.append("Expected value = " + expectedValue.toString() + NLINE); + buf.append("Computed value = " + retrievedValue.toString() + NLINE); + } + + // setValue() + try { + vexp.setValue(context, "blue"); + String newValue = (String) vexp.getValue(context); + if (expectedReadOnly) { + pass = false; + buf.append("setValue() succeeded on a read-only value" + NLINE); + } else if (!newValue.equals("blue")) { + pass = false; + buf.append("Did not get correct set value for " + "ValueExpression." + NLINE); + buf.append("Expected value = " + "blue" + NLINE); + buf.append("Computed value = " + newValue + NLINE); + } + } catch (PropertyNotWritableException pnwe) { + if (!expectedReadOnly) { + pass = false; + buf.append("setValue() threw " + "PropertyNotWritableException" + NLINE); + buf.append("on a writable value" + NLINE); + } else { + buf.append("PropertyNotWritableException caught as " + "expected." + NLINE); + } + } + + // getType() + Class type = vexp.getType(context); + String typeName = (type == null) ? "null" : type.getName(); + buf.append("Type retrieved is " + typeName + NLINE); + + // getExpectedType() + Class retrievedType = vexp.getExpectedType(); + if (!(retrievedType.equals(expectedType))) { + pass = false; + buf.append("getExpectedType() does not return expected " + "type" + NLINE); + buf.append("Expected type = " + expectedType.toString() + NLINE); + buf.append("Computed type = " + retrievedType.toString() + NLINE); + } + + // isReadOnly() + if ((vexp.isReadOnly(context)) != expectedReadOnly) { + pass = false; + buf.append("isReadOnly() did not return " + expectedReadOnly + NLINE); + } + + // isLiteralText() + if ((vexp.isLiteralText()) != expectedLiteralText) { + pass = false; + buf.append("isLiteralText() did not return " + expectedLiteralText + NLINE); + } + + // getExpressionString() + String retrievedStr = vexp.getExpressionString(); + if (!retrievedStr.equals(exprStr)) { + pass = false; + buf.append("getExpressionString() does not return expected " + "string" + NLINE); + buf.append("Expected string = " + exprStr + NLINE); + buf.append("Computed string = " + retrievedStr + NLINE); + } + + return pass; + } + + public static boolean testMethodExpression(MethodExpression mexp, ELContext context, String exprStr, Object[] params, + Object expectedReturnValue, boolean expectedLiteralText, StringBuffer buf) { + + boolean pass = true; + + // getMethodInfo() + try { + MethodInfo minfo = mexp.getMethodInfo(context); + } catch (Exception e) { + pass = false; + buf.append("getMethodInfo() threw an unexpected exception" + NLINE); + buf.append(e.getMessage() + NLINE); + } + + // invoke() + try { + Object returnValue = mexp.invoke(context, params); + if (returnValue == null) { + if (expectedReturnValue != null) { + pass = false; + buf.append("invoke() unexpectedly returned null" + NLINE); + } + } else if (expectedReturnValue == null) { + pass = false; + buf.append("invoke() unexpectedly returned non-null " + "value" + NLINE); + } else if (!returnValue.equals(expectedReturnValue)) { + pass = false; + buf.append("invoke() returned an object of wrong type or " + "value" + NLINE); + buf.append("Expected return value: " + expectedReturnValue.toString() + NLINE); + buf.append("Computed return value: " + returnValue.toString() + NLINE); + } + } catch (Exception e) { + pass = false; + buf.append("invoke() threw an unexpected exception" + NLINE); + buf.append(e.getMessage() + NLINE); + } + + // isLiteralText() + if ((mexp.isLiteralText()) != expectedLiteralText) { + pass = false; + buf.append("isLiteralText() did not return " + expectedLiteralText + NLINE); + } + + // getExpressionString() + String retrievedStr = mexp.getExpressionString(); + if (!retrievedStr.equals(exprStr)) { + pass = false; + buf.append("getExpressionString() does not return expected " + "string" + NLINE); + buf.append("Expected string = " + exprStr + NLINE); + buf.append("Computed string = " + retrievedStr + NLINE); + } + + return pass; + } + + public static boolean equalsTest(Expression exp1, Expression exp2, StringBuffer buf) { + + String e1str = exp1.getExpressionString(); + String e2str = (exp2 == null) ? null : exp2.getExpressionString(); + + buf.append("Testing equality: " + e1str + " and " + e2str + NLINE); + + if (!exp1.equals(exp2)) { + if (exp2 != null) { + buf.append("Expression " + e1str + " is not equal to " + "Expression " + e2str + NLINE); + } + return false; + } else { + int hcode1 = exp1.hashCode(); + int hcode2 = exp2.hashCode(); + + if (hcode1 != hcode2) { + buf.append("Expressions " + e1str + " and " + e2str + " are " + "equal, but their" + NLINE); + buf.append("hashcodes aren't the same." + NLINE); + buf.append("Hashcode for " + e1str + ": " + hcode1 + NLINE); + buf.append("Hashcode for " + e2str + ": " + hcode2 + NLINE); + return false; + } + } + + return true; + } + + public static boolean expressionSerializableTest(Expression exp, StringBuffer buf) { + + ObjectOutputStream out = null; + ObjectInputStream in = null; + Expression desexp = null; + ByteArrayOutputStream bos = null; + + // Serialize the Expression. + try { + bos = new ByteArrayOutputStream(); + out = new ObjectOutputStream(bos); + out.writeObject(exp); + } catch (IOException ioe) { + buf.append("Failed to serialize the Expression!" + NLINE + ioe.toString()); + return false; + } finally { + if (out != null) { + try { + out.close(); + } catch (Exception close) { + // Do not fail the test if close does not happen. + } + } + } + + // Deserialize the Expression. + try { + byte[] byteBuf = bos.toByteArray(); + in = new ObjectInputStream(new ByteArrayInputStream(byteBuf)); + desexp = (Expression) in.readObject(); + } catch (IOException ioe) { + buf.append("Failed to deserialize the Expression!" + NLINE + ioe.toString()); + return false; + } catch (ClassNotFoundException cnfe) { + buf.append("Could not find class of serialized Expression" + NLINE + cnfe.toString()); + return false; + } finally { + if (in != null) { + try { + in.close(); + } catch (Exception close) { + // Do not fail the test if close does not happen. + } + } + } + + // Test Expression After Serialization + if (!equalsTest(desexp, exp, buf)) { + buf.append("'getExpressionString' after serialization took " + "place." + NLINE + "Expected: " + exp.getExpressionString() + + NLINE + "Received: " + desexp.getExpressionString() + NLINE); + return false; + } + + return true; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java new file mode 100644 index 0000000000..6892469850 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/BarELResolver.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2018, 2020 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.el.api.resolver; + +import java.util.Iterator; + +import jakarta.el.ELContext; +import jakarta.el.ELException; +import jakarta.el.ELResolver; +import jakarta.el.PropertyNotWritableException; + +public class BarELResolver extends ELResolver { + + public Object getValue(ELContext context, Object base, Object property) throws ELException { + Object result = null; + if (context == null) + throw new NullPointerException(); + + if (base == null) { + // Resolving first variable (e.g. ${Bar}). + // We only handle "Bar" + String propertyName = (String) property; + if (propertyName.equals("Bar")) { + result = "Foo"; + context.setPropertyResolved(true); + } + } + return result; + } + + public Class getType(ELContext context, Object base, Object property) throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base == null && property instanceof String && property.toString().equals("Bar")) { + context.setPropertyResolved(true); + } + + // we never set a value + return null; + } + + public void setValue(ELContext context, Object base, Object property, + + Object value) throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base == null && property instanceof String && property.toString().equals("Bar")) { + context.setPropertyResolved(true); + throw new PropertyNotWritableException(); + } + } + + public boolean isReadOnly(ELContext context, Object base, Object property) throws ELException { + if (context == null) + throw new NullPointerException(); + + if (base == null && property instanceof String && property.toString().equals("Bar")) { + context.setPropertyResolved(true); + } + + return true; + } + + public Iterator getFeatureDescriptors(ELContext context, Object base) { + if (context == null) + throw new NullPointerException(); + return null; + } + + public Class getCommonPropertyType(ELContext context, Object base) { + if (context == null) + throw new NullPointerException(); + + if (base == null) + return String.class; + return null; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java new file mode 100644 index 0000000000..17350d4fd5 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/el/api/resolver/ResolverTest.java @@ -0,0 +1,488 @@ +/* + * Copyright (c) 2009, 2024 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.el.api.resolver; + +import java.util.Objects; + +import jakarta.el.BeanELResolver; +import jakarta.el.CompositeELResolver; +import jakarta.el.ELContext; +import jakarta.el.ELResolver; +import jakarta.el.MethodNotFoundException; +import jakarta.el.PropertyNotFoundException; +import jakarta.el.PropertyNotWritableException; + +public class ResolverTest { + private static final String NL = System.getProperty("line.separator", "\n"); + + /** + * Private as this class will only have static methods and members. + */ + private ResolverTest() { + } + + public static boolean testCompositeELResolver(ELContext elContext, CompositeELResolver compResolver, StringBuffer buf) { + + boolean pass = true; + + // add() + BarELResolver barResolver = new BarELResolver(); + try { + compResolver.add(barResolver); + buf.append("add() tested successfully" + NL); + + } catch (Exception e) { + buf.append("add() method Test Failed"); + pass = false; + } + + // setValue() + elContext.setPropertyResolved(false); + compResolver.setValue(elContext, null, "Nothing", "rien"); + if (!elContext.isPropertyResolved()) { + buf.append("setValue() tested successfully on non-existent " + "property" + NL); + } else { + buf.append("setValue() set property resolved on non-existent " + "property" + NL); + pass = false; + } + + elContext.setPropertyResolved(false); + try { + compResolver.setValue(elContext, null, "Bar", "rien"); + pass = false; + } catch (PropertyNotWritableException pnwe) { + buf.append("setValue() tested successfully on non-writable " + "property" + NL); + buf.append("PropertyNotWritableException caught as expected" + NL); + } + + // getValue() + elContext.setPropertyResolved(false); + String result = (String) compResolver.getValue(elContext, null, "Bar"); + if (!elContext.isPropertyResolved()) { + buf.append("getValue() did not resolve" + NL); + pass = false; + } else if (!result.equals("Foo")) { + buf.append("Invalid value from BarELResolver: " + result + NL); + pass = false; + } else { + buf.append("getValue() tested successfully" + NL); + } + + // getType() + elContext.setPropertyResolved(false); + Class type = compResolver.getType(elContext, null, "Bar"); + if (!elContext.isPropertyResolved()) { + buf.append("getType() did not resolve" + NL); + pass = false; + } else if (type != null) { + buf.append("getType() returns " + type.getName() + NL); + buf.append("not expected result for non-writable property" + NL); + pass = false; + } else { + buf.append("getType() returns null as expected for non-writable " + "property" + NL); + } + + // isReadOnly + elContext.setPropertyResolved(false); + boolean nonWritable = compResolver.isReadOnly(elContext, null, "Bar"); + if (!elContext.isPropertyResolved()) { + buf.append("isReadOnly() did not resolve" + NL); + pass = false; + } else if (!nonWritable) { + buf.append("isReadOnly() did not return true" + NL); + pass = false; + } else { + buf.append("isReadOnly() returns true as expected" + NL); + } + + // getCommonPropertyType() + elContext.setPropertyResolved(false); + Class commonPropertyType = (compResolver.getCommonPropertyType(elContext, null)); + buf.append("getCommonPropertyType() returns "); + buf.append(commonPropertyType.getName() + NL); + + return pass; + } + + public static boolean testELResolver(ELContext elContext, ELResolver resolver, Object base, Object property, Object value, + StringBuffer buf, boolean readOnly) { + + boolean pass = true; + + // setValue() + elContext.setPropertyResolved(false); + try { + resolver.setValue(elContext, base, property, value); + if (readOnly) { + buf.append("setValue() failed on non-writable property"); + pass = false; + } else { + buf.append("setValue() tested successfully on writable " + "property" + NL); + } + + } catch (PropertyNotWritableException pnwe) { + if (readOnly) { + buf.append("setValue() tested successfully on non-writable " + "property" + NL); + buf.append("PropertyNotWritableException caught as expected" + NL); + } else { + buf.append("setValue() failed on non-writable property" + NL); + buf.append("Unexpected PropertyNotWritableException caught" + NL); + pass = false; + } + } + + // getValue() + elContext.setPropertyResolved(false); + Object valueRetrieved = resolver.getValue(elContext, base, property); + if (!elContext.isPropertyResolved()) { + buf.append("getValue() did not resolve" + NL); + pass = false; + } + + if (!readOnly && !Objects.equals(valueRetrieved, value)) { + if (valueRetrieved == null) { + buf.append("null value returned from getValue() method call!" + NL); + pass = false; + } else { + buf.append("Invalid value from getValue():" + NL); + buf.append("Value expected: " + value.toString() + NL); + buf.append("Value retrieved: " + valueRetrieved.toString() + NL); + pass = false; + } + } else { + buf.append("getValue() tested successfully" + NL); + if (!readOnly) { + buf.append("Value expected: " + value.toString() + NL); + buf.append("Value retrieved: " + valueRetrieved.toString() + NL); + } + } + + // getType() + elContext.setPropertyResolved(false); + Class type = resolver.getType(elContext, base, property); + if (!elContext.isPropertyResolved()) { + buf.append("getType() did not resolve" + NL); + pass = false; + } else if (type != null) { + buf.append("getType() returns " + type.getName() + NL); + if (readOnly) { + buf.append("result not expected!" + NL); + pass = false; + } else { + buf.append("non-null as expected" + NL); + } + } else { + buf.append("getType() returns null " + NL); + if (!readOnly) { + buf.append("result not expected!" + NL); + pass = false; + } else { + buf.append("as expected" + NL); + } + } + + // isReadOnly + elContext.setPropertyResolved(false); + boolean nonWritable = resolver.isReadOnly(elContext, base, property); + if (!elContext.isPropertyResolved()) { + buf.append("isReadOnly() did not resolve" + NL); + pass = false; + } else if (nonWritable != readOnly) { + buf.append("isReadOnly() returned unexpected value: " + nonWritable + NL); + pass = false; + } else { + buf.append("isReadOnly() returns " + readOnly + " as expected" + NL); + } + + // getCommonPropertyType() + elContext.setPropertyResolved(false); + Class commonPropertyType = (resolver.getCommonPropertyType(elContext, base)); + buf.append("getCommonPropertyType() returns "); + buf.append(commonPropertyType.getName() + "" + NL); + + return pass; + } + + /** + * Test the ELResolver.invoke() mthod. + * + * @param elContext - elContext + * @param resolver - el Resolver to be tested. + * @param beanName - The javabean to be used. + * @param methodName - The method in the javabean to call. + * @param types - The @class types of the aurgs for the method. + * @param values - The args that you want to pass into the method. + * @param negTest - Is this a negetive test or not(true, false). + * @param buf - String buffer used to capture loggig info. + * @return + */ + public static boolean testELResolverInvoke(ELContext elContext, ELResolver resolver, Object beanName, Object methodName, + Class[] types, Object[] values, Boolean negTest, StringBuffer buf) { + + boolean pass = true; + + // invoke + elContext.setPropertyResolved(false); + try { + Boolean nameMatch = (Boolean) resolver.invoke(elContext, beanName, methodName, types, values); + + if (!nameMatch.booleanValue()) { + buf.append("invoke() did not Run properly." + NL); + pass = false; + } + + } catch (MethodNotFoundException mnfe) { + if (negTest.booleanValue()) { + buf.append("Test Passed invoke() threw MethodNotFoundException"); + } else { + pass = false; + mnfe.printStackTrace(); + } + } catch (Exception e) { + pass = false; + e.printStackTrace(); + } + + return pass; + } + + // --- Start Negative Method Tests --- + public static boolean testELResolverNPE(ELResolver resolver, Object base, Object property, Object value, StringBuffer buf) { + + boolean pass = true; + + // getType() + try { + resolver.getType(null, base, property); + pass = false; + buf.append("getType test failed with: " + NL + "EXPECTED: NullPointerException to be thrown " + NL + + "RECEIVED: NO EXCEPTION THROWN AT ALL! " + NL); + } catch (Exception e) { + if (!(e instanceof NullPointerException)) { + buf.append("getType test failed with: " + NL + "EXPECTED: " + "NullPointerException to be thrown " + NL + "RECEIVED: " + + e.toString() + NL); + pass = false; + + } else { + buf.append("getType() test Passed: throws " + "NullPointerException as expected " + NL); + } + } + + // getValue + try { + resolver.getValue(null, base, property); + buf.append("Test Failed getValue() did not throw any exception." + NL + "Expected: NullPointerException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof NullPointerException)) { + buf.append("Test Failed getValue() threw the wrong exception " + NL + "Expected: NullPointerException " + NL + "Received: " + + e.toString()); + + pass = false; + } else { + buf.append("Test Passed getValue() threw NullPointerException " + NL); + } + } + + // setValue() + try { + resolver.setValue(null, base, property, value); + buf.append("Test Failed setValue() did not throw any exception." + NL + "Expected: NullPointerException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof NullPointerException)) { + buf.append("Test Failed setValue() threw the wrong exception " + NL + "Expected: NullPointerException " + NL + "Received: " + + e.toString()); + + pass = false; + } else { + buf.append("Test Passed setValue() threw NullPointerException " + NL); + } + } + + // isReadOnly() + try { + resolver.isReadOnly(null, base, property); + buf.append("Test Failed isReadOnly() did not throw any exception." + NL + "Expected: NullPointerException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof NullPointerException)) { + buf.append("Test Failed isReadOnly() threw the wrong exception " + NL + "Expected: NullPointerException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed isReadOnly() NullPointerException " + "thrown " + NL); + } + } + + return pass; + } + + public static boolean testELResolverPNFE(ELContext elcontext, ELResolver resolver, Object base, Object property, StringBuffer buf) { + + boolean pass = true; + + // getType() + try { + resolver.getType(elcontext, base, property); + buf.append("Test Failed getType() did not throw any exception." + NL + "Expected: PropertyNotFoundException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof PropertyNotFoundException)) { + buf.append("Test Failed getType() threw the wrong exception " + NL + "Expected: PropertyNotFoundException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed getType() threw " + "PropertyNotFoundException " + NL); + } + } + + // isReadOnly() + try { + resolver.isReadOnly(elcontext, base, property); + buf.append("Test Failed isReadOnly() did not throw any exception." + NL + "Expected: PropertyNotFoundException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof PropertyNotFoundException)) { + buf.append("Test Failed isReadOnly() threw the wrong exception " + NL + "Expected: PropertyNotFoundException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed isReadOnly() threw " + "PropertyNotFoundException " + NL); + } + } + + // setValue() + try { + resolver.setValue(elcontext, base, property, "arbitrary value"); + buf.append("Test Failed setValue() did not throw any exception." + NL + "Expected: PropertyNotFoundException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof PropertyNotFoundException)) { + buf.append("Test Failed setValue() threw the wrong exception " + NL + "Expected: PropertyNotFoundException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed setValue() threw " + "PropertyNotFoundException " + NL); + } + } + + if (!(resolver instanceof BeanELResolver)) { + return pass; + } + + // getValue() + try { + resolver.getValue(elcontext, base, property); + buf.append("Test Failed getValue() did not throw any exception." + NL + "Expected: PropertyNotFoundException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof PropertyNotFoundException)) { + buf.append("Test Failed getValue() threw the wrong exception " + NL + "Expected: PropertyNotFoundException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed getValue() threw " + "PropertyNotFoundException " + NL); + } + } + + return pass; + } + + public static boolean testELResolverIAE(ELContext elcontext, ELResolver resolver, Object base, Object property, Object value, + StringBuffer buf) { + + boolean pass = true; + + // getValue() + try { + resolver.getValue(elcontext, base, value); + buf.append("Test Failed getValue() did not throw any exception." + NL + "Expected: IllegalArgumentException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof IllegalArgumentException)) { + buf.append("Test Failed getValue() threw the wrong exception " + NL + "Expected: IllegalArgumentException " + NL + + "Received: " + e.toString()); + + pass = false; + } else { + buf.append("Test Passed getValue() threw " + "IllegalArgumentException " + NL); + } + } + + // setValue() + try { + resolver.setValue(elcontext, base, property, value); + buf.append("Test Failed setValue() did not throw any exception." + NL + "Expected: IllegalArgumentException " + NL); + + pass = false; + } catch (Exception e) { + if (!(e instanceof IllegalArgumentException)) { + buf.append("Test Failed setValue() threw the wrong exception " + "Expected: IllegalArgumentException " + NL + "Received: " + + e.toString()); + + pass = false; + } else { + buf.append("Test Passed setValue() threw " + "IllegalArgumentException " + NL); + } + } + + return pass; + } + + public static boolean testELResolverPNWE(ELContext elcontext, ELResolver resolver, Object base, Object property, Object value, + StringBuffer buf) { + + boolean pass = true; + + // setValue() + try { + resolver.setValue(elcontext, base, property, value); + buf.append("Test Failed setValue() did not throw any exception." + NL + "Expected: PropertyNotWritableException " + NL); + pass = false; + + } catch (Exception e) { + if (!(e instanceof PropertyNotWritableException)) { + buf.append("Test Failed setValue() threw the wrong exception " + NL + "Expected: PropertyNotWritableException " + NL + + "Received: " + e.toString()); + pass = false; + + } else { + buf.append("Test Passed setValue() threw " + "PropertyNotWritableException " + NL); + } + } + + return pass; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java b/tools/common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java similarity index 58% rename from common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java rename to tools/common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java index bfae99eec4..3eec452a1e 100644 --- a/common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/el/spec/Book.java @@ -26,38 +26,38 @@ public class Book { - private String title; + private String title; - private String authors; + private String authors; - private String publisher; + private String publisher; - private int year; + private int year; - public Book(String title, String authors, String publisher, int year) { - this.title = title; - this.authors = authors; - this.publisher = publisher; - this.year = year; - } + public Book(String title, String authors, String publisher, int year) { + this.title = title; + this.authors = authors; + this.publisher = publisher; + this.year = year; + } - public String getTitle() { - return title; - } + public String getTitle() { + return title; + } - public String getAuthors() { - return authors; - } + public String getAuthors() { + return authors; + } - public String getPublisher() { - return publisher; - } + public String getPublisher() { + return publisher; + } - public int getYear() { - return year; - } + public int getYear() { + return year; + } - public String toString() { - return getTitle(); - } + public String toString() { + return getTitle(); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/README b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/README similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/jspservletsec/README rename to tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/README diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java new file mode 100644 index 0000000000..46cfabf3b9 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/SecBasicClient.java @@ -0,0 +1,412 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates and others. + * All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.jspservletsec; + +import java.util.Properties; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.webclient.BaseUrlClient; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class SecBasicClient extends BaseUrlClient { + + private static final Logger lOGGER = LoggerFactory.getLogger(SecBasicClient.class); + + // Constants: + private static final String USERNAME = "user"; + + private static final String PASSWORD = "password"; + + private static final String UNAUTH_USERNAME = "authuser"; + + private static final String UNAUTH_PASSWORD = "authpassword"; + + private static final String CLASS_TRACE_HEADER = "[SecBasicClient]: "; + + private static final String USER_PRINCIPAL_SEARCH = "The user principal is: "; // (+username) + + private static final String REMOTE_USER_SEARCH = "getRemoteUser(): "; // (+username) + + // fields: + protected String pageSec = null; + + protected String pageGuest = null; + + protected String pageUnprotected = null; + + protected String pageRoleReverse = null; + + private String pageJspBase = "/jsp_sec_secbasic_web"; + + private String pageJspSec = pageJspBase + "/jspSec.jsp"; + + private String pageJspGuest = pageJspBase + "/guestPage.jsp"; + + private String pageJspUnprotected = pageJspBase + "/unprotected.jsp"; + + private String pageJspRoleReverse = pageJspBase + "/rolereverse.jsp"; + + private String pageServletBase = "/servlet_sec_secbasic_web"; + + private String pageServletSec = pageServletBase + "/ServletSecTest"; + + private String pageServletGuest = pageServletBase + "/GuestPageTest"; + + private String pageServletUnprotected = pageServletBase + "/UnProtectedTest"; + + private String pageServletRoleReverse = pageServletBase + "/RoleReverseTest"; + + private String username = null; + + private String password = null; + + private String unauthUsername = null; + + private String unauthPassword = null; + + /* + * @class.setup_props: webServerHost; webServerPort; user; password; authuser; authpassword; ts_home; + * + * + */ + // Note:Based on the input argument setup will intialize JSP or servlet pages + + public void setup(String[] args, Properties p) throws Exception { + super.setup(args, p); + + try { + username = TestUtil.getProperty(p, USERNAME); + password = TestUtil.getProperty(p, PASSWORD); + unauthUsername = TestUtil.getProperty(p, UNAUTH_USERNAME); + unauthPassword = TestUtil.getProperty(p, UNAUTH_PASSWORD); + + if (args[0].equals("jsp")) { + pageSec = pageJspSec; + pageGuest = pageJspGuest; + pageUnprotected = pageJspUnprotected; + pageRoleReverse = pageJspRoleReverse; + + } else { + pageSec = pageServletSec; + pageGuest = pageServletGuest; + pageUnprotected = pageServletUnprotected; + pageRoleReverse = pageServletRoleReverse; + + } + } catch (Exception e) { + lOGGER.error("Error: got exception: ", e); + } + } + + /* + * testName: test1 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource, the web server requests + * authentication. + * + * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive authentication request. + */ + + public void test1() throws Exception { + logMessage("Sending request to validate presence of www-authenticate header..."); + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test1"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); + TEST_PROPS.setProperty(EXPECTED_HEADERS, "www-authenticate:"); + TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED); + invoke(); + + dumpResponse(); // debug aid + + logMessage("Authentication requested"); + } + + /* + * testName: test2 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. Also tests API + * assertions in section 11.3. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource, and user enters a valid + * username and password, the original web resource is returned and user is authenticated. 2. getRemoteUser() returns + * the user name that the client authenticated with. + * + * @test_Strategy: 1. Send request with correct authentication. 2. Receive page (ensure principal is correct, and ensure + * that getRemoteUser() returns the correct name) + */ + + public void test2() throws Exception { + logMessage("Sending request with Authroization header..."); + + StringBuffer sb = new StringBuffer(100); + sb.append(USER_PRINCIPAL_SEARCH).append(username).append("|"); + sb.append(REMOTE_USER_SEARCH).append(username).append("|"); + sb.append("isUserInRole(\"ADM\"): !true!").append("|"); + sb.append("isUserInRole(\"MGR\"): !false!").append("|"); + sb.append("isUserInRole(\"VP\"): !false!").append("|"); + sb.append("isUserInRole(\"EMP\"): !true!").append("|"); + + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test2"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); + TEST_PROPS.setProperty(BASIC_AUTH_USER, username); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); + TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); + invoke(); + + dumpResponse(); // debug aid + + logMessage("isUserInRole() and getRemoteUser() returned expected results"); + } + + /* + * testName: test3 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource, and user enters an + * invalid username and password, the container denies access to the web resource. + * + * @test_Strategy: 1. Re-send request with incorrect authentication. 2. Receive authentication request. + */ + + public void test3() throws Exception { + logMessage("Sending an request for a protected resource with invalid username/password..."); + + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test3"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); + TEST_PROPS.setProperty(BASIC_AUTH_USER, "invalid"); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); + TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED); + invoke(); + + dumpResponse(); // debug aid + + logMessage("Access Denied"); + } + + /* + * testName: test4 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource, and user enters an valid + * username and password, but for a role that is not authorized to access the resource, the container denies access to + * the web resource. + * + * @test_Strategy: 1. Send request with correct authentication for user javajoe for a page javajoe is allowed to access. + * 2. Receive page (this verifies that the javajoe user is set up properly). 3. Send request with correct + * authentication, but incorrect authorization to access resource 4. Receive error + */ + + public void test4() throws Exception { + + StringBuffer sb = new StringBuffer(100); + sb.append(USER_PRINCIPAL_SEARCH).append(unauthUsername); + + logMessage("Sending request to resource the user has access to..."); + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test4"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageGuest)); + TEST_PROPS.setProperty(BASIC_AUTH_USER, unauthUsername); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, unauthPassword); + TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); + invoke(); + + dumpResponse(); // debug aid + + logMessage("User successfully accessed the resource"); + + logMessage("Sending request to resource with valid username/password, but not the right roles..."); + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test4"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec)); + TEST_PROPS.setProperty(BASIC_AUTH_USER, unauthUsername); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, unauthPassword); + TEST_PROPS.setProperty(STATUS_CODE, FORBIDDEN); + invoke(); + + dumpResponse(); // debug aid + + logMessage("Access Forbidden"); + } + + /* + * testName: test5 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. Also tests + * assertions in section 11.3. + * + * 1. If user has not been authenticated and user attempts to access an unprotected web resource, the web resource is + * returned without need to authenticate. 2. isUserInRole() must return false for any valid or invalid role reference. + * 3. getRemoteUser() must return false + * + * @test_Strategy: 1. Send request for unprotected.jsp with no authentication. 2. Receive page 3. Search the returned + * page for "!true!", which would indicate that at least one call to isUserInRole attempted by unprotected.jsp returned + * true. 4. check that getRemoteUser() returns null. + */ + + public void test5() throws Exception { + StringBuffer sb = new StringBuffer(100); + sb.append(USER_PRINCIPAL_SEARCH).append("|"); + sb.append(REMOTE_USER_SEARCH).append("null"); + + logMessage("Sending request to unprotected resource...."); + TEST_PROPS.setProperty(TEST_NAME, "BasicSec/Test5"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageUnprotected)); + TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); + TEST_PROPS.setProperty(UNEXPECTED_RESPONSE_MATCH, "!true!"); + invoke(); + + dumpResponse(); // debug aid + + logMessage("isUserInRole() and getRemoteUser() returned expected results"); + } + + /* + * testName: test6 + * + * @assertion: Test HTTP-Basic authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. Also tests + * assertions from section 11.3. + * + * Given two servlets in the same application, each of which calls isUserInRole(X), and where X is linked to different + * roles in the scope of each of the servlets (i.e. R1 for servlet 1 and R2 for servlet 2), then a user whose identity + * is mapped to R1 but not R2, shall get a true return value from isUserInRole( X ) in servlet 1, and a false return + * value from servlet 2 (a user whose identity is mapped to R2 but not R1 should get the inverse set of return values). + * + * @test_Strategy: Since test1 already verifies the functionality for isUserInRole returning true, this test needs only + * verify that it should return false for the other jsp. For this test, MGR and ADM are swapped, so isUserInRole() + * should return opposite values from test1. + * + * 1. Send request to access rolereverse.jsp 2. Receive redirect to login page, extract location and session id cookie. + * 3. Send request to access new location, send cookie 4. Receive login page 5. Send form response with username and + * password 6. Receive redirect to resource 7. Request resource 8. Receive resource (check isUserInRole for all known + * roles) + */ + public void test6() throws Exception { + + StringBuffer sb = new StringBuffer(100); + sb.append(USER_PRINCIPAL_SEARCH).append(username).append("|"); + sb.append("isUserInRole(\"ADM\"): !false!").append("|"); + sb.append("isUserInRole(\"MGR\"): !true!").append("|"); + sb.append("isUserInRole(\"VP\"): !false!").append("|"); + sb.append("isUserInRole(\"EMP\"): !true!").append("|"); + + logMessage("Sending request to validate isUserInRole with roles reversed..."); + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test6"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageRoleReverse)); + TEST_PROPS.setProperty(BASIC_AUTH_USER, username); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); + TEST_PROPS.setProperty(SEARCH_STRING, sb.toString()); + invoke(); + + dumpResponse(); // debug aid + + logMessage("isUserInRole() and getRemoteUser() returned expected results"); + } + + /* + * testName: test7 + * + * @assertion: Test BASIC authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.1. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource+ , and + * user enters an invalid username and password, the container denies access to the web resource. IMPORTANT: this is not + * just trying to access a protected resource but instead is trying to access pageSec + "/j_security_check" when + * unauthenticated in an attempt to trick/confuse the impl into thinking authentication occurred when it did not. + * + * @test_Strategy: 1. send request with incorrect authentication to url + "/j_security_check" 2. Receive authentication + * request. + */ + public void test7() throws Exception { + logMessage("Sending an request for a protected resource with invalid username/password..."); + + TEST_PROPS.setProperty(TEST_NAME, "SecBasic/Test7"); + TEST_PROPS.setProperty(REQUEST, getRequestLine("GET", pageSec + "/j_security_check")); + TEST_PROPS.setProperty(BASIC_AUTH_USER, "invalid"); + TEST_PROPS.setProperty(BASIC_AUTH_PASSWD, password); + // The servlet is mapped to "/ServletSecTest" so this request should result + // in a 404 since no Servlet is mapped to the requested URI or 401 if the container + // rejects the incoming BASIC header. + TEST_PROPS.setProperty(STATUS_CODE, UNAUTHORIZED + "," + NOT_FOUND); + invoke(); + + dumpResponse(); // debug aid + + if ((_testCase != null) && (_testCase.getResponse() != null)) { + // we got a response so lets check it... + // if our search string appears in the response, we were erroneously + // allowed access to a protected page! + String searchString = "Inside ServletSecTestServlet"; + try { + if (_testCase.getResponse().getResponseBodyAsString().indexOf(searchString) != -1) { + // ohoh - we should NOT have been allowed to access the page and it + // appears we did access it. log an error + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test7 failed."); + } + } catch (Exception ex) { + // must've had problem getting response so dump exception but continue + // on + ex.printStackTrace(); + } + } + + logMessage("Access properly Denied"); + } + + /** + * Returns a valid HTTP/1.1 request line. + * + * @param method the request method + * @param path the request path + * @return a valid HTTP/1.1 request line + */ + private static String getRequestLine(String method, String path) { + return method + " " + path + " HTTP/1.1"; + } + + /** + * Simple wrapper around TestUtil.logMessage(). + * + * @param message - the message to log + */ + private static void logMessage(String message) { + TestUtil.logMsg(CLASS_TRACE_HEADER + message); + } + + /** + * Simple wrapper around TestUtil.logTrace(). + * + * @param message - the message to log + */ + private static void trace(String message) { + TestUtil.logTrace(CLASS_TRACE_HEADER + message); + } + + private void dumpResponse() { + try { + if ((_testCase != null) && (_testCase.getResponse() != null)) { + trace(_testCase.getResponse().getResponseBodyAsString()); + } + } catch (Exception ex) { + // must've had problem getting response so dump exception but continue on + ex.printStackTrace(); + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/jspservletsec/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/jspservletsec/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java new file mode 100644 index 0000000000..a4026910eb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/jspservletsec/secformClient.java @@ -0,0 +1,2105 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.jspservletsec; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; +import java.net.ConnectException; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.Socket; +import java.net.URL; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import java.util.Properties; +import java.util.StringTokenizer; + +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.porting.TSURL; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.lib.util.WebUtil; +import com.sun.ts.lib.util.WebUtil.Response; + +public class secformClient extends EETest { + // Configurable constants: + + private String protocol = "http"; + + private String hostname = null; + + private int portnum = 0; + + protected String pageBase = null; + + protected String pageSec = null; + + protected String pageGuest = null; + + protected String pageRoleReverse = null; + + protected String pageUnprotected = null; + + private String pageProgAuthen = null; + + private String pageProgLogin = null; + + private String pageProgLogout = null; + + private String pageOne = null; + + private String pageTwo = null; + + private String pageSample = null; + + private String pageallRoles = null; + + // common for JSP and Servlet + private String pageLogin = "/login.jsp"; + + private String pageError = "/error.jsp"; + + private String pageSecurityCheck = "/j_security_check"; + + private String pageJspBase = "/jsp_sec_secform_web"; + + private String pageJspSec = pageJspBase + "/jspSec.jsp"; + + private String pageJspUnprotected = pageJspBase + "/unprotected.jsp"; + + private String pageJspGuest = pageJspBase + "/guestPage.jsp"; + + private String pageJspRoleReverse = pageJspBase + "/rolereverse.jsp"; + + private String pageJspOne = pageJspBase + "/One.jsp"; + + private String pageJspTwo = pageJspBase + "/Two.jsp"; + + private String pageJspSample = pageJspBase + "/Sample.jsp"; + + private String pageJspallRoles = pageJspBase + "/allRoles.jsp"; + + private String pageServletBase = "/servlet_sec_secform_web"; + + private String pageServletSec = pageServletBase + "/ServletSecTest"; + + private String pageServletUnprotected = pageServletBase + "/UnProtectedTest"; + + private String pageServletProgLogin = pageServletBase + "/ServletProgrammaticLogin"; + + private String pageServletProgLogout = pageServletBase + "/ServletProgrammaticLogout"; + + private String pageServletProgAuthen = pageServletBase + "/ServletProgrammaticAuthen"; + + private String pageServletGuest = pageServletBase + "/GuestPageTest"; + + private String pageServletRoleReverse = pageServletBase + "/RoleReverseTest"; + + private String pageServletOne = pageServletBase + "/OneTest"; + + private String pageServletTwo = pageServletBase + "/TwoTest"; + + private String pageServletSample = pageServletBase + "/SampleTest"; + + private String pageServletallRoles = pageServletBase + "/allRolesTest"; + + private String searchFor = "The user principal is: "; // (+username) + + private String searchForGetRemoteUser = "getRemoteUser(): "; // (+username) + + private String username = ""; + + private String password = ""; + + private String unauthUsername = ""; + + private String unauthPassword = ""; + + private String tshome = ""; + + // Constants: + private final String WebHostProp = "webServerHost"; + + private final String WebPortProp = "webServerPort"; + + private final String UserNameProp = "user"; + + private final String PasswordProp = "password"; + + private final String unauthUserNameProp = "authuser"; + + private final String unauthPasswordProp = "authpassword"; + + private final String tsHomeProp = "ts_home"; + + private String testDir = System.getProperty("user.dir"); + + // Shared test variables: + private Properties props = null; + + private String request = null; + + private WebUtil.Response response = null; + + private WebUtil.Response loginPageRequestResponse = null; + + private WebUtil.Response errorPageRequestResponse = null; + + private Hashtable cookies = null; + + private TSURL tsurl = new TSURL(); + + /* + * @class.setup_props: webServerHost; webServerPort; user; password; authuser; authpassword; ts_home; + */ + public void setup(String[] args, Properties p) throws Exception { + props = p; + + try { + hostname = TestUtil.getProperty(p, WebHostProp); + portnum = Integer.parseInt(TestUtil.getProperty(p, WebPortProp)); + username = TestUtil.getProperty(p, UserNameProp); + password = TestUtil.getProperty(p, PasswordProp); + unauthUsername = TestUtil.getProperty(p, unauthUserNameProp); + unauthPassword = TestUtil.getProperty(p, unauthPasswordProp); + tshome = TestUtil.getProperty(p, tsHomeProp); + + TestUtil.logMsg("username: " + username); + TestUtil.logMsg("password: " + password); + + if (args[0].equals("jsp")) { + pageBase = pageJspBase; + pageSec = pageJspSec; + pageGuest = pageJspGuest; + pageUnprotected = pageJspUnprotected; + pageRoleReverse = pageJspRoleReverse; + pageOne = pageJspOne; + pageTwo = pageJspTwo; + pageSample = pageJspSample; + pageallRoles = pageJspallRoles; + + // prefix pageJspBase to pageLogin, pageError ,pageSecurityCheck + pageLogin = pageJspBase + pageLogin; + pageError = pageJspBase + pageError; + pageSecurityCheck = pageJspBase + pageSecurityCheck; + + } else { + pageBase = pageServletBase; + pageSec = pageServletSec; + pageGuest = pageServletGuest; + pageUnprotected = pageServletUnprotected; + pageRoleReverse = pageServletRoleReverse; + pageOne = pageServletOne; + pageTwo = pageServletTwo; + pageSample = pageServletSample; + pageallRoles = pageServletallRoles; + pageProgLogin = pageServletProgLogin; + pageProgLogout = pageServletProgLogout; + pageProgAuthen = pageServletProgAuthen; + + // prefix pageServletBase to pageLogin, pageError, pageSecurityCheck + pageLogin = pageServletBase + pageLogin; + pageError = pageServletBase + pageError; + pageSecurityCheck = pageServletBase + pageSecurityCheck; + + } + + } catch (Exception e) { + logErr("Error: got exception: ", e); + } + } + + /* + * testName: test1 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. Also tests + * an assertion in section 11.3. + * + * 1. If user has not been authenticated and user attempts to access a protected web resource, the correct login form is + * returned. 2. If user has not been authenticated and user attempts to access a protected web resource, and user enters + * a valid username and password, the original web resource is returned and user is authenticated. A call to + * getRemoteUser() must return the username. 3. If user has been authenticated and user is authorized to access a + * protected web resource, user gets web resource without the need to re-authenticate. A call to getRemoteUser() still + * returns the username. + * + * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login page(make sure it the expected login page) 3. + * Send form response with username and password 4. Receive jspSec.jsp (ensure principal is correct, and ensure + * getRemoteUser() returns the username, and ensure isUserInRole() is working properly) 5. Re-request jspSec.jsp 6. + * Ensure principal is still correct and getRemoteUser() still returns the correct username. Also ensure isUserInRole() + * is still working properly. + */ + public void test1() throws Exception { + try { + // The first part of this test is used in test2 and test3 as + // well, so the code has been moved to a helper method. + requestAndGetLoginPage(pageSec, 1); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + TestUtil.logMsg("response.statusToken:" + response.statusToken); + TestUtil.logMsg("response.content:" + response.content); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test1 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 1); + + // Print response content + TestUtil.logMsg("received response content 1: " + response.content); + + // Check to make sure we are authenticated by checking the page + // content. The jsp should output "The user principal is: j2ee" + String searchString = searchFor + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("User Principal correct."); + + // Check to make sure getRemoteUser returns the user name. + searchString = searchForGetRemoteUser + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("getRemoteUser() did not return " + username + ":"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("getRemoteUser() correct."); + + // Check to make sure isUserInRole is working properly: + Hashtable roleCheck = new Hashtable(); + roleCheck.put("ADM", Boolean.TRUE); + roleCheck.put("MGR", Boolean.FALSE); + roleCheck.put("VP", Boolean.FALSE); + roleCheck.put("EMP", Boolean.TRUE); + // roleCheck.put( "Administrator", new Boolean( false ) ); + if (!checkRoles(response.content, roleCheck)) { + TestUtil.logErr("isUserInRole() does not work correctly."); + TestUtil.logErr("Page Received:"); + TestUtil.logErr(response.content); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("isUserInRole() correct."); + + // Now that we are authenticated, try accessing the resource again + // to ensure we need not go through the login page again. + request = pageSec; + TestUtil.logMsg("Cookies =" + cookies.toString()); + TestUtil.logMsg("Re-sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + pageSec); + throw new Exception("test1 failed."); + } + + // Check to make sure we are still authenticated. + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("User Principal still correct."); + + // Check to make sure getRemoteUser still returns the user name. + searchString = searchForGetRemoteUser + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("getRemoteUser() did not return " + username + " after lazy authentication:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("getRemoteUser() still correct."); + + // Check to make sure isUserInRole is still working properly: + if (!checkRoles(response.content, roleCheck)) { + TestUtil.logErr("isUserInRole() does not work correctly."); + TestUtil.logErr("Page Received:"); + TestUtil.logErr(response.content); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("isUserInRole() still correct."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test1 failed: ", e); + } + } + + /* + * testName: test2 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. + * + * If user has not been authenticated and user attempts to access a protected web resource, and user enters incorrect + * username and password, the error page is returned. + * + * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login page 3. Send form response with username and + * incorrect password 4. Receive error page (make sure it is the expected error page) + */ + public void test2() throws Exception { + try { + // The first part of this test is used in test1 and test3 as + // well, so the code has been moved to a helper method. + requestAndGetLoginPage(pageSec, 2); + + // Send response to login form with session id cookie and username + // and incorrect password: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with incorrect login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", "incorrect" + password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + TestUtil.logMsg("response.statusToken:" + response.statusToken); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 2); + + // Check to make sure the user principal is null: + String searchString = searchFor + "null"; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User principal is not null in error page:"); + TestUtil.logErr(response.content); + throw new Exception("test2 failed."); + } + + TestUtil.logMsg("User Principal is null as expected."); + + // Request error page + request = pageError; + TestUtil.logMsg("Sending request \"" + request + "\""); + errorPageRequestResponse = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, + cookies); + + // Check that the page was found (no error). + if (errorPageRequestResponse.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test2 failed."); + } + + // Compare the received error page with the expected error page + // i.e Check whether + // response.content ==errorPageRequestResponse.content + if (response.content.equals(errorPageRequestResponse.content)) { + TestUtil.logMsg("Received the expected error page"); + } else { + TestUtil.logMsg("Received incorrect error page"); + throw new Exception("test2 failed."); + } + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test2 failed: ", e); + } + } + + /* + * testName: test3 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. + * + * If user has not been authenticated and user attempts to access a protected web resource, and user enters correct + * username and password of a user that is authorized to access the resource, the resource is returned (similar to + * test1, but uses user javajoe instead of j2ee). This test establishes that the javajoe user is set up properly. + * + * @test_Strategy: 1. Send request to access guestPage.jsp 2. Receive login page 3. Send form response with + * username(javajoe) and password 4. Receive resource (check user principal) + * + */ + public void test3() throws Exception { + try { + // The first part of this test is used in test2 and test3 as + // well, so the code has been moved to a helper method. + requestAndGetLoginPage(pageGuest, 3); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information (as " + unauthUsername + ")."); + Properties postData = new Properties(); + postData.setProperty("j_username", unauthUsername); + postData.setProperty("j_password", unauthPassword); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test3 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 3); + + // Check to make sure we are authenticated by checking the page + // content. The jsp should output "The user principal is: javajoe" + String searchString = searchFor + unauthUsername; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test3 failed."); + } + TestUtil.logMsg("User Principal correct."); + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test3 failed: ", e); + } + } + + /* + * testName: test4 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. + * + * If user has not been authenticated and user attempts to access a protected web resource, and user enters correct + * username and password of a user that is not authorized to access the resource, the resource is not returned. The + * authenticated user is not denied access to an unprotected page. + * + * @test_Strategy: 1. Send request to access jspSec.jsp 2. Receive login page 3. Send form response with username and + * password 4. Receive an error (expected unauthorized error) 5. Send request to access unprotected.jsp 6. Receive + * unprotected.jsp. + */ + public void test4() throws Exception { + try { + // The first part of this test is used in test1 and test2 as + // well, so the code has been moved to a helper method. + requestAndGetLoginPage(pageSec, 4); + + // Send response to login form with session id cookie and username + // and password: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with correct login information (" + unauthUsername + ")" + + ", but incorrect authorization for this resource."); + Properties postData = new Properties(); + postData.setProperty("j_username", unauthUsername); + postData.setProperty("j_password", unauthPassword); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + TestUtil.logMsg("response.content = " + response.content); + + if (response.statusToken.equals("302")) { + // We should receive a redirection page + if (response.location == null) { + TestUtil.logErr("No redirection to login page received."); + throw new Exception("test4 failed."); + } + + // Extract location from redirection and format new request: + request = WebUtil.getRequestFromURL(response.location); + TestUtil.logMsg("Redirect to: " + response.location); + + // update cookies if the webserver choose to send cookies + addNewCookies(cookies, response.cookies); + + // Request redirected page (login page): + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, request, null, cookies); + } + + // Receive "403" or "404" error code for unauthorized access (forbidden). + if ((response.statusToken.equals("403")) || (response.statusToken.equals("404"))) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected unauthorized access error"); + } else { + TestUtil.logErr("Did not receive error for unauthorized access: " + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content:"); + TestUtil.logErr(response.content); + throw new Exception("test4 failed."); + } + + // Request unprotected page (unprotected.jsp page): + request = pageUnprotected; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Check that we did not receive an error and that we did not + // receive a redirection: + if (response.isError()) { + TestUtil.logErr("Error retrieving " + request); + throw new Exception("test4 failed."); + } + + // Check that the page returned is the correct one. The principal + // is not checked. + String searchString = searchFor; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("Incorrect page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should contain: \"" + searchString + "\")"); + throw new Exception("test4 failed."); + } + TestUtil.logMsg("Access to unprotected page granted."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test4 failed: ", e); + } + } + + /* + * testName: test5 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. Also tests + * assertions from section 11.3. + * + * If user has not been authenticated and user attempts to access an unprotected web resource, the resource is returned, + * and the user is not forced to authenticate. Also, isUserInRole() must return false for any valid or invalid role + * reference. A call to getRemoteUser() must return null. + * + * @test_Strategy: 1. Send request to access unprotected.jsp 2. Receive unprotected.jsp 3. Search the returned page for + * "!true!", which would indicate that at least one call to isUserInRole attempted by unprotected.jsp returned true. 4. + * Check that the call to getRemoteUser() returned null. + */ + public void test5() throws Exception { + try { + // Request restricted jsp page. + String request = pageUnprotected; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + pageUnprotected); + throw new Exception("test5 failed."); + } + + // Check that we did not receive an error and that we did not + // receive a redirection: + if (response.isError()) { + TestUtil.logErr("Error retrieving " + request); + throw new Exception("test5 failed."); + } + + // Check that the page returned is the correct one. The principal + // is not checked. + String searchString = searchFor; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("Incorrect page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should contain: \"" + searchString + "\")"); + throw new Exception("test5 failed."); + } + + TestUtil.logMsg("Access to unprotected page granted."); + + // Check to see if any of the calls to isUserInRole returned true: + TestUtil.logMsg("Checking isUserInRole..."); + searchString = "!true!"; + if (response.content.indexOf(searchString) != -1) { + TestUtil.logErr("At least one call to isUserInRole returned true."); + TestUtil.logErr("Page received:"); + TestUtil.logErr(response.content); + throw new Exception("test5 failed."); + } + + TestUtil.logMsg("isUserInRole test passed."); + + // Check to make sure the call to getRemoteUser() returned null. + TestUtil.logMsg("Checking getRemoteUser()..."); + searchString = searchForGetRemoteUser + "null"; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("A call to getRemoteUser() did not return null."); + TestUtil.logErr("Page received:"); + TestUtil.logErr(response.content); + throw new Exception("test5 failed."); + } + TestUtil.logMsg("getRemoteUser() test passed."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test5 failed: ", e); + } + } + + /* + * testName: test6 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. Also tests + * assertions from section 11.3. + * + * Given two servlets in the same application, each of which calls isUserInRole(X), and where X is linked to different + * roles in the scope of each of the servlets (i.e. R1 for servlet 1 and R2 for servlet 2), then a user whose identity + * is mapped to R1 but not R2, shall get a true return value from isUserInRole( X ) in servlet 1, and a false return + * value from servlet 2 (a user whose identity is mapped to R2 but not R1 should get the inverse set of return values). + * + * @test_Strategy: Since test1 already verifies the functionality for isUserInRole returning true, this test needs only + * verify that it should return false for the other jsp. For this test, MGR and ADM are swapped, so isUserInRole() + * should return opposite values from test1. + * + * 1. Send request to access rolereverse.jsp 2. Receive login page 3. Send form response with username and password 4. + * Receive resource (check isUserInRole for all known roles) + */ + public void test6() throws Exception { + try { + // The first part of this test is used in test2 and test3 as + // well, so the code has been moved to a helper method. + requestAndGetLoginPage(pageRoleReverse, 6); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information (as " + username + ")."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test6 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 6); + + // Check to make sure we are authenticated by checking the page + // content. The jsp should output "The user principal is: j2ee" + String searchString = searchFor + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test6 failed."); + } + TestUtil.logMsg("User Principal correct."); + + // Check to make sure isUserInRole is working properly: + Hashtable roleCheck = new Hashtable(); + roleCheck.put("ADM", Boolean.FALSE); + roleCheck.put("MGR", Boolean.TRUE); + roleCheck.put("VP", Boolean.FALSE); + roleCheck.put("EMP", Boolean.TRUE); + // roleCheck.put( "Manager", new Boolean( false ) ); + if (!checkRoles(response.content, roleCheck)) { + TestUtil.logErr("isUserInRole() does not work correctly."); + TestUtil.logErr("Page Received:"); + TestUtil.logErr(response.content); + throw new Exception("test6 failed."); + } + TestUtil.logMsg("isUserInRole() correct."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test6 failed: ", e); + } + } + + /* + * testName: test7 + * + * @assertion: Servlet Specification v2.3, sec 9.4 A special directory exists within the application hierarchy named + * WEB-INF. This directory contains all things related to the application that aren't in the document root of the + * application. It is important to note that the WEB-INF node is not part of the public document tree of the + * application. No file contained in the WEB-INF directory may be served directly to a client. + * + * @test_Strategy: 1) send a http request to WEB-INF directory 2) expect 404 or 403 3) repeat step 1 and 2 for the + * following a) web-inf (for case insensitive platforms) b) WEB-INF/web.xml c) web-inf/web.xml 4) based on the http + * return code report test status + */ + public void test7() { + List statusCodes; + + try { + // Try accessing WEB-INF + request = pageBase + "/WEB-INF/"; + + statusCodes = new ArrayList(); + statusCodes.add("404"); + statusCodes.add("403"); + + this.testStatusCodes(request, statusCodes, "test7"); + + // Try accessing /web-inf (for case insensitive platforms) + request = pageBase + "/web-inf/"; + + statusCodes = new ArrayList(); + statusCodes.add("404"); + statusCodes.add("403"); + + this.testStatusCodes(request, statusCodes, "test7"); + + // Try accessing WEB-INF/web.xml + request = pageBase + "/WEB-INF/web.xml"; + + statusCodes = new ArrayList(); + statusCodes.add("404"); + + this.testStatusCodes(request, statusCodes, "test7"); + + // Try accessing web-inf/web.xml (for case insensitive platforms) + request = pageBase + "/web-inf/web.xml"; + + statusCodes = new ArrayList(); + statusCodes.add("404"); + + this.testStatusCodes(request, statusCodes, "test7"); + + // Try accessing WEB-INF/web.xml + request = pageBase + "/WEB-INF/web.xml"; + + statusCodes = new ArrayList(); + statusCodes.add("404"); + + this.testStatusCodes(request, statusCodes, "test7"); + + } catch (Exception e) { + e.printStackTrace(); + } + } + + /* + * testName: test8 + * + * @assertion: Servlet Specification v2.3, sec 9.5 Web applications can be packaged and signed, using the standard Java + * Archive tools, into a Web ARchive format (war) file. When packaged into such a form, a META-INF directory will be + * present which contains information useful to the Java Archive tools. If this directory is present, the servlet + * container must not allow it be served as content to a web client's request. + * + * @test_Strategy: 1) send a http request to META-INF directory 2) expect 404 or a 403 3) repeat step 1 and 2 for the + * following a) meta-inf (for case insensitive platforms) b) META-INF/MANIFEST.MF c) meta-inf/manifest.mf 4) based on + * the http return code, report test status + */ + public void test8() throws Exception { + try { + + // Try accessing META-INF + request = pageBase + "/META-INF/"; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 8); + + // Receive "404" or "403" error code. + if (response.statusToken.equals("404") || response.statusToken.equals("403")) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected error code"); + } else { + TestUtil.logErr("Did not receive expected error code" + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content:"); + TestUtil.logErr(response.content); + throw new Exception("test8 failed."); + } + + // Try accessing /meta-inf (for case insensitive platforms) + request = pageBase + "/meta-inf/"; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 8); + + // Receive "404" or "403" error code. + if (response.statusToken.equals("404") || response.statusToken.equals("403")) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected error code"); + } else { + TestUtil.logErr("Did not receive expected error code" + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content:"); + TestUtil.logErr(response.content); + throw new Exception("test8 failed."); + } + + // Try accessing META-INF/MANIFEST.MF + request = pageBase + "/META-INF/MANIFEST.MF"; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 8); + + // Receive "404" or "403" error code. + if (response.statusToken.equals("404") || response.statusToken.equals("403")) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected error code"); + } else { + TestUtil.logErr("Did not receive expected error code" + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content:"); + TestUtil.logErr(response.content); + throw new Exception("test8 failed."); + } + + // Try accessing meta-inf/manifest.mf(for case insensitive platforms) + request = pageBase + "/meta-inf/manifest.mf"; + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 8); + + // Receive "404" or "403" error code. + if (response.statusToken.equals("404") || response.statusToken.equals("403")) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected error code"); + } else { + TestUtil.logErr("Did not receive expected error code" + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content:"); + TestUtil.logErr(response.content); + throw new Exception("test8 failed."); + } + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test8 failed: ", e); + } + } + + /* + * testName: test9 + * + * @assertion: URLMapping from Servlet Specification v2.3, sec 11.2 + * + * 1) A string beginning with a / character and ending with a /* postfix is used as a path mapping. 2) A string + * beginning with a *. prefix is used as an extension mapping. 3) All other strings are used as exact matches only 4) A + * string containing only the / character indicates that servlet specified by the mapping becomes the "default" servlet + * of the application. In this case the servlet path is the request URI minus the context path and the path info is + * null. + * + * + * @test_Strategy: 1) Deploy a two webcomponents One.jsp and Two.jsp exercising various mapping rules 2) Make a http + * request with a URL(based on the above mapping rules) 3) Make a http request with a absolute match URL. 4) compare the + * results obtained through step 2 and 3 and declare test result + * + */ + public void test9() throws Exception { + try { + String testURL = null; + String exactMatchURL = null; + + // This tests exercises the URL mapping rules + // See compareURLContents() method description for more info + + // Note: pageOne can be a JSP or Servlet + // 1) for JSP + // pageOne = pageBase + "/One.jsp"; + // 2) for servlet + // pageOne = pageBase + "/OneTest"; + + // Try accessing pageOne using "/One/index.html" + testURL = pageBase + "/One/index.html"; + exactMatchURL = pageOne; + compareURLContents(testURL, 9, exactMatchURL); + + // Try accessing pageOne using "/One/*" + testURL = pageBase + "/One/*"; + exactMatchURL = pageOne; + compareURLContents(testURL, 9, exactMatchURL); + + // Note: pageTwo can be a JSP or Servlet + // 1) for JSP + // pageTwo = pageBase + "/Two.jsp"; + // 2) for servlet + // pageTwo = pageBase + "/TwoTest"; + + // Try accessing pageTwo using "*.jsp" + testURL = pageBase + "/*.jsp"; + exactMatchURL = pageTwo; + compareURLContents(testURL, 9, exactMatchURL); + + // Try accessing pageTwo using "*.two" + testURL = pageBase + "/*.two"; + exactMatchURL = pageTwo; + compareURLContents(testURL, 9, exactMatchURL); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test9 failed: ", e); + } + } + + /* + * testName: test10 + * + * @assertion: Test isUserInRole(), specified in the Java Servlet Specification v2.3, Sec 12.3. + * + * The isUserInRole method expets a String rolename. In order that this rolename can be adjusted by the application + * assembler, or the deployer without having to recompile the Servlet making the call a element + * should be declared in the deployment descriptor with the sub-element containing the rolename passed into + * this call. The value of the sub-element is the of the that the programmer is + * testing that the caller is mapped to or not. The container is required to respect this mapping of + * to in this manner when determining the return value of the call. + * + * If, however, no has been declared with that matches the argument to isUserInRole, the + * container must default to checking the argument against the list of s for this web application to + * determine whether the caller is mapped to the rolename passed in. + * + * @test_Strategy: Note: test5 and test6 verifies the first part of the assertion. This test verifies only the second + * part of this assertion + * + * 1. Send request to access Sample.jsp 2. Receive login page(make sure it is the expected login page) 3. Send form + * response with username and password 4. Receive Sample.jsp (ensure principal is correct, and ensure getRemoteUser() + * returns the username, and ensure isUserInRole() is working properly) + */ + public void test10() throws Exception { + try { + requestAndGetLoginPage(pageSample, 10); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test10 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 10); + + // Check to make sure we are authenticated by checking the page + // content. The jsp should output "The user principal is: j2ee" + String searchString = searchFor + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test10 failed."); + } + TestUtil.logMsg("User Principal correct."); + + // Check to make sure getRemoteUser returns the user name. + searchString = searchForGetRemoteUser + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("getRemoteUser() did not return " + username + ":"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test10 failed."); + } + TestUtil.logMsg("getRemoteUser() correct."); + + // Check to make sure isUserInRole is working properly: + Hashtable roleCheck = new Hashtable(); + roleCheck.put("Administrator", Boolean.TRUE); + if (!checkRoles(response.content, roleCheck)) { + TestUtil.logErr("isUserInRole() does not work correctly."); + TestUtil.logErr("Page Received:"); + TestUtil.logErr(response.content); + throw new Exception("test10 failed."); + } + TestUtil.logMsg("isUserInRole() correct."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test10 failed: ", e); + } + } + + /* + * testName: test11 + * + * @assertion: Servlet Specification v2.3, sec 13.2 DTD The auth-constraint element indicates the user roles that should + * be permitted access to this resource collection. The role used here must either in a security-role-ref element, or be + * the specially reserved role-name * that is a compact syntax for indicating all roles in the web application. If both + * * and rolenames appear, the container interprets this as all roles. + * + * @test_Strategy: Configure allRoles.jsp to be accessible by allRoles (*) + * + * 1) Try accesing allRoles.jsp as the following user a) j2ee b) javajoe 2) Based on the http reply, report test status + * + * + */ + public void test11() throws Exception { + try { + + // Access allRoles.jsp as user "j2ee" + TestUtil.logMsg("\nAccessing allRoles.jsp as user j2ee"); + requestAndGetLoginPage(pageallRoles, 11); + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test11 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 11); + TestUtil.logMsg("Successfully accessed allRoles.jsp as user j2ee"); + + // Access allRoles.jsp as user "javajoe" + TestUtil.logMsg("\nAccessing allRoles.jsp as user javajoe"); + requestAndGetLoginPage(pageallRoles, 11); + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + postData = new Properties(); + postData.setProperty("j_username", unauthUsername); + postData.setProperty("j_password", unauthPassword); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test11 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 11); + + TestUtil.logMsg("Successfully accessed allRoles.jsp as user javajoe"); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test11 failed: ", e); + } + } + + /* + * testName: test12 + * + * @assertion: Servlet Specification v2.3, sec 13.2 (DTD) The web-resource-collection element is used to identify a + * subset of the resources and HTTP methods on those resources within a web application to which a security constraint + * applies. If no HTTP methods are specified, then the security constraint applies to all HTTP methods. + * + * @test_Strategy: 1) Do not specify any HTTP methods in the security constraints of Sample.jsp + * + * 2) Access Sample.jsp using HTTP methods GET, HEAD, POST, DELETE and PUT. + * + * 3) If Sample.jsp is accessible with all of the above HTTP methods then declare test successfull otherwise report test + * failure + * + * Note: test12 is ONLY for JSP Area + * + */ + public void test12() throws Exception { + try { + // Access Sample.jsp using HTTP method POST + TestUtil.logMsg("\nAccessing pageSample Using HTTP method POST"); + requestAndGetLoginPage(pageSample, 12); + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test12 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 12); + + TestUtil.logMsg("response.content :" + response.content); + TestUtil.logMsg("Successfully accessed " + pageSample + " with \"POST\""); + + // Change the request to pageSample + request = pageSample; + + // Access pageSample using HTTP method GET + TestUtil.logMsg("\nAccessing pageSample Using HTTP method GET"); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test12 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 12); + + TestUtil.logMsg("response.content :" + response.content); + TestUtil.logMsg("Successfully accessed " + pageSample + " with \"GET\""); + + // Access pageSample using HTTP method HEAD + TestUtil.logMsg("\nAccessing pageSample Using HTTP method HEAD"); + response = WebUtil.sendRequest("HEAD", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test12 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 12); + + TestUtil.logMsg("response.content :" + response.content); + + TestUtil.logMsg("Successfully accessed " + pageSample + " with \"HEAD\""); + + // Read the contents of Sample.jsp and + // upload it using HTTP method PUT + FileInputStream fstream = new FileInputStream(tshome + "/src/web/jsp/sec/secform/Sample.jsp"); + int fileContentLength = fstream.available(); + byte[] byteArray = new byte[1024]; + int bytesRead = fstream.read(byteArray, 0, fileContentLength); + + // Now use HTTP method DELETE and later use http method PUT + + // Delete pageSample using HTTP method DELETE + TestUtil.logMsg("\nDELETE " + pageSample + " Using HTTP method DELETE ...."); + response = WebUtil.sendRequest("DELETE", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, + cookies); + + addNewCookies(cookies, response.cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test12 failed."); + } + TestUtil.logMsg("response.content :" + response.content); + TestUtil.logMsg("Successfully accessed " + pageSample + " with \"DELETE\""); + + // put pageSample using HTTP method PUT + TestUtil.logMsg("\nPUT " + pageSample + " Using HTTP method PUT ...."); + + response = uploadUsingHttpMethodPUT("PUT", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), byteArray, + cookies, username, password); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test12 failed."); + } + TestUtil.logMsg("response.content :" + response.content); + TestUtil.logMsg("response.statusToken :" + response.statusToken); + TestUtil.logMsg("uploaded " + pageSample + "using HTTP method PUT"); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test12 failed: ", e); + } + } + + /* + * testName: test13 + * + * @assertion: Servlet Specification v2.3, sec 12.2 The security model does not apply when a servlet uses the + * RequestDispatcher to invoke a static resource or servlet using a forward or an include. + * + * + * @test_Strategy: + * + * 1) Configure two servlets (IncludedServlet and ForwardedServlet) to be accessible only by administrator. + * + * 2) Configure ControlServlet to be accessible by everyone (i.e no security constraints for ControlServlet) + * + * 3) Now as a unauthenticated user access ForwardedServlet and IncludedServlet from ControlServlet + * + * ControlServlet ===>ForwardedServlet===>IncludedServlet + * + * i.e 3.1) From a ControlServlet access ForwardedServlet through dispatcher's forward method. + * + * 3.2) From the ForwardedServlet access/include IncludedServlet through Request dispatcher's include method + * + * 4) If the servlets(ForwardedServlet and IncludedServlet) are accessible report the test success otherwise report test + * failure + * + * Note: test13 is ONLY for SERVLET Area + * + */ + public void test13() throws Exception { + try { + + request = pageServletBase + "/ControlServlet"; + + // Access ControlServlet" + TestUtil.logMsg("\nAccessing ControlServlet"); + TestUtil.logMsg("Sending request " + request); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + TestUtil.logMsg("response.content 1:" + response.content); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test13 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 13); + TestUtil.logMsg("response.content 2:" + response.content); + TestUtil.logMsg("Successfully accessed ControlServlet," + " ForwardedServlet and IncludedServlet"); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test13 failed: ", e); + } + } + + /* + * testName: test14 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.3, Sec 12.6 + * + * Therefore, a servlet container is required to track authentication information at the container level (rather than at + * the web application level). This allows users authenticated for one web application to access other resources managed + * by the container permitted to the same security identity. + * + * @test_Strategy: 1. Configure pageSec(jspSec.jsp or ServletSecTest) and pageSample(Sample.jsp or SampleTest ) to be + * accessible only by Administrator 2. Send request to access jspSec.jsp 3. Receive login page 4. Send form response + * with username and password 5. Receive jspSec.jsp (ensure principal is correct, and ensure getRemoteUser() returns the + * username, and ensure isUserInRole() is working properly) 6. Try accessing pageSample(Sample.jsp or SampleTest) which + * is also configured to be accessible with the same security identity, since we are already authenticated we should be + * able to access pageSample without going through login page again. 7. Ensure principal is still correct and + * getRemoteUser() still returns the correct username. Also ensure isUserInRole() is still working properly. + */ + public void test14() throws Exception { + try { + TestUtil.logMsg("\nAccessing pageSec: " + pageSec); + requestAndGetLoginPage(pageSec, 14); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test14 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 14); + + // Check to make sure we are authenticated by checking the page + // content. The jsp should output "The user principal is: j2ee" + String searchString = searchFor + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test14 failed."); + } + TestUtil.logMsg("User Principal correct."); + + // Check to make sure getRemoteUser returns the user name. + searchString = searchForGetRemoteUser + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("getRemoteUser() did not return " + username + ":"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test1 failed."); + } + TestUtil.logMsg("getRemoteUser() correct."); + + // Check to make sure isUserInRole is working properly: + Hashtable roleCheck = new Hashtable(); + roleCheck.put("ADM", Boolean.TRUE); + roleCheck.put("MGR", Boolean.FALSE); + roleCheck.put("VP", Boolean.FALSE); + roleCheck.put("EMP", Boolean.TRUE); + // roleCheck.put( "Administrator", new Boolean( false ) ); + if (!checkRoles(response.content, roleCheck)) { + TestUtil.logErr("isUserInRole() does not work correctly."); + TestUtil.logErr("Page Received:"); + TestUtil.logErr(response.content); + throw new Exception("test14 failed."); + } + TestUtil.logMsg("isUserInRole() correct."); + + // Now that we are authenticated, try accessing pageSample + // without going through the login page again. + request = pageSample; + TestUtil.logMsg("\nAccessing pageSample :" + request); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + pageSec); + throw new Exception("test14 failed."); + } + + // Check to make sure we are still authenticated. + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("User Principal incorrect. Page received:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test14 failed."); + } + TestUtil.logMsg("User Principal still correct."); + + // Check to make sure getRemoteUser still returns the user name. + searchString = searchForGetRemoteUser + username; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr("getRemoteUser() did not return " + username + " after lazy authentication:"); + TestUtil.logErr(response.content); + TestUtil.logErr("(Should say: \"" + searchString + "\")"); + throw new Exception("test14 failed."); + } + TestUtil.logMsg("getRemoteUser() still correct."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test14 failed: ", e); + } + } + + /* + * testName: test15 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.3, Sec 12.6 + * + * This is similar to test14 except this is validating that we can not bypass security constraints when sso is on by + * simply adding "/j_security_check" to the request url. By adding "j_security_check" to the end of a request but not + * specifying authN creds, we should NOT be redirected to the requested/restricted page as we have not yet authenticated + * (even though we tried to trick/confuse the system by appending 'j_security_check' onto our request.) + * + * @test_Strategy: 1. attempt to access a protected resource by: Sending a request to access url: + * "/j_security_check" 2. We should not be authenticated yet so should get a response back from server with + * either an error or login form (we must verify that we are not authenticated and that we did NOT get the requested(and + * restricted) form back from server. + * + */ + public void test15() throws Exception { + + String modifiedPageSec = pageSec + pageSecurityCheck; + try { + // 1. attempt to access a protected resource + TestUtil.logTrace("Sending request \"" + modifiedPageSec + "\""); + try { + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(modifiedPageSec), null, + null); + } catch (Exception ex) { + // if here, problem as we should have been redirected + TestUtil.logErr("ERROR - got exception when trying to access restricted page w/out AuthN first."); + ex.printStackTrace(); + throw new Exception("test15 failed."); + } + + if (response != null) { + // if we got directed to login page that is okay too + TestUtil.logTrace("response.content=" + response.content); + + // 2. verify that the requested page was NOT accessed/found + String searchString = "getAuthType()"; // this string appears on the + // pageSec page + if (response.content.indexOf(searchString) != -1) { + // Error - it looks like we were able to access the requested page! + String err = "Error - we were not authenticated but were able to access the "; + err += "following page: " + modifiedPageSec + " with a return status = " + response.statusToken; + TestUtil.logErr(err); + TestUtil.logErr("response.content = " + response.content); + throw new Exception("test15 failed."); + } else { + TestUtil.logTrace("Good - we were not able to access restricted page without authenticating."); + } + } else { + TestUtil.logTrace("response=null"); + } + + TestUtil.logMsg("test15 passed."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test15 failed: ", e); + } + } + + /* + * testName: test16 + * + * @assertion: Test ability to login via the HttpServletRequst.login() method. as specified in the Java Servlet + * Specification v3.1, Sec 13.3 + * + * If user has not been authenticated and user attempts to access an unprotected web resource, the user should be able + * to access it. Since the user was not authenticated, calls to getUserPrincipal() should not return the name of user + * "j2ee" since. Once in the servlet, we should be able to invoke the HttpServletRequest.login() call to authenticate + * user "j2ee" and then calls to getUserPrincipal() should return user "j2ee" + * + * + * @test_Strategy: 1. Send request to access ServletProgrammaticLogin 2. the servlet performs tasks and sends response + * data back 3. we parse the data to see if we got desired output + */ + public void test16() throws Exception { + try { + + // Send request to ProgrammaticLogin servlet and include username + // and password for use within servlet + request = pageProgLogin; + + // set some params that will be needed from within the pageProgLogin + // servlet + Properties postData = new Properties(); + TestUtil.logTrace("setting request parameter my_username = " + username); + TestUtil.logTrace("setting request parameter my_password = " + password); + postData.setProperty("the_username", username); + postData.setProperty("the_password", password); + + TestUtil.logMsg("Sending request " + request); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + TestUtil.logTrace("response.content = \n" + response.content); + + if (!response.statusToken.equals("200")) { + TestUtil.logErr("ERROR: not able to do Programmatic Login in: " + pageProgLogin); + throw new Exception("test16 failed."); + } + + // Check that we did not receive an error + if (response.isError()) { + TestUtil.logErr("Error retrieving " + request); + throw new Exception("test16 failed."); + } + + TestUtil.logTrace(response.content); // debug aid + + // verify there were no errors detected fom within our servlet + String searchString = "ERROR - HttpServletRequest.login"; + if (response.content.indexOf(searchString) != -1) { + TestUtil.logErr(response.content); + throw new Exception("test16 failed."); + } + + // verify that we got success + searchString = "HttpServletRequest.login() passed"; + if (response.content.indexOf(searchString) == -1) { + TestUtil.logErr(response.content); + throw new Exception("test16 failed."); + } + + TestUtil.logMsg("test16 passed."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test16 failed: ", e); + } + } + + /* + * testName: test17 + * + * @assertion: Test FORM-based authentication, specified in the Java Servlet Specification v2.2, Sec 11.5.3. + * + * If user has been authenticated and user attempts to access a protected web resource, and user enters correct username + * and password of a user that is authorized to access the resource, the resource is returned (similar to test1) + * + * @test_Strategy: 1. Send request to access protected page (ie. pageServletProgLogout) 2. Receive login page 3. Send + * form response with username(j2ee) and password 4. Receive resource 5. make sure no ERRORs occurrred on + * pageServletProgLogout and that it actually did log us out. + * + */ + public void test17() throws Exception { + try { + requestAndGetLoginPage(pageServletProgLogout, 1); + + // Send response to login form with session id cookie: + request = pageSecurityCheck; + TestUtil.logMsg("Sending request \"" + request + "\" with login information."); + Properties postData = new Properties(); + postData.setProperty("j_username", username); + postData.setProperty("j_password", password); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Check that the page was found (no error). + TestUtil.logTrace("response.content = " + response.content); // debug aid + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test17 failed."); + } + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 17); + TestUtil.logTrace("response.content = " + response.content); // debug aid + + // Check to make sure we are authenticated by checking the page + // content. It should contain the string below to indicate we + // properly accessed the servlet. + String searchString = "enterred ServletProgrammaticLogout.service()"; + if (response.content.indexOf(searchString) == -1) { + String str = "Error - Did not get expected content from page: " + pageServletProgLogout; + str += " Content should have contained: " + searchString; + TestUtil.logErr(str); + throw new Exception("test17 failed."); + } + + // now make sure we didnt get any errors in our content + String errString = "ERROR - HttpServletRequest.logout()"; + if (response.content.indexOf(errString) != -1) { + // there was an error msg detected in servlet content + String str = "Error - returned in content from page: " + pageServletProgLogout; + TestUtil.logErr(str); + throw new Exception("test17 failed."); + } + TestUtil.logMsg("test17 passed."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test17 failed: ", e); + } + } + + /* + * testName: test18 + * + * @assertion: Test ability to authenticate using HttpServletRequst.authenticate() as specified in the Java Servlet + * Specification v3.1, Sec 13.3 + * + * If user has not been authenticated and user attempts to access an unprotected web resource, the user should be able + * to access it. Since the user was not authenticated, calls to getUserPrincipal() should return null. Calls to + * authenticate() should return false. Once in the servlet, we should be able to invoke the HttpServletRequest.login() + * call to login with user "j2ee" and then calls to getUserPrincipal() should return user "j2ee". Calls to + * authenticate() should return true. + * + * @test_Strategy: 1. Send request to access ServletProgrammaticLogin 2. the servlet performs tasks and sends response + * data back 3. we parse the data to see if we got desired output + */ + public void test18() throws Exception { + try { + + // Send request to ProgrammaticLogin servlet and include username + // and password for use within servlet + request = pageProgAuthen; + + // set some params that will be needed from within the pageProgLogin + // servlet + Properties postData = new Properties(); + postData.setProperty("the_username", username); + postData.setProperty("the_password", password); + + TestUtil.logMsg("Sending request " + request); + response = WebUtil.sendRequest("POST", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), postData, cookies); + + // Call followRedirect() to make sure we receive the required page + TestUtil.logTrace("YYYYY: response.content = \n" + response.content); + + if (!response.statusToken.equals("200")) { + TestUtil.logErr("ERROR: not able to do Programmatic Login in: " + pageProgLogin); + throw new Exception("test18 failed."); + } + + // Check that we did not receive an error + if (response.isError()) { + TestUtil.logErr("Error retrieving " + request); + throw new Exception("test18 failed."); + } + + // verify there were no errors detected fom within our servlet + String searchString = "ERROR - HttpServletRequest.authenticate"; + if (response.content.indexOf(searchString) != -1) { + TestUtil.logErr(response.content); + throw new Exception("test18 failed."); + } + + // now verify the authenticate truely passed + if (response.content.indexOf("HttpServletRequest.authenticate passed") == -1) { + TestUtil.logErr(response.content); + throw new Exception("test18 failed."); + } + + TestUtil.logMsg("test18 passed."); + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception("test18 failed: ", e); + } + } + + /** + * Uploads data from a byteArray to an URL. A WebUtil.Response object is returned with the response information. + * + * @param method http method "PUT" + * @param addr Address of web server + * @param port Port of web server + * @param req The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) + * @param postData is a byteArray which contains the data to be posted + * @param cookieList A list of cookies to send when requesting the page. null if no cookie list is to be sent. + * @param username The username for authentication, null if no authentication required. + * @param password The password for authentication, null if no authentication required. + * @return WebUtil.Response object containing response information + * @exception IOException Thrown if request could not be made + */ + public static Response uploadUsingHttpMethodPUT(String method, InetAddress addr, int port, String req, byte[] postData, + Hashtable cookieList, String username, String password) throws IOException { + String protocol = "HTTP/1.0"; + URL requestURL; + Socket socket = null; + PrintWriter out = null; + BufferedReader in = null; + String line; + Response response = new Response(); + + try { + requestURL = new URL("http", addr.getHostName(), port, req); + req = method + " " + req + " " + protocol; + + socket = new Socket(addr, port); + + in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); + out.println(req); + + if (cookieList != null) { + // Send cookies: + Enumeration keys = cookieList.keys(); + + // Does at least one cookie exist? + if (keys.hasMoreElements()) { + String cookieString = "Cookie: "; + + // Add each cookie to the string + boolean first = true; + while (keys.hasMoreElements()) { + String key = (String) keys.nextElement(); + String value = (String) cookieList.get(key); + cookieString += (first ? "" : "; ") + key + "=" + value; // + "; + // $Path=/"; + first = false; + } + + // Write cookies: + out.println(cookieString); + } + } + + // Send authentication information if necessary: + if (username != null) { + String code = WebUtil.encodeBase64(username + ":" + password); + out.println("Authorization: Basic " + code.trim()); + } + + // Send extra header information if we are posting. + if (postData != null) { + out.println("Content-type: text/data"); + } + + // Read the file contents from the byte array(postData) + // and store it in a string(fileContents) + StringBuffer content = new StringBuffer(1024); + ByteArrayInputStream bais = new ByteArrayInputStream(postData); + int c; + while ((c = bais.read()) != -1) { + content.append((char) c); + } + String fileContents = content.toString(); + + // TestUtil.logMsg("File Content: "+ fileContents); + + // If this is a post request, send post data: + if ((postData != null) && method.toUpperCase().equals("PUT")) { + String postString = WebUtil.encodeBase64(fileContents); + + // Skip a line: + out.println("Content-length: " + postString.length()); + out.println(""); + out.println(postString); + } else { + // Skip a line: + out.println(""); + } + + out.flush(); + + // Read first line and check for HTTP version and OK. + line = in.readLine(); + if (line != null) { + + StringTokenizer st = new StringTokenizer(line.trim()); + response.versionToken = st.nextToken(); + response.statusToken = st.nextToken(); + } + + // Read each line of the header until we hit a blank line + while ((line = in.readLine()) != null) { + + // Blank line means we are done with the header: + if (line.trim().equals("")) { + break; + } + + // Analyze special tags location and set cookie + if (line.toLowerCase().startsWith("location:")) { + // This is a redirect. Extract valuable infomration: + response.location = line.substring(10); + } else if (line.toLowerCase().startsWith("set-cookie:")) { + // This is a cookie. Add the cookie to the response + // object. + response.parseCookie(line); + } else if (line.toLowerCase().startsWith("www-authenticate:")) { + // Request to authenticate this page. + response.authenticationRequested = true; + } + } + + // The rest is content: + while ((line = in.readLine()) != null) { + response.content += line + "\n"; + } + + in.close(); + out.close(); + } catch (MalformedURLException e) { + throw new IOException("MalformedURLException: " + e.getMessage()); + } catch (UnknownHostException e) { + throw new IOException("UnknownHostException: " + e.getMessage()); + } catch (ConnectException e) { + throw new IOException("ConnectException: " + e.getMessage()); + } + + return response; + } + + /** + * Outputs a single line of text to the given output stream. Appends a \r\n automatically. By adding a + * System.out.println here, you can easily echo what is being sent to the web server. + */ + private static void send(PrintWriter out, String s) { + out.print(s + "\r\n"); + // if( debugOutputRequests ) { + // System.out.println( "REQUEST: " + s ); + // } + } + + /** + * Helper method that is used in tests 1, 2 and 3. Performs the following actions: + * + * 1. Send request to access passed in url 2. Receive redirect to login page, extract location and session id cookie 3. + * Send request to access new location, send cookie 4. Receive login page + * + * @param request The initial page to request + * @param testNum The test number for correct display of error messages. + */ + private void requestAndGetLoginPage(String request, int testNum) throws Exception { + // Request restricted jsp page. + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test" + testNum + " failed."); + } + + // if (response.statusToken=302) + // then follow redirect to get the login page + + if (response.statusToken.equals("302")) { + // We should receive a redirection to the login page: + if (response.location == null) { + TestUtil.logErr("No redirection to login page received."); + throw new Exception("test" + testNum + " failed."); + } + + // Extract location from redirection and format new request: + request = WebUtil.getRequestFromURL(response.location); + TestUtil.logMsg("Redirect to: " + response.location); + + // Extract cookies: + cookies = response.cookies; + + TestUtil.logMsg("Before requesting redirected Page:" + "response.content=" + response.content); + + // Request redirected page (login page): + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, request, null, cookies); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + request); + throw new Exception("test" + testNum + " failed."); + } + + } else { + // Extract cookies: + cookies = response.cookies; + } + + // Because the authentication data is posted on the registered login form, + // There is no need to compare login page here. + /* + * request = pageLogin; + * + * // Request login page TestUtil.logMsg( "Sending request \"" + request + "\"" ); loginPageRequestResponse = + * WebUtil.sendRequest( "GET", InetAddress.getByName( hostname ), portnum, tsurl.getRequest(request), null, cookies ); + * + * // Check that the page was found (no error). if( loginPageRequestResponse.isError() ) { TestUtil.logErr( + * "Could not find " + request ); throw new Exception( "test" + testNum + " failed." ); } + * + * //Compare the received login page with the expected login page // i.e Check whether response.content + * ==loginPageRequestResponse.content if (response.content.equals(loginPageRequestResponse.content)) + * TestUtil.logMsg("Received the expected login form"); else { TestUtil.logMsg("response.conent\n"+response.content); + * TestUtil.logMsg("loginPageRequestResponse.conent\n"+ loginPageRequestResponse.content); + * TestUtil.logMsg("Received incorrect login form"); throw new Exception( "test" + testNum + " failed." ); } + */ + + } + + /** + * Helper method that is used in test 9. Performs the following actions: + * + * 1. Send request to access a jsp using testURL (for example testURL can be "/*.jsp") 2. Checks the status of the http + * reply 3. If the page is not accessible throw exception 4. If the page is accessible, then compare the content from + * the testURL with the contents of exact match URL. i.e compare 1) TEST URL : http://hostname:port/context_root/*.jsp + * 2) Exact match URL: http://hostname:port/context_root/foo.jsp + * + * Note: Here *.jsp is mapped to foo.jsp + * + * If the contents are same then the mapping is correct, otherwise throw exception + * + * @param testURL The test URL (for example "/*.jsp") + * @param testNum The test number for correct display of error messages. + * @param exactMatchURL The exact match URL (for example "/foo.jsp") + */ + private void compareURLContents(String testURL, int testNum, String exactMatchURL) throws Exception { + // Request a jsp page using testURL. + TestUtil.logMsg("Sending request \"" + testURL + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(testURL), null, null); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + testURL); + throw new Exception("test" + testNum + " failed."); + } + + WebUtil.Response response2 = null; + + // Request the jsp page using exactMatchURL. + TestUtil.logMsg("Sending request \"" + exactMatchURL + "\""); + response2 = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(exactMatchURL), null, null); + + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Could not find " + exactMatchURL); + throw new Exception("test" + testNum + " failed."); + } + + TestUtil.logMsg("Comparing contents of " + testURL + " and " + exactMatchURL); + + // compare the contents of testURL and exactMatchURL + if (!response.content.equals(response2.content)) { + TestUtil.logErr("MISMATCH in contents of " + testURL + " and " + exactMatchURL); + TestUtil.logErr("contents of " + testURL); + TestUtil.logErr(response.content); + TestUtil.logErr("contents of " + exactMatchURL); + TestUtil.logErr(response2.content); + throw new Exception("test" + testNum + " failed."); + } else { + TestUtil.logMsg("Contents MATCH : correct URL mapping\n"); + } + + } + + /** + * Helper method to check that isUserInRole is working correctly. Searches the given page content for "isUserInRole( x + * ): !y!" for each x = key in Hashtable and y = corresponding value in hashtable. If all results are as expected, + * returns true, else returns false. + */ + private boolean checkRoles(String content, Hashtable roleCheck) { + Enumeration keys = roleCheck.keys(); + boolean pass = true; + + while (pass && keys.hasMoreElements()) { + String key = (String) keys.nextElement(); + boolean expected = ((Boolean) roleCheck.get(key)).booleanValue(); + + String search = "isUserInRole(\"" + key + "\"): !" + expected + "!"; + String logMsg = "Searching for \"" + search + "\": "; + + if (content.indexOf(search) == -1) { + pass = false; + logMsg += "NOT FOUND!"; + } else { + logMsg += "found."; + } + + TestUtil.logMsg(logMsg); + } + + return pass; + } + + public void cleanup() throws Exception { + logMsg("cleanup"); + } + + /** + * Helper method that is used in tests 1, 2, 3, 5 and 6. Performs the following actions: + * + * 1. Checks whether the response.statusToken==302 or 301 if(response.statusToken==302) || (response.statusToken==301) + * send request to redirected URL 2. Returns Response object + * + * @param response The initial page response + * @param testNum The test number for correct display of error messages. + */ + public WebUtil.Response followRedirect(WebUtil.Response response, int testNum) throws Exception { + + // if (response.statusToken=302) + // send request to redirected URL + if ((response.statusToken.equals("301")) || (response.statusToken.equals("302"))) { + // We should receive a redirection page: + if (response.location == null) { + TestUtil.logErr("redirection URL : null"); + throw new Exception("test" + testNum + " failed."); + } + + // Extract location from redirection and format new request: + request = WebUtil.getRequestFromURL(response.location); + TestUtil.logMsg("Redirect to: " + response.location); + + // update cookies if the webserver choose to send cookies, + // immediately after a successful http post request. + addNewCookies(cookies, response.cookies); + + // Request redirected page + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, request, null, cookies); + + // After a succesful http post request, + // Sun's Reference Implementation returns a redirected URL + // (Note: No cookies are sent back to the client at this point) + // Only when the client accesses the redirected URL, + // Sun RI sends a cookie (single sign on cookie) back to + // the client. So update cookies hashtable with new cookies + addNewCookies(cookies, response.cookies); + + // Do not check for error code for testNum 7 and testNum 8 + // those test access an unauthorized resource and expect + // error code. + if (testNum != 7 && testNum != 8) { + // Check that the page was found (no error). + if (response.isError()) { + TestUtil.logErr("Status Token " + response.statusToken); + TestUtil.logErr("Could not find " + request); + throw new Exception("test" + testNum + " failed."); + } + } + } else { + // After a successful post request, if a webserver + // returns the webresource without redirecting to new URL + // then update any new cookies received during this process. + addNewCookies(cookies, response.cookies); + + } + + return response; + } + + /** + * Helper method that is used to update cookies + * + * This helper method retrieves cookies from "newCookies" hashtable and updates it to "oldCookies" hashtable + * + * @param oldCookies Hashtable containing original cookies + * @param newCookies Hashtable containing new cookies error messages. + */ + public void addNewCookies(Hashtable oldCookies, Hashtable newCookies) { + // Add new cookie/cookies to the existing cookies Hashtable + for (Enumeration e = newCookies.keys(); e.hasMoreElements();) { + // get cookie name + String name = (String) e.nextElement(); + + // get value for this name + String value = (String) newCookies.get(name); + + if (oldCookies == null) { + oldCookies = new Hashtable(); + } + + // Add this name value pair (cookie) to old cookies + oldCookies.put(name.trim(), value.trim()); + + } + } + + /** + * Get the HttpResponse, and check the status code to see if matches one of the expected status codes. + * + * @param request- + * @String request URL + * @param expectedCodes - @List<@String> status codes we will test for + * @param testName - The name calling test + */ + private void testStatusCodes(String request, List expectedCodes, String testName) throws Exception { + + try { + TestUtil.logMsg("Sending request \"" + request + "\""); + response = WebUtil.sendRequest("GET", InetAddress.getByName(hostname), portnum, tsurl.getRequest(request), null, null); + + // Call followRedirect() to make sure we receive the required page + response = followRedirect(response, 7); + + // Check status code(s). + if (expectedCodes.contains(response.statusToken)) { + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logMsg("Received expected error code"); + + } else { + TestUtil.logErr("Did not receive expected error code" + request); + TestUtil.logMsg("Status Token " + response.statusToken); + TestUtil.logErr("Page content: "); + TestUtil.logErr(response.content); + throw new Exception(testName + " failed."); + } + + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + throw new Exception(testName + " failed: ", e); + } + + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-application-client.xml b/tools/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-application-client.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/sunxml/sun-application-client.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-application-client.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/sunxml/sun-web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/sunxml/sun-web.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java new file mode 100644 index 0000000000..ec35ff2672 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/AttributeEntry.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +public class AttributeEntry { + + public static final String NO_ATTRIBUTE_NAME = "no attribute name"; + + private String name = NO_ATTRIBUTE_NAME; + + private String type = "java.lang.String"; + + private String rtexpr = "false"; + + private String required = "false"; + + public AttributeEntry() { + } + + public String getName() { + return name; + } + + public void setName(String name) { + if (name != null) { + this.name = name; + } + } + + public String getType() { + return type; + } + + public void setType(String type) { + if (type != null) { + this.type = type; + } + } + + public String getRtexpr() { + return rtexpr; + } + + public void setRtexpr(String rtexpr) { + if (rtexpr != null) { + this.rtexpr = rtexpr; + } + } + + public String getRequired() { + return required; + } + + public void setRequired(String required) { + if (required != null) { + this.required = required; + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java index 6efd0e2e0b..8650c79010 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/BuildException.java @@ -26,11 +26,11 @@ public class BuildException extends Exception { - public BuildException() { - super(); - } + public BuildException() { + super(); + } - public BuildException(String message) { - super(message); - } + public BuildException(String message) { + super(message); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java similarity index 57% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java index afc989779f..e6fa74731d 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/FunctionEntry.java @@ -29,34 +29,34 @@ public class FunctionEntry { - public static final String NO_FUNCTION_NAME = "no function name"; + public static final String NO_FUNCTION_NAME = "no function name"; - public static final String NO_FUNCTION_SIGNATURE = "no function signature"; + public static final String NO_FUNCTION_SIGNATURE = "no function signature"; - private String name = NO_FUNCTION_NAME; + private String name = NO_FUNCTION_NAME; - private String functionSignature = NO_FUNCTION_SIGNATURE; + private String functionSignature = NO_FUNCTION_SIGNATURE; - public FunctionEntry() { - } + public FunctionEntry() { + } - public String getName() { - return name; - } + public String getName() { + return name; + } - public void setName(String name) { - if (name != null) { - this.name = name; + public void setName(String name) { + if (name != null) { + this.name = name; + } } - } - public String getFunctionSignature() { - return functionSignature; - } + public String getFunctionSignature() { + return functionSignature; + } - public void setFunctionSignature(String functionSignature) { - if (functionSignature != null) { - this.functionSignature = functionSignature; + public void setFunctionSignature(String functionSignature) { + if (functionSignature != null) { + this.functionSignature = functionSignature; + } } - } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java new file mode 100644 index 0000000000..b7840a9d2d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagEntry.java @@ -0,0 +1,110 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +public class TagEntry { + + private static final AttributeEntry[] NO_DEFINED_ATTRIBUTES = {}; + + private static final VariableEntry[] NO_DEFINED_VARIABLES = {}; + + private static final String DEFAULT_BODY = "JSP"; + + private Map attributes; + + private Map variables; + + private String name; + + private String body = DEFAULT_BODY; + + public TagEntry() { + attributes = new HashMap(); + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getBody() { + return body; + } + + public void setBody(String body) { + if (body != null) { + this.body = body; + } + } + + public void addVariable(VariableEntry entry) { + variables.put(entry.getNameGiven(), entry); + } + + public VariableEntry getVariable(String name) { + return (VariableEntry) attributes.get(name); + } + + public VariableEntry[] getVariables() { + if (variables.isEmpty()) { + return NO_DEFINED_VARIABLES; + } else { + List list = new ArrayList(); + for (Iterator i = variables.values().iterator(); i.hasNext();) { + list.add(i.next()); + } + return (VariableEntry[]) list.toArray(new VariableEntry[list.size()]); + } + } + + public void addAttribute(AttributeEntry entry) { + attributes.put(entry.getName(), entry); + } + + public AttributeEntry getAttribute(String name) { + return (AttributeEntry) attributes.get(name); + } + + public AttributeEntry[] getAttributes() { + if (attributes.isEmpty()) { + return NO_DEFINED_ATTRIBUTES; + } else { + List list = new ArrayList(); + for (Iterator i = attributes.values().iterator(); i.hasNext();) { + list.add(i.next()); + } + return (AttributeEntry[]) list.toArray(new AttributeEntry[list.size()]); + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java new file mode 100644 index 0000000000..1b01fac981 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryComparitor.java @@ -0,0 +1,87 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import com.sun.ts.tests.common.taglibsig.validation.ValidationConfiguration; +import com.sun.ts.tests.common.taglibsig.validation.Validator; +import com.sun.ts.tests.common.taglibsig.validation.ValidatorFactory; + +/** + * Provides the ability to compare two TagLibraryDescriptor objects and return any differences found. + */ +public class TagLibraryComparitor { + + // The current configuration for this TagLibraryComparitory. + ValidationConfiguration configuration; + + /** + *

+ * Constructs a new TagLibraryComparitor that will use the provided {@link ValidationConfiguration} to perform its + * comparison. + *

+ * + * @param configuration - ValidationConfiguration + */ + public TagLibraryComparitor(ValidationConfiguration configuration) { + this.configuration = configuration; + } + + /** + *

+ * Sets a new {@link ValidationConfiguration} to use when performing comparisons. + *

+ * + * @param configuration - ValidationConfiguration + */ + public void setConfiguration(ValidationConfiguration configuration) { + this.configuration = configuration; + } + + /** + *

+ * Performs a comparison of two {@link TagLibraryDescriptor} objects using the configured + * {@link ValidationConfiguration}. + * + * @param control - the control TagLibraryDescriptor + * @param underTest - the TagLibraryDescriptor that we are validating for correctness + * @return an empty array if no differences are found + * @throws IllegalStateException if the provided ValidationConfiguration is null, or has not be configured. + */ + public String[] compare(TagLibraryDescriptor control, TagLibraryDescriptor underTest) { + List messages = new ArrayList(); + + if (configuration != null && configuration.hasBeenConfigured()) { + for (Iterator i = configuration.getValidatorNames(); i.hasNext();) { + Validator validator = ValidatorFactory.getValidator(configuration.getValidatorClass((String) i.next())); + if (validator != null) { + messages.addAll(validator.validate(control, underTest)); + } + } + } else { + throw new IllegalStateException("No Configuration Available..."); + } + return (String[]) messages.toArray(new String[messages.size()]); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java new file mode 100644 index 0000000000..dc83d028e8 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/TagLibraryDescriptor.java @@ -0,0 +1,512 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +import java.io.CharArrayReader; +import java.io.IOException; +import java.io.InputStream; +import java.net.JarURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.List; +import java.util.jar.JarEntry; +import java.util.jar.JarFile; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.Node; +import org.w3c.dom.NodeList; +import org.xml.sax.EntityResolver; +import org.xml.sax.InputSource; +import org.xml.sax.SAXException; + +import com.sun.ts.lib.util.TestUtil; + +/** + * Represents a TLD from a JAR file allowing access to the tag and function and validator entries as well as TLD level + * metatdata such as support container version and version of the taglibrary itself. + */ +public class TagLibraryDescriptor { + + private static final String ONE_DOT_TWO_CONTAINER = "1.2"; + + private static final String TWO_DOT_ZERO_CONTAINER = "2.0"; + + private static final String DEFAULT_TAGLIB_VERSION = "1.0"; + + private static final HashMap TAGLIB_CACHE = new HashMap(); + + private static final TagEntry[] EMPTY_TAG_ENTRIES = {}; + + private static final FunctionEntry[] EMPTY_FUNCTION_ENTRIES = {}; + + private static final ValidatorEntry[] EMPTY_VALIDATOR_ENTRIES = {}; + + private String _containerVersion = ONE_DOT_TWO_CONTAINER; + + private String _taglibVersion = DEFAULT_TAGLIB_VERSION; + + private String _uri; + + private List _tagEntries; + + private List _functionEntries; + + private List _validatorEntries; + + // Private + private TagLibraryDescriptor() { + } + + /** + * Returns a TagLibraryDescriptor instance based on the URI the tag library is known by (i.e. the element of the + * TLD). If the TagLibraryDescriptor is not found in the cache, the this method will use the URL to the jar file and + * scan the JAR file for TLDs. Any TLD's found will be processed and added cache. If, after scanning the JAR file, no + * TLD's matching the specified ttaglib uri can be found, this method will return null. + * + * @param jarUrl - The file URL of the JAR file to scan for TLDs if the cache doesn't contain the requested + * TagLibraryDescriptor instance + * @param taglibUri - The uri of the tag library of interest + * @return a TagLibraryDescriptor for the provided uri, or null if no tag library can be found + */ + public static TagLibraryDescriptor getInstance(String jarUrl, String taglibUri) { + TagLibraryDescriptor tld = (TagLibraryDescriptor) TAGLIB_CACHE.get(taglibUri); + if (tld == null) { + URL url = null; + jarUrl = "jar:" + jarUrl + "!/"; + try { + url = new URL(jarUrl); + } catch (MalformedURLException e) { + TestUtil.logErr("Malformed URL: " + jarUrl, e); + } + + // Begin constructing the cache... + TestUtil.logTrace("<<<<<>>>>>"); + try { + TldBuilder builder = new TldBuilder(new TldLocator(url)); + builder.build(); + } catch (BuildException be) { + TestUtil.logErr(be.getMessage(), be); + } + + tld = (TagLibraryDescriptor) TAGLIB_CACHE.get(taglibUri); + } + return tld; + } + + /** + * Returns the tags of this tag library. + * + * @return the tags of this tag library + */ + public TagEntry[] getTagEntries() { + if (_tagEntries == null || _tagEntries.isEmpty()) { + return EMPTY_TAG_ENTRIES; + } else { + return (TagEntry[]) _tagEntries.toArray(new TagEntry[_tagEntries.size()]); + } + } + + /** + * Returns the functions of this tag library. + * + * @return the functions of this tag library + */ + public FunctionEntry[] getFunctionEntries() { + if (_functionEntries == null || _functionEntries.isEmpty()) { + return EMPTY_FUNCTION_ENTRIES; + } else { + return (FunctionEntry[]) _functionEntries.toArray(new FunctionEntry[_functionEntries.size()]); + } + } + + /** + * The validators of this tag library. + * + * @return the validators of this tag library + */ + public ValidatorEntry[] getValidatorEntries() { + if (_validatorEntries == null || _validatorEntries.isEmpty()) { + return EMPTY_VALIDATOR_ENTRIES; + } else { + return (ValidatorEntry[]) _validatorEntries.toArray(new ValidatorEntry[_validatorEntries.size()]); + } + } + + /** + * Returns the minimum container version required to use this tag libary. + * + * @return the minimum container version required to use this tag library + */ + public String getRequiredContainerVersion() { + return this._containerVersion; + } + + /** + * Returns the version of this tag library. + * + * @return the version of this tag library + */ + public String getTaglibraryVersion() { + return this._taglibVersion; + } + + /** + * Returns the URI that identifies this tag library + * + * @return the URI that identifies this tag library + */ + public String getURI() { + return this._uri; + } + + /** + * Adds a TagEntry to the internal list of tags + * + * @param entry - a TagEntry + */ + private void addTagEntry(TagEntry entry) { + if (_tagEntries == null) + _tagEntries = new ArrayList(); + _tagEntries.add(entry); + } + + /** + * Adds a FunctionEntry to the internal list of functions + * + * @param entry - a FunctionEntry + */ + private void addFunctionEntry(FunctionEntry entry) { + if (_functionEntries == null) + _functionEntries = new ArrayList(); + _functionEntries.add(entry); + } + + /** + * Adds a ValidatorEntry to the internal list of validators. + * + * @param entry - a ValidatorEntry + */ + private void addValidatorEntry(ValidatorEntry entry) { + if (_validatorEntries == null) + _validatorEntries = new ArrayList(); + _validatorEntries.add(entry); + } + + /** + * Sets the required container version for this tag library. + * + * @param version - required container version + */ + private void setRequiredContainerVersion(String version) { + _containerVersion = version; + } + + /** + * Sets the version of this tag library + * + * @param version - tag library version + */ + private void setTaglibraryVersion(String version) { + _taglibVersion = version; + } + + /** + * Sets the URI of this tag library + * + * @param uri - the URI of this tag library + */ + private void setURI(String uri) { + _uri = uri; + } + + // ======================================== Inner Classes + // ===================== + + /** + * Utility class to encapsulate all XML related functionality in creating TagLibraryDescriptor objects. + */ + private static class TldBuilder { + + /** + * Elements that are of interest in a Tag Library Descriptor. + */ + private static final String TLIB_VERSION_ELEMENT = "tlib-version"; + + private static final String JSP_VERSION_ELEMENT = "jsp-version"; + + private static final String VALIDATOR_ELEMENT = "validator"; + + private static final String FUNCTION_ELEMENT = "function"; + + private static final String TAG_ELEMENT = "tag"; + + private static final String NAME_ELEMENT = "name"; + + private static final String ATTRIBUTE_ELEMENT = "attribute"; + + private static final String TYPE_ELEMENT = "type"; + + private static final String VARIABLE_ELEMENT = "variable"; + + private static final String BODY_ELEMENT = "body-content"; + + private static final String URI_ELEMENT = "uri"; + + private static final String RTEXPR_ELEMENT = "rtexprvalue"; + + private static final String REQUIRED_ELEMENT = "required"; + + private static final String NAME_GIVEN_ELEMENT = "name-given"; + + private static final String SCOPE_ELEMENT = "scope"; + + private static final String DECLARE_ELEMENT = "declare"; + + private static final String VARIABLE_CLASS_ELEMENT = "variable-class"; + + private static final String FUNCTION_SIGNATURE_ELEMENT = "function-signature"; + + /** + * The TldLocator used to obtain input streams to the TLD's. + */ + TldLocator _locator; + + /** + * Creates a new TldBuilder instance. + * + * @param locator - the TldLocator to get InputStreams from + */ + public TldBuilder(TldLocator locator) { + _locator = locator; + } + + /** + * Builds TagLibraryDescriptor objects based off all TLD's that contain URI elements. + * + * @throws BuildException if an error occurs during processing. + */ + public void build() throws BuildException { + try { + processTlds(_locator.getTldsAsStreams()); + } catch (Throwable t) { + throw new BuildException("Unexpected Exception building TLDs: " + t.toString()); + } + } + + /** + * Utility method to setup and return a DocumentBuilder for XML parsing. + * + * @return - DocumentBuilder instance + */ + private DocumentBuilder getDocumentBuilder() { + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + factory.setExpandEntityReferences(false); + factory.setNamespaceAware(false); + factory.setValidating(false); + DocumentBuilder builder = null; + try { + builder = factory.newDocumentBuilder(); + } catch (ParserConfigurationException e) { + TestUtil.logErr(e.getMessage(), e); + } + return builder; + } + + /** + * Parses the provided Document object (created from a TLD), and constructs logical TagLibraryDescriptor instances from + * the information contained within the Document. + * + * @param doc - Document object representing a TLD + */ + private void processDocument(Document doc) { + TagLibraryDescriptor tld = new TagLibraryDescriptor(); + Element taglib = doc.getDocumentElement(); + + processTopLevelElements(taglib, tld); + + processTagEntries(taglib.getElementsByTagName(TAG_ELEMENT), tld); + processFunctionEntries(taglib.getElementsByTagName(FUNCTION_ELEMENT), tld); + } + + private void processTopLevelElements(Element taglib, TagLibraryDescriptor des) { + + des.setTaglibraryVersion(getNodeText(taglib, TLIB_VERSION_ELEMENT)); + des.setRequiredContainerVersion(getNodeText(taglib, JSP_VERSION_ELEMENT)); + String uri = getNodeText(taglib, URI_ELEMENT); + des.setURI(uri); + addCacheEntry(uri, des); + } + + private void processFunctionEntries(NodeList functionNodes, TagLibraryDescriptor des) { + for (int i = 0, size = functionNodes.getLength(); i < size; i++) { + Element functionElement = (Element) functionNodes.item(i); + FunctionEntry funcEntry = new FunctionEntry(); + funcEntry.setName(getNodeText(functionElement, NAME_ELEMENT)); + funcEntry.setFunctionSignature(getNodeText(functionElement, FUNCTION_SIGNATURE_ELEMENT)); + } + } + + private void processTagEntries(NodeList tagNodes, TagLibraryDescriptor des) { + for (int i = 0, size = tagNodes.getLength(); i < size; i++) { + Element tagElement = (Element) tagNodes.item(i); + TagEntry tagEntry = new TagEntry(); + tagEntry.setName(getNodeText(tagElement, NAME_ELEMENT)); + tagEntry.setBody(getNodeText(tagElement, BODY_ELEMENT)); + + processTagAttributes(tagElement.getElementsByTagName(ATTRIBUTE_ELEMENT), tagEntry); + + processTagVariables(tagElement.getElementsByTagName(VARIABLE_ELEMENT), tagEntry); + + des.addTagEntry(tagEntry); + } + + } + + private void processTagAttributes(NodeList attrNodes, TagEntry tag) { + for (int i = 0, size = attrNodes.getLength(); i < size; i++) { + Element attrElement = (Element) attrNodes.item(i); + AttributeEntry attrEntry = new AttributeEntry(); + attrEntry.setName(getNodeText(attrElement, NAME_ELEMENT)); + attrEntry.setType(getNodeText(attrElement, TYPE_ELEMENT)); + attrEntry.setRtexpr(getNodeText(attrElement, RTEXPR_ELEMENT)); + attrEntry.setRequired(getNodeText(attrElement, REQUIRED_ELEMENT)); + tag.addAttribute(attrEntry); + } + } + + private void processTagVariables(NodeList varNodes, TagEntry tag) { + for (int i = 0, size = varNodes.getLength(); i < size; i++) { + Element varElement = (Element) varNodes.item(i); + VariableEntry varEntry = new VariableEntry(); + varEntry.setNameGiven(getNodeText(varElement, NAME_GIVEN_ELEMENT)); + varEntry.setVariableClass(getNodeText(varElement, VARIABLE_CLASS_ELEMENT)); + varEntry.setScope(getNodeText(varElement, SCOPE_ELEMENT)); + varEntry.setDeclare(getNodeText(varElement, DECLARE_ELEMENT)); + tag.addVariable(varEntry); + } + } + + private String getNodeText(Element parent, String nodeName) { + String nodeText = null; + NodeList list = parent.getElementsByTagName(nodeName); + + for (int i = 0, size = list.getLength(); i < size; i++) { + Node node = list.item(0).getFirstChild(); + if (node.getNodeType() == Node.TEXT_NODE) { + nodeText = node.getNodeValue(); + break; + } + } + + return nodeText; + } + + private void addCacheEntry(String key, Object value) { + TAGLIB_CACHE.put(key, value); + } + + /** + * Sequentially processes the array of InputStreams, where each input stream represents a TLD. + * + * @param inStreams - array of input streams representing one or more TLDs + * @throws SAXException - if an unexpected parsing error occurs + * @throws IOException - if an unexpected IO error occurs + */ + private void processTlds(InputStream[] inStreams) throws SAXException, IOException { + DocumentBuilder builder = getDocumentBuilder(); + builder.setEntityResolver(new EntityResolver() { + public InputSource resolveEntity(String publicId, String systemId) throws SAXException, IOException { + return new InputSource(new CharArrayReader(new char[0])); + } + }); + + for (int i = 0; i < inStreams.length; i++) { + Document doc = builder.parse(inStreams[i]); + processDocument(doc); + } + } + + } + + /** + * Processes the JAR file as identified by the provided URL. Create new TagLibraryDescriptor instances based on the any + * TLD's found. + */ + private static class TldLocator { + + /** + * The META-INF directory of the target JAR URL. + */ + private static final String META_INF = "META-INF/"; + + /** + * The file extension of Tag Library Descriptor files. + */ + private static final String TLD_EXTENSION = ".tld"; + + /** + * The URL of the JAR file. + */ + private URL _url; + + /** + * Creates a new TldLocator instance. + * + * @param url - the JAR url to use in scanning for TLDs + */ + public TldLocator(URL url) { + _url = url; + } + + /** + * Scans the JAR file idetified by the provided URL. For each TLD found an InputStream will be created for processing. + * + * @return - array of InputStreams representing TLDs found in the JAR + * @throws IOException - if an unexpected I/O error occurs + */ + public InputStream[] getTldsAsStreams() throws IOException { + JarURLConnection jarCon = (JarURLConnection) _url.openConnection(); + JarFile jar = jarCon.getJarFile(); + List inputStreams = new ArrayList(); + for (Enumeration e = jar.entries(); e.hasMoreElements();) { + JarEntry entry = (JarEntry) e.nextElement(); + String name = entry.getName(); + if (!name.startsWith(META_INF) || !name.endsWith(TLD_EXTENSION)) { + continue; + } + inputStreams.add(jar.getInputStream(entry)); + } + return (InputStream[]) inputStreams.toArray(new InputStream[inputStreams.size()]); + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java new file mode 100644 index 0000000000..06c5eb5455 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/Test.java @@ -0,0 +1,94 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +import com.sun.ts.tests.common.taglibsig.validation.ValidationConfiguration; + +public class Test { + + public Test() { + } + + public static void main(String[] args) { + TagLibraryDescriptor tld = TagLibraryDescriptor.getInstance("file:///files/projects/jakarta-taglibs/dist/standard/lib/standard.jar", + "http://java.sun.com/jstl/core_rt"); + + System.out.println(); + if (tld != null) { + System.out.println("URI: " + tld.getURI()); + System.out.println("TAGLIB VERSION: " + tld.getTaglibraryVersion()); + System.out.println("CONTAINER VERSION: " + tld.getRequiredContainerVersion()); + TagEntry[] tagEntries = tld.getTagEntries(); + for (int i = 0; i < tagEntries.length; i++) { + System.out.println("TAG NAME: " + tagEntries[i].getName()); + System.out.println("TAG BODY: " + tagEntries[i].getBody()); + AttributeEntry[] attrs = tagEntries[i].getAttributes(); + for (int j = 0; j < attrs.length; j++) { + System.out.println("ATTRIBUTE NAME: " + attrs[j].getName()); + System.out.println("ATTRIBUTE TYPE: " + attrs[j].getType()); + System.out.println("ATTRIBUTE REQ: " + attrs[j].getRequired()); + System.out.println("ATTRIBUTE RTEXPR: " + attrs[j].getRtexpr()); + } + } + } else { + System.out.println("OOOPPS"); + } + + TagLibraryDescriptor tld2 = TagLibraryDescriptor.getInstance("file:///files/nightly/jstl/lib/standard.jar", + "http://java.sun.com/jstl/fmt"); + + System.out.println(); + if (tld2 != null) { + System.out.println("URI: " + tld2.getURI()); + System.out.println("TAGLIB VERSION: " + tld2.getTaglibraryVersion()); + System.out.println("CONTAINER VERSION: " + tld2.getRequiredContainerVersion()); + TagEntry[] tagEntries = tld2.getTagEntries(); + for (int i = 0; i < tagEntries.length; i++) { + System.out.println("TAG NAME: " + tagEntries[i].getName()); + System.out.println("TAG BODY: " + tagEntries[i].getBody()); + AttributeEntry[] attrs = tagEntries[i].getAttributes(); + for (int j = 0; j < attrs.length; j++) { + System.out.println("ATTRIBUTE NAME: " + attrs[j].getName()); + System.out.println("ATTRIBUTE TYPE: " + attrs[j].getType()); + System.out.println("ATTRIBUTE REQ: " + attrs[j].getRequired()); + System.out.println("ATTRIBUTE RTEXPR: " + attrs[j].getRtexpr()); + } + } + } else { + System.out.println("OOOPPS"); + } + + ValidationConfiguration configuration = new ValidationConfiguration(); + configuration.addValidator(ValidationConfiguration.URI_VALIDATOR); + + TagLibraryComparitor comparitor = new TagLibraryComparitor(configuration); + String[] messages = comparitor.compare(tld, tld2); + if (messages.length == 0) { + System.out.println("EQUAL"); + } else { + for (int i = 0; i < messages.length; i++) { + System.out.println("ERRORS\n=================="); + System.out.println(messages[i]); + } + } + + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java similarity index 95% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java index 82bfacab85..510c1f10a1 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/ValidatorEntry.java @@ -26,6 +26,6 @@ public class ValidatorEntry { - public ValidatorEntry() { - } + public ValidatorEntry() { + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java new file mode 100644 index 0000000000..1b95dfc741 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/VariableEntry.java @@ -0,0 +1,81 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig; + +public class VariableEntry { + + public static final String NO_VARIABLE_NAME = "no variable name"; + + private String nameGiven = NO_VARIABLE_NAME; + + private String declare = "false"; + + private String variableClass = "java.lang.String"; + + private String scope = "AT_BEGIN"; + + public VariableEntry() { + } + + public String getNameGiven() { + return nameGiven; + } + + public void setNameGiven(String nameGiven) { + if (nameGiven != null) { + this.nameGiven = nameGiven; + } + } + + public String getDeclare() { + return declare; + } + + public void setDeclare(String declare) { + if (declare != null) { + this.declare = declare; + } + } + + public String getVariableClass() { + return variableClass; + } + + public void setVariableClass(String variableClass) { + if (variableClass != null) { + this.variableClass = variableClass; + } + } + + public String getScope() { + return scope; + } + + public void setScope(String scope) { + if (scope != null) { + this.scope = scope; + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java similarity index 63% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java index c9e47ffde1..b776b5b8f0 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/URIValidator.java @@ -26,24 +26,21 @@ import com.sun.ts.tests.common.taglibsig.TagLibraryDescriptor; /** - * Performs validation of TagLibraryDescriptor <uri> - * elements. + * Performs validation of TagLibraryDescriptor <uri> elements. */ public class URIValidator implements Validator { - public List validate(TagLibraryDescriptor control, - TagLibraryDescriptor underTest) { - List messages = new ArrayList(); - if (control == null || underTest == null) { - messages.add("[URIValidator] Null arguments."); - } else { - String controlUri = control.getURI(); - String underTestUri = underTest.getURI(); - if (!(controlUri.equals(underTestUri))) { - messages.add("Incorrect URI found. Expected: '" + controlUri + "'," - + " received: '" + underTestUri + "'."); - } + public List validate(TagLibraryDescriptor control, TagLibraryDescriptor underTest) { + List messages = new ArrayList(); + if (control == null || underTest == null) { + messages.add("[URIValidator] Null arguments."); + } else { + String controlUri = control.getURI(); + String underTestUri = underTest.getURI(); + if (!(controlUri.equals(underTestUri))) { + messages.add("Incorrect URI found. Expected: '" + controlUri + "'," + " received: '" + underTestUri + "'."); + } + } + return messages; } - return messages; - } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java new file mode 100644 index 0000000000..0d92abef17 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidationConfiguration.java @@ -0,0 +1,152 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $URL$ $LastChangedDate$ + */ + +package com.sun.ts.tests.common.taglibsig.validation; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +/** + * This configuration class defines the {@link Validator} names that will be used to perform the validation of the + * TaglibraryDescriptor objects. This class is used exclusively by the {@link ValidatorFactory}, which will take the + * names contained within and create {@link Validator} instances. + */ + +public class ValidationConfiguration { + + /* + * All standard Validators will be listed here. + */ + public static final String URI_VALIDATOR = "URIValidator"; + + /* + * Package name for standard validator implementations. + */ + private static final String VALIDATOR_PACKAGE = "com.sun.ts.tests.common.taglibsig.validation."; + + /* + * All standard validators will be stored in here as well. This is used by the initValidators() method. + */ + private static final String[] VALIDATORS = { URI_VALIDATOR }; + + /* + * Map of all Validator's and their implementing class. + */ + private static final Map KNOWN_VALIDATORS = new HashMap(); + + static { + // init the standard validator map + initValidators(); + } + + /* + * Map containing the Validators the end-user is interested in. + */ + private Map configuredValidatorMap; + + /** + * Constructs a new ValidationConfiguation instance. + */ + public ValidationConfiguration() { + configuredValidatorMap = new HashMap(); + } + + /** + *

+ * Adds the name of a {@link Validator} implementation to this configuration. The name must be a known name (i.e. be a + * constant name defined by this class), or a {@link Validator} will not be added. If a non-standard validator is + * required, use addValidator(String, String) instead. + *

+ * + * @param validatorName - Validator name + */ + public void addValidator(String validatorName) { + String className = (String) KNOWN_VALIDATORS.get(validatorName); + if (className != null) + configuredValidatorMap.put(validatorName, className); + } + + /** + *

+ * Adds a custom {@link Validator} name to the current configuration. + *

+ * + * @param validatorName - Validator name + * @param validatorClass - The class name of this {@link Validator} + */ + public void addValidator(String validatorName, String validatorClass) { + configuredValidatorMap.put(validatorName, validatorClass); + } + + /** + *

+ * Removes the specified {@link Validator} name from the current configuration. + *

+ * + * @param validatorName - Validator name + */ + public void removeValidator(String validatorName) { + configuredValidatorMap.remove(validatorName); + } + + /** + *

+ * Returns an Iterator of the {@link Validator} names in the current configuration. + *

+ * + * @return Iterator of this configuration's {@link Validator} names + */ + public Iterator getValidatorNames() { + return configuredValidatorMap.keySet().iterator(); + } + + /** + *

+ * Returns the name of the {@link Validator} implementation class. + *

+ * + * @param validatorName - Validator name + * @return The name of the {@link Validator} implementation class. + */ + public String getValidatorClass(String validatorName) { + return (String) configuredValidatorMap.get(validatorName); + } + + /** + *

+ * True if {@link Validator} names have been added to the current configuration, otherwise false. + *

+ * + * @return True if {@link Validator} names have been added to the current configuration, otherwise false. + */ + public boolean hasBeenConfigured() { + if (configuredValidatorMap.size() > 0) + return true; + return false; + } + + // Initialize all standard validators. + private static void initValidators() { + for (int i = 0; i < VALIDATORS.length; i++) { + KNOWN_VALIDATORS.put(VALIDATORS[i], VALIDATOR_PACKAGE + VALIDATORS[i]); + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java similarity index 69% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java index 79830117ad..5810f71393 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/Validator.java @@ -29,19 +29,15 @@ */ public interface Validator { - /** - *

- * Performs validations (specific to the particular implementation) of two - * {@link TagLibraryDescriptor} instances. - *

- * - * @param control - * - the control TagLibraryDescriptor - * @param underTest - * - the TagLibraryDescriptor that we are validating for correctness - * @return - */ - public List validate(TagLibraryDescriptor control, - TagLibraryDescriptor underTest); + /** + *

+ * Performs validations (specific to the particular implementation) of two {@link TagLibraryDescriptor} instances. + *

+ * + * @param control - the control TagLibraryDescriptor + * @param underTest - the TagLibraryDescriptor that we are validating for correctness + * @return + */ + public List validate(TagLibraryDescriptor control, TagLibraryDescriptor underTest); } diff --git a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java similarity index 53% rename from common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java rename to tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java index b82e2f876a..40b6a5575a 100644 --- a/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/taglibsig/validation/ValidatorFactory.java @@ -24,30 +24,27 @@ public class ValidatorFactory { - // No instances of Factory - private ValidatorFactory() { - } + // No instances of Factory + private ValidatorFactory() { + } - /** - *

- * Returns an instance of a {@link Validator} based on the provided class - * name. - *

- * - * @param className - * - The name of the Validator's implementation class - * @return a Validator instance of the class exists, otherwise null - */ - public static Validator getValidator(String className) { - Validator v = null; - try { - v = (Validator) Thread.currentThread().getContextClassLoader() - .loadClass(className).newInstance(); - } catch (Throwable t) { - // XXX Enhance this section - System.out.println(t.toString()); - TestUtil.logMsg(t.toString()); + /** + *

+ * Returns an instance of a {@link Validator} based on the provided class name. + *

+ * + * @param className - The name of the Validator's implementation class + * @return a Validator instance of the class exists, otherwise null + */ + public static Validator getValidator(String className) { + Validator v = null; + try { + v = (Validator) Thread.currentThread().getContextClassLoader().loadClass(className).newInstance(); + } catch (Throwable t) { + // XXX Enhance this section + System.out.println(t.toString()); + TestUtil.logMsg(t.toString()); + } + return v; } - return v; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/testlogic/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/testlogic/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/testlogic/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/testlogic/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java b/tools/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java new file mode 100644 index 0000000000..5159c64b34 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/TestLogic.java @@ -0,0 +1,171 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.testlogic.ejb.bb.argsemantics; + +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.ejb.calleebeans.SimpleArgument; +import com.sun.ts.tests.common.ejb.calleebeans.StatefulCallee; +import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeHome; +import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeLocal; +import com.sun.ts.tests.common.ejb.calleebeans.StatefulCalleeLocalHome; + +public class TestLogic { + + /* + * Names used for Callee beans lookups. + */ + public static final String prefix = "java:comp/env/"; + + public static final String statefulRemoteLookup = prefix + "ejb/StatefulCalleeRemote"; + + public static final String statefulLocalLookup = prefix + "ejb/StatefulCalleeLocal"; + + public static final String statefulBiRemoteLookup = prefix + "ejb/StatefulCalleeBothRemote"; + + public static final String statefulBiLocalLookup = prefix + "ejb/StatefulCalleeBothLocal"; + + /* + * Expected values for our custom argument. + */ + public static final int initialValue = 12; + + public static final int modifiedValue = 24; + + public static final int modifiedValue2 = 48; + + private static StatefulCallee ssfCalleeBean = null; + + private static StatefulCalleeLocal ssfCalleeLocalBean = null; + + public static boolean testStatefulRemote(TSNamingContext nctx, Properties props) { + + return testStatefulRemote(statefulRemoteLookup, nctx, props); + } + + public static boolean testStatefulLocal(TSNamingContext nctx, Properties props) { + + return testStatefulLocal(statefulLocalLookup, nctx, props); + } + + public static boolean testStatefulBoth(TSNamingContext nctx, Properties props) { + + boolean pass; + + pass = testStatefulRemote(statefulBiRemoteLookup, nctx, props); + pass &= testStatefulLocal(statefulBiLocalLookup, nctx, props); + + return pass; + } + + protected static boolean testStatefulRemote(String lookupName, TSNamingContext nctx, Properties props) { + + StatefulCalleeHome home; + ssfCalleeBean = null; + SimpleArgument arg; + boolean pass; + + try { + arg = new SimpleArgument(initialValue); + TestUtil.logTrace("[TestLogic] Initial value is " + arg.getValue()); + + TestUtil.logTrace("[TestLogic] Looking up Callee " + lookupName + " ..."); + home = (StatefulCalleeHome) nctx.lookup(lookupName, StatefulCalleeHome.class); + + ssfCalleeBean = home.create(props, arg); + TestUtil.logTrace("[TestLogic] Value after create is " + arg.getValue()); + + ssfCalleeBean.call(props, arg); + TestUtil.logTrace("[TestLogic] Value after business " + "method is " + arg.getValue()); + + pass = (arg.getValue() == initialValue); + if (!pass) { + TestUtil.logErr("[TestLogic] Argument has been " + "modified to " + arg.getValue()); + } + } catch (Exception e) { + pass = false; + TestUtil.logErr("[TestLogic] Unexpected exception", e); + } + + return pass; + } + + protected static boolean testStatefulLocal(String lookupName, TSNamingContext nctx, Properties props) { + + StatefulCalleeLocalHome home; + ssfCalleeLocalBean = null; + SimpleArgument arg; + String msg; + boolean pass; + + try { + arg = new SimpleArgument(initialValue); + TestUtil.logTrace("[TestLogic] Initial value is " + arg.getValue()); + + TestUtil.logTrace("[TestLogic] Looking up Callee " + lookupName + " ..."); + home = (StatefulCalleeLocalHome) nctx.lookup(lookupName); + + ssfCalleeLocalBean = home.create(props, arg); + TestUtil.logTrace("[TestLogic] Value after create is " + arg.getValue()); + pass = (arg.getValue() == modifiedValue); + if (!pass) { + msg = "Expected Argument to be set to " + modifiedValue; + TestUtil.logErr("[TestLogic] " + msg); + throw new Exception(msg); + } + + ssfCalleeLocalBean.call(props, arg); + TestUtil.logTrace("[TestLogic] Value after business " + "method is " + arg.getValue()); + + pass = (arg.getValue() == modifiedValue2); + if (!pass) { + TestUtil.logErr("[TestLogic] Expected argument to be " + "set to " + modifiedValue2); + } + } catch (Exception e) { + pass = false; + TestUtil.logErr("[TestLogic] Unexpected exception", e); + } + + return pass; + } + + public static void cleanUpStatefulBean() { + TestUtil.logTrace("cleanUpStatefulBean"); + try { + if (ssfCalleeBean != null) { + TestUtil.logTrace("cleanUp Session Stateful Remote Callee Bean"); + ssfCalleeBean.remove(); + ssfCalleeBean = null; + } + + if (ssfCalleeLocalBean != null) { + TestUtil.logTrace("cleanUp Session Stateful Local Callee Bean"); + ssfCalleeLocalBean.remove(); + ssfCalleeLocalBean = null; + } + } catch (Exception e) { + TestUtil.logErr("Exception caught trying to remove Stateful Session beans", e); + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/testlogic/ejb/bb/argsemantics/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java new file mode 100644 index 0000000000..7b72f6c6e5 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/EmptyVehicleRunner.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle; + +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.ServiceEETest; +import com.sun.ts.lib.util.TestUtil; + +public class EmptyVehicleRunner implements VehicleRunnable { + + public Status run(String[] argv, Properties p) { + + ServiceEETest theTestClient; + Status sTestStatus = Status.passed(""); + + // create an instance of the test client and run here + try { + String testClassName = TestUtil.getProperty(p, "test_classname"); + Class c = Class.forName(testClassName); + theTestClient = (ServiceEETest) c.newInstance(); + theTestClient.setSharedObject(VehicleClient.getClientSharedObject()); + sTestStatus = theTestClient.run(argv, p); + } catch (ClassNotFoundException cnfe) { + TestUtil.logErr("Failed to create the EETest instance", cnfe); + sTestStatus = Status.failed("Failed to create the EETest instance"); + } catch (InstantiationException ie) { + TestUtil.logErr("Failed to create the EETest instance", ie); + sTestStatus = Status.failed("Failed to create the EETest instance"); + } catch (Exception e) { + TestUtil.logErr("Failed running in a client side vehicle", e); + sTestStatus = Status.failed("Failed running in a client side vehicle"); + } + + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java similarity index 63% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java index b188591bf8..3b991a6185 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleClient.java @@ -27,29 +27,29 @@ * Class used as a client of all vehicle tests. */ public class VehicleClient extends ServiceEETest { - String[] sVehicles; - - private static Object theSharedObject = null; - - /* Run test in standalone mode */ - public static void main(String[] args) { - VehicleClient client = new VehicleClient(); - Status s = client.run(args, System.out, System.err); - s.exit(); - } - - /* - * Set shared object - */ - public static void setClientSharedObject(Object o) { - theSharedObject = o; - } - - /* - * Get shared object - */ - public static Object getClientSharedObject() { - return theSharedObject; - } + String[] sVehicles; + + private static Object theSharedObject = null; + + /* Run test in standalone mode */ + public static void main(String[] args) { + VehicleClient client = new VehicleClient(); + Status s = client.run(args, System.out, System.err); + s.exit(); + } + + /* + * Set shared object + */ + public static void setClientSharedObject(Object o) { + theSharedObject = o; + } + + /* + * Get shared object + */ + public static Object getClientSharedObject() { + return theSharedObject; + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java similarity index 94% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java index 18e683f23f..3ed9cd4086 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnable.java @@ -25,5 +25,5 @@ import com.sun.ts.lib.harness.Status; public interface VehicleRunnable { - public Status run(String[] argv, Properties p); + public Status run(String[] argv, Properties p); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java new file mode 100644 index 0000000000..b931d4b5dd --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/VehicleRunnerFactory.java @@ -0,0 +1,332 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle; + +import java.lang.System.Logger; + +public final class VehicleRunnerFactory { + + private static final Logger logger = System.getLogger(VehicleRunnerFactory.class.getName()); + + private static VehicleRunnable ejbRunner; + + private static VehicleRunnable servletRunner; + + private static VehicleRunnable jspRunner; + + private static VehicleRunnable ejbLiteJsfRunner; + + private static VehicleRunnable ejbLiteJspRunner; + + private static VehicleRunnable ejbLiteSecuredJspRunner; + + private static VehicleRunnable emptyRunner; + + private static VehicleRunnable stateless3Runner; + + private static VehicleRunnable stateful3Runner; + + private static VehicleRunnable appmanagedRunner; + + private static VehicleRunnable appmanagedNoTxRunner; + + private static VehicleRunnable wsejbRunner; + + private static VehicleRunnable wsservletRunner; + + private static VehicleRunnable pmservletRunner; + + private static VehicleRunnable puservletRunner; + + private static VehicleRunnable connectorServletRunner; + + private static VehicleRunnable customVehicleRunner; + + private static VehicleRunnable webRunner; + + private VehicleRunnerFactory() { + } + + private static VehicleRunnable getEJBRunner() { + if (ejbRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.ejb.EJBVehicleRunner"); + ejbRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return ejbRunner; + } + + private static VehicleRunnable getServletRunner() { + if (servletRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.servlet.ServletVehicleRunner"); + servletRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return servletRunner; + } + + private static VehicleRunnable getJSPRunner() { + if (jspRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.jsp.JSPVehicleRunner"); + jspRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return jspRunner; + } + + private static VehicleRunnable getEJBLiteJSFRunner() { + if (ejbLiteJsfRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.ejblitejsf.EJBLiteJSFVehicleRunner"); + ejbLiteJsfRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return ejbLiteJsfRunner; + } + + private static VehicleRunnable getEJBLiteWebRunner() { + if (ejbLiteJspRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteWebVehicleRunner"); + ejbLiteJspRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return ejbLiteJspRunner; + } + + private static VehicleRunnable getEJBLiteSecuredWebRunner() { + if (ejbLiteSecuredJspRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteSecuredWebVehicleRunner"); + ejbLiteSecuredJspRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return ejbLiteSecuredJspRunner; + } + + private static VehicleRunnable getWebRunner() { + if (webRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.web.WebVehicleRunner"); + webRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return webRunner; + } + + private static VehicleRunnable getEmptyRunner() { + if (emptyRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.EmptyVehicleRunner"); + emptyRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return emptyRunner; + } + + private static VehicleRunnable getStateless3Runner() { + if (stateless3Runner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.stateless3.Stateless3VehicleRunner"); + stateless3Runner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return stateless3Runner; + } + + private static VehicleRunnable getStateful3Runner() { + if (stateful3Runner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.stateful3.Stateful3VehicleRunner"); + stateful3Runner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return stateful3Runner; + } + + private static VehicleRunnable getAppManagedRunner() { + if (appmanagedRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.appmanaged.AppManagedVehicleRunner"); + appmanagedRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return appmanagedRunner; + } + + private static VehicleRunnable getAppManagedNoTxRunner() { + if (appmanagedNoTxRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.appmanagedNoTx.AppManagedNoTxVehicleRunner"); + appmanagedNoTxRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return appmanagedNoTxRunner; + } + + private static VehicleRunnable getWSEJBRunner() { + if (wsejbRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.wsejb.WSEJBVehicleRunner"); + wsejbRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return wsejbRunner; + } + + private static VehicleRunnable getWSServletRunner() { + if (wsservletRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.wsservlet.WSServletVehicleRunner"); + wsservletRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return wsservletRunner; + } + + private static VehicleRunnable getPMServletRunner() { + if (pmservletRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.pmservlet.PMServletVehicleRunner"); + pmservletRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return pmservletRunner; + } + + private static VehicleRunnable getPUServletRunner() { + if (puservletRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.puservlet.PUServletVehicleRunner"); + puservletRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return puservletRunner; + } + + private static VehicleRunnable getConnectorServletRunner() { + if (connectorServletRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.connectorservlet.ConnectorServletVehicleRunner"); + connectorServletRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return connectorServletRunner; + } + + // this supports the rare case of a user defined custome vehicle + private static VehicleRunnable getCustomVehicleRunner() { + if (customVehicleRunner == null) { + try { + Class c = Class.forName("com.sun.ts.tests.common.vehicle.customvehicle.CustomVehicleRunner"); + customVehicleRunner = (VehicleRunnable) c.newInstance(); + } catch (Exception ex) { + ex.printStackTrace(); + } + } + return customVehicleRunner; + } + + // runners are stateless and thus can be cached and reused. + // But we cannot have reference to ejb vehicle directory in + // order to compile this class in any tck's. + public static VehicleRunnable getVehicleRunner(String vtype) { + if (vtype.equalsIgnoreCase("ejb")) { + return getEJBRunner(); + } else if (vtype.equalsIgnoreCase("servlet")) { + return getServletRunner(); + } else if (vtype.equalsIgnoreCase("jsp")) { + return getJSPRunner(); + } else if (vtype.equalsIgnoreCase("web")) { + return getWebRunner(); + } else if (vtype.equalsIgnoreCase("stateless3")) { + return getStateless3Runner(); + } else if (vtype.equalsIgnoreCase("stateful3")) { + return getStateful3Runner(); + } else if (vtype.equalsIgnoreCase("appmanaged")) { + return getAppManagedRunner(); + } else if (vtype.equalsIgnoreCase("appmanagedNoTx")) { + return getAppManagedNoTxRunner(); + } else if (vtype.equalsIgnoreCase("wsejb")) { + return getWSEJBRunner(); + } else if (vtype.equalsIgnoreCase("wsservlet")) { + return getWSServletRunner(); + } else if (vtype.equalsIgnoreCase("pmservlet")) { + return getPMServletRunner(); + } else if (vtype.equalsIgnoreCase("puservlet")) { + return getPUServletRunner(); + } else if (vtype.equalsIgnoreCase("connectorservlet")) { + return getConnectorServletRunner(); + } else if (vtype.equalsIgnoreCase("customvehicle")) { + return getCustomVehicleRunner(); + } else if (vtype.equalsIgnoreCase("ejblitejsf")) { + return getEJBLiteJSFRunner(); + } else if (vtype.equalsIgnoreCase("ejblitejsp") || vtype.equalsIgnoreCase("ejbliteservlet") + || vtype.equalsIgnoreCase("ejbliteservlet2") || vtype.equalsIgnoreCase("ejbliteservletcal")) { + return getEJBLiteWebRunner(); + } else if (vtype.equalsIgnoreCase("ejblitesecuredjsp")) { + return getEJBLiteSecuredWebRunner(); + } else { + if (!vtype.equalsIgnoreCase("appclient") && !vtype.equalsIgnoreCase("wsappclient") && !vtype.equalsIgnoreCase("standalone")) { + logger.log(Logger.Level.WARNING, "Invalid vehicle {" + vtype + "}. Will run test directly."); + + } + return getEmptyRunner(); + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/appclient_vehicle_client.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/appclient_vehicle_client.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/appclient_vehicle_client.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/appclient_vehicle_client.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appclient/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java new file mode 100644 index 0000000000..af3ebc5bbb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleBean.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.appmanaged; + +import java.util.Properties; + +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper; + +import jakarta.annotation.Resource; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceUnit; + +@Stateful(name = "AppManagedVehicleBean") +@Remote({ AppManagedVehicleIF.class }) +public class AppManagedVehicleBean extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean + implements AppManagedVehicleIF, java.io.Serializable { + + public AppManagedVehicleBean() { + super(); + } + + protected String getVehicleType() { + return APPMANAGED; + } + + private EntityManagerFactory emf; + + // ================== business methods ==================================== + @Remove + public RemoteStatus runTest(String[] args, Properties props) { + props.put("persistence.unit.name", "CTS-EM"); + try { + setEntityManager(emf.createEntityManager()); + RemoteStatus retValue; + retValue = super.runTest(args, props); + return retValue; + } finally { + try { + if (getEntityManager().isOpen()) { + getEntityManager().close(); + } + } catch (Exception e) { + System.out.println("Exception caught during em.close()" + e); + } + } + } + ///////////////////////////////////////////////////////////////////////// + + @Resource + public void setSessionContext(SessionContext sessionContext) { + this.sessionContext = sessionContext; + } + + @PersistenceUnit(unitName = "CTS-EM") + public void setEntityManagerFactory(EntityManagerFactory emf) { + this.emf = emf; + this.entityManagerFactory = emf; + } + + public void setEntityManager(EntityManager entityManager) { + this.entityManager = entityManager; + } + + protected EntityTransaction getEntityTransaction() { + return new NoopTransactionWrapper(); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java similarity index 88% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java index d24afb39fc..8d0dbbf3d9 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleIF.java @@ -20,7 +20,6 @@ package com.sun.ts.tests.common.vehicle.appmanaged; -public interface AppManagedVehicleIF - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { +public interface AppManagedVehicleIF extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java new file mode 100644 index 0000000000..64c60c2814 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/AppManagedVehicleRunner.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.appmanaged; + +import java.util.Properties; + +import javax.naming.InitialContext; +import javax.naming.NameClassPair; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; + +public class AppManagedVehicleRunner implements VehicleRunnable { + public static final String APPMANAGED_REF_NAME = "java:comp/env/ejb/AppManagedVehicleBean"; + + public Status run(String[] args, Properties props) { + Status sTestStatus = null; + try { + AppManagedVehicleIF bean = null; + TSNamingContext jc = new TSNamingContext(props); + try { + bean = (AppManagedVehicleIF) jc.lookup(APPMANAGED_REF_NAME); + } catch (Exception e) { + e.printStackTrace(); + dumpJndi("", new InitialContext()); + } + TestUtil.logTrace("application-managed JTA runner looked up vehicle: " + bean); + sTestStatus = (bean.runTest(args, props)).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed.", e); + sTestStatus = Status.failed("Test run in application-managed JTA vehicle failed."); + } + return sTestStatus; + } + + private void dumpJndi(String s, InitialContext jc) { + try { + dumpTreeEntry(jc, jc.list(s), s); + } catch (Exception ignore) { + } + } + + private void dumpTreeEntry(InitialContext jc, NamingEnumeration list, String s) throws NamingException { + System.out.println("\n1. AppManagedVehicleRunner jndi dump walking down tree branch name = " + s); + while (list.hasMore()) { + NameClassPair ncp = list.next(); + System.out.println("2. AppManagedVehicleRunner jndi dump (show name + classname pair): " + ncp.toString()); + if (s.length() == 0) { + dumpJndi(ncp.getName(), jc); + } else { + dumpJndi(s + "/" + ncp.getName(), jc); + } + } + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanaged/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java new file mode 100644 index 0000000000..623fff77a4 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleBean.java @@ -0,0 +1,92 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.appmanagedNoTx; + +import java.util.Properties; + +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.tests.common.vehicle.ejb3share.EntityTransactionWrapper; + +import jakarta.annotation.Resource; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceUnit; + +@Stateful(name = "AppManagedNoTxVehicleBean") +@Remote({ AppManagedNoTxVehicleIF.class }) +public class AppManagedNoTxVehicleBean extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean + implements AppManagedNoTxVehicleIF, java.io.Serializable { + + public AppManagedNoTxVehicleBean() { + super(); + } + + protected String getVehicleType() { + return APPMANAGEDNOTX; + } + + private EntityManagerFactory emf; + + // ================== business methods ==================================== + @Remove + public RemoteStatus runTest(String[] args, Properties props) { + props.put("persistence.unit.name", "CTS-EM-NOTX"); + try { + setEntityManager(emf.createEntityManager()); + RemoteStatus retValue; + retValue = super.runTest(args, props); + return retValue; + } finally { + try { + if (getEntityManager().isOpen()) { + getEntityManager().close(); + } + } catch (Exception e) { + System.out.println("Exception caught during em.close()" + e); + } + } + } + ///////////////////////////////////////////////////////////////////////// + + @Resource + public void setSessionContext(SessionContext sessionContext) { + this.sessionContext = sessionContext; + } + + @PersistenceUnit(unitName = "CTS-EM-NOTX") + public void setEntityManagerFactory(EntityManagerFactory emf) { + this.emf = emf; + this.entityManagerFactory = emf; + } + + public void setEntityManager(EntityManager entityManager) { + this.entityManager = entityManager; + } + + protected EntityTransaction getEntityTransaction() { + return new EntityTransactionWrapper(getEntityManager().getTransaction()); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java index 451dd261a2..204433c104 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleIF.java @@ -20,7 +20,6 @@ package com.sun.ts.tests.common.vehicle.appmanagedNoTx; -public interface AppManagedNoTxVehicleIF - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { +public interface AppManagedNoTxVehicleIF extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java similarity index 58% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java index 541123c9a7..78d591a91f 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/AppManagedNoTxVehicleRunner.java @@ -28,23 +28,19 @@ import com.sun.ts.tests.common.vehicle.VehicleRunnable; public class AppManagedNoTxVehicleRunner implements VehicleRunnable { - public static final String APPMANAGEDNOTX_REF_NAME = "java:comp/env/ejb/AppManagedNoTxVehicleBean"; + public static final String APPMANAGEDNOTX_REF_NAME = "java:comp/env/ejb/AppManagedNoTxVehicleBean"; - public Status run(String[] args, Properties props) { - Status sTestStatus = null; - try { - TSNamingContext jc = new TSNamingContext(); - AppManagedNoTxVehicleIF bean = (AppManagedNoTxVehicleIF) jc - .lookup(APPMANAGEDNOTX_REF_NAME); - TestUtil.logTrace( - "application-managed resource-local runner looked up vehicle: " - + bean); - sTestStatus = (bean.runTest(args, props)).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed.", e); - sTestStatus = Status.failed( - "Test run in application-managed resource-local vehicle failed."); + public Status run(String[] args, Properties props) { + Status sTestStatus = null; + try { + TSNamingContext jc = new TSNamingContext(); + AppManagedNoTxVehicleIF bean = (AppManagedNoTxVehicleIF) jc.lookup(APPMANAGEDNOTX_REF_NAME); + TestUtil.logTrace("application-managed resource-local runner looked up vehicle: " + bean); + sTestStatus = (bean.runTest(args, props)).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed.", e); + sTestStatus = Status.failed("Test run in application-managed resource-local vehicle failed."); + } + return sTestStatus; } - return sTestStatus; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/appmanagedNoTx/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java new file mode 100644 index 0000000000..a376d70404 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicle.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * + */ +package com.sun.ts.tests.common.vehicle.connectorservlet; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.rmi.RemoteException; +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +public class ConnectorServletVehicle extends HttpServlet { + protected Properties properties = null; + + protected String[] arguments = null; + + protected EETest testObj = null; + + public void init(ServletConfig config) throws ServletException { + TestUtil.logTrace("init " + this.getClass().getName() + " ..."); + super.init(config); + } + + public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + try { + // get the inputstream and read any objects passed from the + // client, e.g. properties, args, etc. + // wrap the Inputstream in an ObjectInputstream and read + // the properties and args. + TestUtil.logTrace("ConnectorServletVehicle - In doGet"); + + ObjectInputStream objInStream = new ObjectInputStream(new BufferedInputStream(req.getInputStream())); + System.out.println("ConnectorServletVehicle - got InputStream"); + TestUtil.logTrace("ConnectorServletVehicle - got InputStream"); + properties = (Properties) objInStream.readObject(); + System.out.println("read properties!!!"); + + // create an instance of the test client and run here + String testClassName = TestUtil.getProperty(properties, "test_classname"); + Class c = Class.forName(testClassName); + testObj = (EETest) c.newInstance(); + + // Thread.currentThread().dumpStack(); + arguments = (String[]) objInStream.readObject(); + // arguments = new String[1]; + // arguments[0] = ""; + TestUtil.logTrace("ConnectorServletVehicle - read Objects"); + try { + TestUtil.init(properties); + TestUtil.logTrace("Remote logging set for Servlet Vehicle"); + TestUtil.logTrace("ConnectorServletVehicle - Here are the props"); + TestUtil.list(properties); + } catch (Exception e) { + throw new ServletException("unable to initialize remote logging"); + } + ObjectOutputStream objOutStream = new ObjectOutputStream(res.getOutputStream()); + System.out.println("got outputstream"); + // now run the test and return the result + RemoteStatus finalStatus = runTest(); + System.out.println("ran test"); + objOutStream.writeObject(finalStatus); + objOutStream.flush(); + objOutStream.close(); + + } catch (Throwable t) { + System.out.println(t.getMessage()); + TestUtil.logTrace(t.getMessage()); + t.printStackTrace(); + throw new ServletException("test failed to run within the Servlet Vehicle"); + } + + } + + public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + System.out.println("In doPost!"); + TestUtil.logTrace("In doPost"); + doGet(req, res); + } + + protected RemoteStatus runTest() throws RemoteException { + RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); + + try { + // call EETest impl's run method + sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); + + if (sTestStatus.getType() == Status.PASSED) + TestUtil.logMsg("Test running in servlet vehicle passed"); + else + TestUtil.logMsg("Test running in servlet vehicle failed"); + } catch (Throwable e) { + TestUtil.logErr("Test running in servlet vehicle failed", e); + sTestStatus = new RemoteStatus(Status.failed("Test running in servlet vehicle failed")); + } + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java similarity index 81% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java index ea373a5712..8060754f34 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorServletVehicleRunner.java @@ -24,13 +24,12 @@ * This should lookup and invoke the vehicle in the container (if there is one). */ public class ConnectorServletVehicleRunner extends ConnectorVehicleRunner { - protected Status run() { - // run in a connectorservlet - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a connectorservlet + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil - .logMsg("Test: returning from running in a connectorservlet vehicle"); + TestUtil.logMsg("Test: returning from running in a connectorservlet vehicle"); - return sTestStatus; - }// run + return sTestStatus; + }// run } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java new file mode 100644 index 0000000000..91782f7564 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/ConnectorVehicleRunner.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.vehicle.connectorservlet; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class ConnectorVehicleRunner implements VehicleRunnable { + + private static final Logger LOGGER = LoggerFactory.getLogger(ConnectorVehicleRunner.class); + + protected String sVehicle = "connectorservlet"; + + protected Status sTestStatus = Status.passed(""); + + String urlSuffix = ""; + + Status sServletStatus = Status.passed(""); + + String sVehicleArchiveName = ""; + + String contextRootPrefix; + + String[] argv; + + Properties p; + + public Status run(String[] argv, Properties p) { + this.argv = argv; + this.p = p; + sVehicle = TestUtil.getProperty(p, "vehicle"); + + // use this name for the context root or jndi name to eliminate + // naming conflicts for apps deployed at the same time + sVehicleArchiveName = TestUtil.getProperty(p, "vehicle_archive_name"); + + if (sVehicleArchiveName.indexOf("_vehicles") != -1) { + contextRootPrefix = sVehicleArchiveName.substring(0, sVehicleArchiveName.indexOf("_vehicles") + 1) + sVehicle + "_vehicle_web"; + } else { + if (sVehicleArchiveName.endsWith("_web")) { + contextRootPrefix = sVehicleArchiveName; + } else { + contextRootPrefix = sVehicleArchiveName + "_web"; + } + } + + // default urlSuffix + urlSuffix = "/" + contextRootPrefix + "/" + sVehicle + "_vehicle"; + + return run(); + } // run + + protected Status run() { + // run in a connectorservlet + urlSuffix = "/" + contextRootPrefix + "/connectorservlet_vehicle"; + sServletStatus = runWebVehicleTest("connectorservlet"); + + LOGGER.info("Test: returning from running in connectorservlet vehicles"); + + if (sServletStatus.isPassed()) { + sTestStatus = Status.passed("Test passed in a connectorservlet "); + } else { + sTestStatus = Status.failed("Test failed in a connectorservlet "); + } + return sTestStatus; + } + + protected Status runWebVehicleTest(String vehicle) { + URLConnection connection = null; + URL url = null; + ObjectOutputStream objOut = null; + ObjectInputStream objIn = null; + Status status; + + try { + String webServerHost = TestUtil.getProperty(p, "webServerHost"); + String webServerPort = TestUtil.getProperty(p, "webServerPort"); + url = new URL("http://" + webServerHost + ":" + Integer.parseInt(webServerPort) + urlSuffix); + connection = url.openConnection(); + LOGGER.info("Opened connection to {}", url); + connection.setDoOutput(true); + connection.setDoInput(true); + connection.setUseCaches(false); + connection.setRequestProperty("Content-Type", "java-internal/" + p.getClass().getName()); + // connection.connect(); + objOut = new ObjectOutputStream(connection.getOutputStream()); + LOGGER.trace("got outputstream"); + objOut.writeObject(p); + objOut.writeObject(argv); + LOGGER.trace("wrote objects to the {} vehicle", vehicle); + objOut.flush(); + objOut.close(); + objOut = null; + + // read the status when it comes back + objIn = new ObjectInputStream(connection.getInputStream()); + status = ((RemoteStatus) objIn.readObject()).toStatus(); + TestUtil.logMsg("Test status from a " + vehicle + ": " + status.getType() + ":" + status.getReason()); + + } catch (MalformedURLException e) { + e.printStackTrace(); + status = Status.failed("Fatal: Improper URL"); + } catch (NumberFormatException e) { + e.printStackTrace(); + status = Status.failed("Please set an appropriate value for the property: webServerPort"); + } catch (IOException e) { + e.printStackTrace(); + status = Status.failed("Fatal: Problem with connection: " + e); + } catch (Exception e) { + e.printStackTrace(); + status = Status.failed("ServiceTest failed inside a " + vehicle + ": " + e.getMessage()); + } finally { + + if (objOut != null) { + try { + objOut.close(); + } catch (Exception e) { + } + } + + if (objIn != null) { + try { + objIn.close(); + } catch (Exception e) { + } + } + } + return status; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/connectorservlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/connectorservlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/connectorservlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/connectorservlet/connectorservlet_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java similarity index 59% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java index a11a3e9014..abfb2644b5 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/CustomVehicleRunner.java @@ -22,32 +22,29 @@ import com.sun.ts.tests.common.vehicle.VehicleRunnable; /** - * This class is to be modified and rebuilt by any vendor needing to build their - * own custom vehicles. This should only be used as allowed on a case by case - * basis and must be explicitly stated as a viable option in the TCK user guide. + * This class is to be modified and rebuilt by any vendor needing to build their own custom vehicles. This should only + * be used as allowed on a case by case basis and must be explicitly stated as a viable option in the TCK user guide. * - * This class should be edited, compiled, and packaged as needed for the - * environment it is to be used in. This vehicle will be recognized as the - * "customvehicle" and it will be necessary to make appropriate changes to the + * This class should be edited, compiled, and packaged as needed for the environment it is to be used in. This vehicle + * will be recognized as the "customvehicle" and it will be necessary to make appropriate changes to the * TS_HOME/src/vehicle.properties file to indicate the use of this vehicle. * - * It is suggested that you use other vehicles as a model for implementing this. - * Additional information for using this class should be referenced in the TCK - * user guides for those technologies that support the definition and use of a + * It is suggested that you use other vehicles as a model for implementing this. Additional information for using this + * class should be referenced in the TCK user guides for those technologies that support the definition and use of a * custom vehicle. * */ public class CustomVehicleRunner implements VehicleRunnable { - protected final String sVehicle = "customvehicle"; + protected final String sVehicle = "customvehicle"; - public Status run(String[] argv, Properties p) { + public Status run(String[] argv, Properties p) { - // XXXX: implement your code to wrap and execute each test here - // such that each test will run in a customvehicle and return - // the result from each test. + // XXXX: implement your code to wrap and execute each test here + // such that each test will run in a customvehicle and return + // the result from each test. - return Status.failed("not implemented yet."); - } + return Status.failed("not implemented yet."); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/customvehicle/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java new file mode 100644 index 0000000000..6790fd1459 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicle.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.ejb; + +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.EJBException; + +public class EJBVehicle { + private EETest testObj; + + private Properties properties; + + private String[] arguments; + + public void initialize(String[] args, Properties p) { + // Initialize TestUtil Reporting + try { + TestUtil.init(p); + } catch (Exception e) { + TestUtil.logErr("initLogging failed in ejb vehicle.", e); + throw new EJBException(); + } + + arguments = args; + properties = p; + + // create an instance of the test client + try { + String testClassName = TestUtil.getProperty(properties, "test_classname"); + Class c = Class.forName(testClassName); + testObj = (EETest) c.newInstance(); + } catch (Exception e) { + TestUtil.logErr("Failed to create the EETest instance in the vehicle", e); + throw new EJBException(); + } + TestUtil.logTrace("initialize"); + } + + // the run method that we call here will either throw + // an exception (failed), or return void (pass) + public RemoteStatus runTest() { + RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); + + TestUtil.logTrace("in runTest()"); + + try { + // call EETest impl's run method + sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); + + if (sTestStatus.getType() == Status.PASSED) + TestUtil.logMsg("Test running in ejb vehicle passed"); + else + TestUtil.logMsg("Test running in ejb vehicle failed"); + } catch (Throwable e) { + e.printStackTrace(); + TestUtil.logErr("Test running in ejb vehicle failed", e); + sTestStatus = new RemoteStatus(Status.failed("Test running in ejb vehicle failed")); + } + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java similarity index 90% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java index b95c6c0a0d..875f990576 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRemote.java @@ -25,7 +25,7 @@ import com.sun.ts.lib.harness.RemoteStatus; public interface EJBVehicleRemote { - public RemoteStatus runTest(); + public RemoteStatus runTest(); - public void initialize(String[] args, Properties p); + public void initialize(String[] args, Properties p); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java new file mode 100644 index 0000000000..75ede1d330 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/EJBVehicleRunner.java @@ -0,0 +1,68 @@ +/* + * Copyright (c) 2007, 2024 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.ejb; + +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.porting.TSLoginContext; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; + +public class EJBVehicleRunner implements VehicleRunnable { + public Status run(String[] argv, Properties p) { + + Status sTestStatus = Status.passed(""); + String username = TestUtil.getProperty(p, "user"); + String password = TestUtil.getProperty(p, "password"); + + String isSecuredEjbClientValue = TestUtil.getProperty(p, "secured.ejb.vehicle.client"); + boolean isSecuredEjbClient = (isSecuredEjbClientValue != null); + TestUtil.logTrace("%%%%%%% isSecuredEjbClient = " + isSecuredEjbClient); + + if (isSecuredEjbClient) { + try { + TestUtil.logTrace("Test login in appclient for user " + username + " password " + password); + TSLoginContext loginContext = new TSLoginContext(); + loginContext.login(username, password); + } catch (Exception e) { + TestUtil.logErr("login failed", e); + sTestStatus = Status.failed("Test login in appclient failed for user " + username + " password " + password); + } + } + + String sEJBVehicleJndiName = ""; + EJBVehicleRemote ref = null; + try { + TSNamingContext jc = new TSNamingContext(); + sEJBVehicleJndiName = "java:comp/env/ejb/EJBVehicle"; + ref = (EJBVehicleRemote) jc.lookup(sEJBVehicleJndiName, EJBVehicleRemote.class); + ref.initialize(argv, p); + TestUtil.logTrace("in ejbvehicle: initialize ok; call runTest()"); + sTestStatus = (ref.runTest()).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed", e); + sTestStatus = Status.failed("Test run in ejb vehicle failed"); + } + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/build.xml diff --git a/jta/src/main/resources/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.jar.sun-application-client.xml diff --git a/jta/src/main/resources/vehicle/ejb/ejb_vehicle_client.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejb/ejb_vehicle_client.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_client.xml diff --git a/jta/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.jar.sun-ejb-jar.xml diff --git a/jta/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejb/ejb_vehicle_ejb.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb/ejb_vehicle_ejb.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java new file mode 100644 index 0000000000..5324eb8e18 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareBaseBean.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.vehicle.ejb3share; + +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.SessionContext; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; + +abstract public class EJB3ShareBaseBean implements EJB3ShareIF { + public static final String FINDER_TEST_NAME_KEY = "testName"; + + public static final String STATELESS3 = "stateless3"; + + public static final String STATEFUL3 = "stateful3"; + + public static final String APPMANAGED = "appmanaged"; + + public static final String APPMANAGEDNOTX = "appmanagedNoTx"; + + protected EntityManager entityManager; + + protected EntityManagerFactory entityManagerFactory; + + protected SessionContext sessionContext; + + protected abstract String getVehicleType(); + + protected EJB3ShareBaseBean() { + super(); + } + + // ================== business methods ==================================== + public RemoteStatus runTest(String[] args, Properties props) { + + try { + TestUtil.init(props); + } catch (Exception e) { + TestUtil.logErr("initLogging failed in " + getVehicleType() + " vehicle.", e); + } + + String testName = getTestName(props); + System.out.println("===== Starting " + testName + " in " + getVehicleType() + " ====="); + RemoteStatus sTestStatus = null; + + try { + // create an instance of the test client and run here + String testClassName = TestUtil.getProperty(props, "test_classname"); + Class c = Class.forName(testClassName); + EETest testClient = (EETest) c.newInstance(); + + initClient(testClient); + sTestStatus = new RemoteStatus(testClient.run(args, props)); + if (sTestStatus.getType() == Status.PASSED) + TestUtil.logMsg(testName + " in vehicle passed"); + } catch (Throwable e) { + String fail = testName + " in vehicle failed"; + // e.printStackTrace(); + TestUtil.logErr(fail, e); + sTestStatus = new RemoteStatus(Status.failed(fail)); + } + return sTestStatus; + } + + protected String getTestName(Properties props) { + String testName = TestUtil.getProperty(props, FINDER_TEST_NAME_KEY); + if (testName == null) { + testName = "test"; + } + return testName; + } + + private void initClient(EETest testClient) { + if (testClient instanceof UseEntityManager) { + EntityManager em = getEntityManager(); + if (em == null) { + throw new IllegalStateException("EntityManager is null"); + } + UseEntityManager client2 = (UseEntityManager) testClient; + EntityTransaction et = getEntityTransaction(); + client2.setEntityManager(em); + client2.setEntityTransaction(et); + client2.setInContainer(true); + } + + if (testClient instanceof UseEntityManagerFactory) { + EntityManagerFactory emf = getEntityManagerFactory(); + if (emf != null) { + UseEntityManagerFactory client2 = (UseEntityManagerFactory) testClient; + client2.setEntityManagerFactory(emf); + } + } + + } + + public SessionContext getSessionContext() { + return sessionContext; + } + + abstract public void setSessionContext(SessionContext sessionContext); + + public EntityManager getEntityManager() { + return entityManager; + } + + public EntityManagerFactory getEntityManagerFactory() { + return entityManagerFactory; + } + + public void setEntityManagerFactory(EntityManagerFactory emf) { + // do nothing this gets overridden in subclass + } + + abstract protected EntityTransaction getEntityTransaction(); + + abstract public void setEntityManager(EntityManager entityManager); +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java similarity index 93% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java index 97563d8983..ecd2e39f13 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EJB3ShareIF.java @@ -25,5 +25,5 @@ import com.sun.ts.lib.harness.RemoteStatus; public interface EJB3ShareIF { - public RemoteStatus runTest(String[] args, Properties props); + public RemoteStatus runTest(String[] args, Properties props); } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java similarity index 50% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java index 6775749c8e..489036cf7a 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/EntityTransactionWrapper.java @@ -23,50 +23,50 @@ import jakarta.persistence.EntityTransaction; final public class EntityTransactionWrapper implements EntityTransaction { - private EntityTransaction delegate; + private EntityTransaction delegate; - public EntityTransactionWrapper() { - } + public EntityTransactionWrapper() { + } - public EntityTransactionWrapper(EntityTransaction delegate) { - this.delegate = delegate; - } + public EntityTransactionWrapper(EntityTransaction delegate) { + this.delegate = delegate; + } - public void setDelegate(EntityTransaction delegate) { - this.delegate = delegate; - } + public void setDelegate(EntityTransaction delegate) { + this.delegate = delegate; + } - public void rollback() { - delegate.rollback(); - } + public void rollback() { + delegate.rollback(); + } - public boolean isActive() { - return delegate.isActive(); - } + public boolean isActive() { + return delegate.isActive(); + } - @Override - public void setTimeout(Integer timeout) { - delegate.setTimeout(timeout); - } + @Override + public void setTimeout(Integer timeout) { + delegate.setTimeout(timeout); + } - @Override - public Integer getTimeout() { - return delegate.getTimeout(); - } + @Override + public Integer getTimeout() { + return delegate.getTimeout(); + } - public void commit() { - delegate.commit(); - } + public void commit() { + delegate.commit(); + } - public void begin() { - delegate.begin(); - } + public void begin() { + delegate.begin(); + } - public void setRollbackOnly() { - delegate.setRollbackOnly(); - } + public void setRollbackOnly() { + delegate.setRollbackOnly(); + } - public boolean getRollbackOnly() { - return delegate.getRollbackOnly(); - } + public boolean getRollbackOnly() { + return delegate.getRollbackOnly(); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java similarity index 66% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java index 003b4b4795..715b2b62d9 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/NoopTransactionWrapper.java @@ -24,36 +24,36 @@ final public class NoopTransactionWrapper implements EntityTransaction { - public NoopTransactionWrapper() { - } + public NoopTransactionWrapper() { + } - public void rollback() { - } + public void rollback() { + } - public boolean isActive() { - return true; - } + public boolean isActive() { + return true; + } - @Override - public void setTimeout(Integer timeout) { + @Override + public void setTimeout(Integer timeout) { - } + } - @Override - public Integer getTimeout() { - return null; - } + @Override + public Integer getTimeout() { + return null; + } - public void commit() { - } + public void commit() { + } - public void begin() { - } + public void begin() { + } - public void setRollbackOnly() { - } + public void setRollbackOnly() { + } - public boolean getRollbackOnly() { - return false; - } + public boolean getRollbackOnly() { + return false; + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java similarity index 74% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java index 34677f8e55..5f4f455b50 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManager.java @@ -24,16 +24,16 @@ import jakarta.persistence.EntityTransaction; public interface UseEntityManager { - public void setEntityManager(EntityManager em); + public void setEntityManager(EntityManager em); - public EntityManager getEntityManager(); + public EntityManager getEntityManager(); - public void setEntityTransaction(EntityTransaction entityTransaction); + public void setEntityTransaction(EntityTransaction entityTransaction); - public EntityTransaction getEntityTransaction(); + public EntityTransaction getEntityTransaction(); - public void setInContainer(boolean inContainer); + public void setInContainer(boolean inContainer); - public boolean isInContainer(); + public boolean isInContainer(); } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java similarity index 92% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java index b24d10d55e..a6ff740713 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UseEntityManagerFactory.java @@ -19,5 +19,5 @@ import jakarta.persistence.EntityManagerFactory; public interface UseEntityManagerFactory { - public void setEntityManagerFactory(EntityManagerFactory emf); + public void setEntityManagerFactory(EntityManagerFactory emf); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java new file mode 100644 index 0000000000..a6a266fd8e --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/UserTransactionWrapper.java @@ -0,0 +1,135 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.ejb3share; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceException; +import jakarta.transaction.NotSupportedException; +import jakarta.transaction.Status; +import jakarta.transaction.SystemException; +import jakarta.transaction.UserTransaction; + +final public class UserTransactionWrapper implements EntityTransaction { + private UserTransaction delegate; + + /** + * These are the various status and values for a transaction STATUS_ACTIVE:0 STATUS_COMMITTED:3 STATUS_COMMITTING:8 + * STATUS_MARKED_ROLLBACK:1 STATUS_NO_TRANSACTION:6 STATUS_PREPARED:2 STATUS_PREPARING:7 STATUS_ROLLEDBACK:4 + * STATUS_ROLLING_BACK:9 STATUS_UNKNOWN:5 * + */ + public UserTransactionWrapper() { + } + + public UserTransactionWrapper(UserTransaction delegate) { + this.delegate = delegate; + } + + public void setDelegate(UserTransaction delegate) { + this.delegate = delegate; + } + + public void rollback() { + TestUtil.logTrace("in UserTransactionWrapper.rollback()"); + if (!isActive()) { + throw new IllegalStateException("Transaction is not active."); + } + try { + delegate.rollback(); + } catch (SystemException e) { + throw new PersistenceException(e); + } + } + + public boolean isActive() { + boolean active = false; + try { + int txStatus = delegate.getStatus(); + TestUtil.logTrace("UserTransactionWrapper.isActive().getStatus():" + txStatus); + if ((txStatus == Status.STATUS_ACTIVE) || (txStatus == Status.STATUS_MARKED_ROLLBACK)) { + active = true; + } + } catch (SystemException e) { + throw new PersistenceException(e); + } + return active; + } + + @Override + public void setTimeout(Integer timeout) { + + } + + @Override + public Integer getTimeout() { + return null; + } + + public void commit() { + TestUtil.logTrace("in UserTransactionWrapper.commit()"); + + if (!isActive()) { + throw new IllegalStateException("Transaction is not active."); + } + try { + delegate.commit(); + } catch (Exception e) { + throw new jakarta.persistence.RollbackException(e); + } + } + + public void begin() { + TestUtil.logTrace("in UserTransactionWrapper.begin()"); + if (isActive()) { + throw new IllegalStateException("Transaction is already active."); + } + try { + delegate.begin(); + TestUtil.logTrace("UserTransactionWrapper.begin().getStatus():" + delegate.getStatus()); + } catch (SystemException e) { + throw new PersistenceException(e); + } catch (NotSupportedException e) { + throw new PersistenceException(e); + } + } + + public void setRollbackOnly() { + TestUtil.logTrace("in UserTransactionWrapper.setRollbackOnly()"); + if (!isActive()) { + throw new IllegalStateException("Transaction is not active."); + } + } + + public boolean getRollbackOnly() { + TestUtil.logTrace("in UserTransactionWrapper.getRollbackOnly()"); + if (!isActive()) { + throw new IllegalStateException("Transaction is not active."); + } + try { + int txStatus = delegate.getStatus(); + TestUtil.logTrace("UserTransactionWrapper.getRollbackOnly().getStatus():" + txStatus); + return txStatus == Status.STATUS_MARKED_ROLLBACK; + } catch (SystemException e) { + throw new PersistenceException(e); + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejb3share/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java new file mode 100644 index 0000000000..8e1eda88c2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/InjectionResolver.java @@ -0,0 +1,275 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.vehicle.ejbembed; + +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +import com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF; + +import jakarta.annotation.PostConstruct; +import jakarta.ejb.EJB; +import jakarta.ejb.EJBs; +import jakarta.ejb.embeddable.EJBContainer; + +/** + * Since JavaEE annotations are not required in ejb embeddable usage, this class helps resolving @EJB and @PostConstruct + * in client classes when tests are running in ejbembed vehicle. + * + * It resolves type-level, field and setter @EJB injections, and @PostConstruct methods as well. This class constructs a + * portable jndi name from the metadata in @EJB annotations. + * + * All client classes and their superclasses need to be scanned for @EJB and @PostConstruct. The most general superclass + * should be processed first. However, all @PostConstruct methods must be invoked after all @EJB injections have been + * resolved and initialized. + * + * For type-level injections, name, beanName, and beanInterface are all required, and so they are sufficient to + * construct the portable jndi name. Then a mapping between JavaEE lookup name and portable global jndi name is + * recorded, which can be consulted when test methods look up the ejb ref. + * + * For field and setter @EJB injection, all 3 @EJB attributes are optional. beanInterface may be present or be inferred + * from the field or parameter type. Obtaining beanName is complicated and requires searching all ejb bean classes, + * parsing its component- defining annotations and parsing ejb-jar.xml. This part is too much for our purpose. + * + * So we make it a rule for test writers that all client classes that are to be run in ejbembed vehicle always use + * beanName attribute in @EJB injections. + * + * After a portable global jndi name is constructed, the field is initialized to the lookup result, and the setter + * method is invoked, passing the lookup result as the parameter. + * + * moduleName is set by various vehicles. + */ +public class InjectionResolver { + private static final Logger logger = Logger.getLogger("com.sun.ts.tests.common.vehicle.ejbembed"); + + private EJBContainer container; + + private EJBLiteClientIF client; + + private List postConstructMethods = new ArrayList(); + + public InjectionResolver(EJBLiteClientIF client, EJBContainer container) { + super(); + this.client = client; + this.container = container; + } + + public void resolve() { + resolve0(client.getClass()); + invokePostConstructMethods(); + } + + public void resolve0(Class cls) { + Class sup = cls.getSuperclass(); + if (sup != null && EJBLiteClientIF.class.isAssignableFrom(sup)) { + resolve0((Class) sup); + } + + resolveTypeLevelInjections(cls); + resolveFieldInjections(cls); + resolveSetterInjections(cls); + resolvePostConstruct(cls); + + logger.info("Resolved " + cls); + } + + private void resolvePostConstruct(Class cls) { + Method[] methods = cls.getDeclaredMethods(); + for (Method m : methods) { + PostConstruct pc = m.getAnnotation(PostConstruct.class); + if (pc != null) { + postConstructMethods.add(m); + } + } + } + + private void invokePostConstructMethods() { + for (Method m : postConstructMethods) { + m.setAccessible(true); + try { + m.invoke(client); + logger.info("Invoked PostConstruct method: " + m); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); + } + } + } + + private void resolveSetterInjections(Class cls) { + Method[] methods = cls.getDeclaredMethods(); + for (Method m : methods) { + EJB b = m.getAnnotation(EJB.class); + if (b == null) { + continue; + } + + logger.info("Resolving setter @EJB injection: " + b); + + String lookup = b.lookup(); // default value is "" + if (lookup.length() > 0 && lookup.startsWith("java:global")) { + logger.info("Got @EJB.lookup " + lookup); + } else { + Class beanInterface = b.beanInterface(); + String beanName = b.beanName(); + if (beanInterface.equals(Object.class)) { + Class[] paramTypes = m.getParameterTypes(); + beanInterface = paramTypes[0]; + } + if (beanName.length() == 0) { + beanName = getBeanNameFromDescription(b.description()); + } + if (beanName.length() == 0) { + throw new RuntimeException("beanName is not specified in @EJB injection on method " + m.toString()); + } + lookup = createGlobalJNDIName(beanInterface, beanName); + } + + Object beanFromLookup = lookup(lookup); + + m.setAccessible(true); + try { + m.invoke(client, beanFromLookup); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } catch (InvocationTargetException e) { + throw new RuntimeException(e); + } + } + } + + private void resolveFieldInjections(Class cls) { + Field[] fields = cls.getDeclaredFields(); + for (Field f : fields) { + EJB b = f.getAnnotation(EJB.class); + if (b == null) { + continue; + } + + logger.info("Resolving field @EJB injection: " + b); + + String lookup = b.lookup(); // default value is "" + if (lookup.length() > 0 && lookup.startsWith("java:global")) { + logger.info("Got @EJB.lookup " + lookup); + } else { + Class beanInterface = b.beanInterface(); + String beanName = b.beanName(); + if (beanInterface.equals(Object.class)) { + beanInterface = f.getType(); + } + if (beanName.length() == 0) { + beanName = getBeanNameFromDescription(b.description()); + } + if (beanName.length() == 0) { + throw new RuntimeException("beanName is not specified in @EJB injection on field " + f.toString()); + } + lookup = createGlobalJNDIName(beanInterface, beanName); + } + + Object beanFromLookup = lookup(lookup); + + f.setAccessible(true); + try { + f.set(client, beanFromLookup); + } catch (IllegalAccessException e) { + throw new RuntimeException(e); + } + } + } + + /** + * EJB spec requires that lookup and beanName attributes cannot be both present in the same @EJB. For those tests that + * specifically test lookup attribute, beanName value has to be indirectly specified in description attribute in the + * form: description="beanName=LookupBean" This method extracts the beanName value from description attribute of @EJB + */ + private String getBeanNameFromDescription(String description) { + String[] tokens = description.split("="); + String beanName = ""; + if (tokens.length == 2) { + beanName = tokens[1]; + logger.info("Got beanName indirectly from description: " + beanName); + } + return beanName; + } + + private void resolveTypeLevelInjections(Class cls) { + EJBs ejbs = cls.getAnnotation(EJBs.class); + EJB ejb = cls.getAnnotation(EJB.class); + + if (ejbs != null) { + for (EJB b : ejbs.value()) { + resolveTypeLevelEJB(b); + } + } + if (ejb != null) { + resolveTypeLevelEJB(ejb); + } + } + + private void resolveTypeLevelEJB(EJB b) { + // For type-level @EJB injections, all 3 attr are required + logger.info("Resolving type-level @EJB injection: " + b); + + Class beanInterface = b.beanInterface(); + String beanName = b.beanName(); + String name = b.name(); + String lookup = b.lookup(); // should be very rare to use lookup attr in + // type-level injections + + if (lookup.length() > 0 && lookup.startsWith("java:global")) { + logger.info("Got @EJB.lookup " + lookup); + } else { + lookup = createGlobalJNDIName(beanInterface, beanName); + } + + client.getJndiMapping().put(createJavaEELookupName(name), lookup); + } + + private String createJavaEELookupName(String name) { + return "java:comp/env/" + name; + } + + // java:global[/]//[!] + private String createGlobalJNDIName(Class beanInterface, String beanName) { + String result = EJBLiteClientIF.JAVA_GLOBAL_PREFIX; + result += client.getModuleName() + "/" + beanName + "!" + beanInterface.getName(); + + logger.info("Constructed portable global jndi name: " + result); + return result; + } + + private Object lookup(String lookupName) { + Object result = null; + javax.naming.Context context = container.getContext(); + try { + result = context.lookup(lookupName); + } catch (javax.naming.NamingException e) { + throw new RuntimeException(e); + } + + return result; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbembed/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java index fde0a9220e..51bddc823a 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/EJBLiteJSFVehicleRunner.java @@ -23,8 +23,8 @@ public class EJBLiteJSFVehicleRunner extends EJBLiteWebVehicleRunner { - @Override - protected String getServletPath(String vehicle) { - return "/faces/" + vehicle + "_vehicle.xhtml"; - } + @Override + protected String getServletPath(String vehicle) { + return "/faces/" + vehicle + "_vehicle.xhtml"; + } } diff --git a/jta/src/main/resources/vehicle/ejbliteservlet2/beans.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet2/beans.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/beans.xml diff --git a/jta/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle.xhtml diff --git a/jta/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/ejblitejsf_vehicle_web.xml diff --git a/jta/src/main/resources/vehicle/ejblitejsf/faces-config.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsf/faces-config.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsf/faces-config.xml diff --git a/jta/src/main/resources/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/EJBLiteJSPTag.java.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp.tld diff --git a/jta/src/main/resources/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp similarity index 100% rename from jta/src/main/resources/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitejsp/ejblitejsp_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/EJBLiteSecuredJSPTag.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/EJBLiteSecuredJSPTag.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/EJBLiteSecuredJSPTag.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/EJBLiteSecuredJSPTag.java.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp.tld b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp.tld similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp.tld rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp.tld diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle.jsp similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.war.sun-web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.war.sun-web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.war.sun-web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.war.sun-web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejblitesecuredjsp/ejblitesecuredjsp_vehicle_web.xml diff --git a/jta/src/main/resources/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/EJBLiteServletVehicle.java.txt diff --git a/jta/src/main/resources/vehicle/ejbliteservlet/HttpServletDelegate.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/HttpServletDelegate.java.txt similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet/HttpServletDelegate.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/HttpServletDelegate.java.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet/ejbliteservlet_vehicle_web.xml diff --git a/jta/src/main/resources/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/EJBLiteServlet2Filter.java.txt diff --git a/jta/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp similarity index 100% rename from jta/src/main/resources/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservlet2/ejbliteservlet2_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/EJBLiteServletContextAttributeListener.java.txt b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/EJBLiteServletContextAttributeListener.java.txt similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/EJBLiteServletContextAttributeListener.java.txt rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/EJBLiteServletContextAttributeListener.java.txt diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle.jsp similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/ejbliteservletcal_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/index.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/index.jsp similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/index.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteservletcal/index.jsp diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java new file mode 100644 index 0000000000..8ff7869b1b --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteClientIF.java @@ -0,0 +1,85 @@ +/* + * Copyright (c) 2009, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.ejbliteshare; + +import java.io.File; +import java.util.Map; + +import jakarta.ejb.embeddable.EJBContainer; + +public interface EJBLiteClientIF { + public static final String TEST_PASSED = "[TEST PASSED] "; + + public static final String TEST_FAILED = "[TEST FAILED] "; + + public static final String JAVA_GLOBAL_PREFIX = "java:global/"; + + public static final String JAVA_COMP_ENV_PREFIX = "java:comp/env/"; + + public static final String ADDITIONAL_MODULES_KEY = "-additionalModule"; + + public static final String EJBEMBED_JAR_NAME_BASE = "ejbembed_vehicle_ejb"; + + public void setInjectionSupported(Boolean injectionSupported); + + public Boolean getInjectionSupported(); + + public void runTestInVehicle(); + + public String getTestName(); + + public void setTestName(String testName); + + public String getStatus(); + + public String getReason(); + + public String getModuleName(); + + public void setModuleName(String mn); + + public Map getJndiMapping(); + + public EJBContainer getContainer(); + + public void setContainer(EJBContainer container); + + public javax.naming.Context getContext(); + + public void setAdditionalModules(File[] additionalModules); + + public void setContext(javax.naming.Context context); + + /** + * Subclass client can override this method to customize the container creation. The default implementation returns null + * in EJBLiteClientBase. Since the method must be invoked prior to container creation, way ahead of actual test method, + * this customization is only possible at test client level, not at test method level. + */ + public Map getContainerInitProperties(); + + /** + * This method is called by test client to set context ClassLoader to include additional classes and ejb modules. This + * method is called prior to creating EJBContainer. The default implementation does nothing and makes no change to the + * context ClassLoader in the current thread. Subclass client may choose to override this method to provide for + * additional ejb modules and classes. + */ + public void setContextClassLoader(); +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java new file mode 100644 index 0000000000..82832435c2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteSecuredWebVehicleRunner.java @@ -0,0 +1,89 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.tests.common.vehicle.ejbliteshare; + +import static com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.TEST_PASSED; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Properties; +import java.util.logging.Logger; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.porting.TSURL; +import com.sun.ts.lib.util.BASE64Encoder; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; + +public class EJBLiteSecuredWebVehicleRunner implements VehicleRunnable { + private final static Logger logger = Logger.getLogger(EJBLiteSecuredWebVehicleRunner.class.getName()); + + protected String getServletPath(String vehicle) { + return "/" + vehicle + "_vehicle.jsp"; + } + + public Status run(String[] argv, Properties p) { + String testName = TestUtil.getProperty(p, "testName"); + String vehicle = TestUtil.getProperty(p, "vehicle"); + String contextRoot = TestUtil.getProperty(p, "vehicle_archive_name"); + String queryString = "?testName=" + testName; + String requestUrl = "/" + contextRoot + getServletPath(vehicle) + queryString; + + String username = TestUtil.getProperty(p, "user"); + String password = TestUtil.getProperty(p, "password"); + + TSURL ctsURL = new TSURL(); + URL url = null; + HttpURLConnection connection = null; + int statusCode = Status.NOT_RUN; + String response = null; + try { + url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), + Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), requestUrl); + + // Encode authData + String authData = username + ":" + password; + + BASE64Encoder encoder = new BASE64Encoder(); + + String encodedAuthData = encoder.encode(authData.getBytes()); + + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setUseCaches(false); + + // set request property + connection.setRequestProperty("Authorization", "Basic " + encodedAuthData.trim()); + + logger.info("Connecting " + url.toExternalForm()); + connection.connect(); + + response = TestUtil.getResponse(connection).trim(); + if (response.indexOf(TEST_PASSED) >= 0) { + statusCode = Status.PASSED; + } else { + statusCode = Status.FAILED; + } + } catch (IOException e) { + statusCode = Status.FAILED; + response = "Failed to connect to the test webapp." + TestUtil.printStackTraceToString(e); + } + return new ReasonableStatus(statusCode, response); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java new file mode 100644 index 0000000000..d858eb6a5c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/EJBLiteWebVehicleRunner.java @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.vehicle.ejbliteshare; + +import static com.sun.ts.tests.common.vehicle.ejbliteshare.EJBLiteClientIF.TEST_PASSED; + +import java.io.IOException; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Properties; +import java.util.logging.Logger; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.porting.TSURL; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; + +public class EJBLiteWebVehicleRunner implements VehicleRunnable { + private final static Logger logger = Logger.getLogger(EJBLiteWebVehicleRunner.class.getName()); + + protected String getServletPath(String vehicle) { + return "/" + vehicle + "_vehicle.jsp"; + } + + protected String getQueryString(Properties p) { + return "?testName=" + TestUtil.getProperty(p, "testName"); + } + + public Status run(String[] argv, Properties p) { + String vehicle = TestUtil.getProperty(p, "vehicle"); + String contextRoot = TestUtil.getProperty(p, "vehicle_archive_name"); + String requestUrl = "/" + contextRoot + getServletPath(vehicle) + getQueryString(p); + + TSURL ctsURL = new TSURL(); + URL url = null; + HttpURLConnection connection = null; + int statusCode = Status.NOT_RUN; + String response = null; + try { + url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), + Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), requestUrl); + + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("GET"); + connection.setUseCaches(false); + logger.info("Connecting " + url.toExternalForm()); + connection.connect(); + + response = TestUtil.getResponse(connection).trim(); + if (response.indexOf(TEST_PASSED) >= 0) { + statusCode = Status.PASSED; + } else { + statusCode = Status.FAILED; + } + } catch (IOException e) { + statusCode = Status.FAILED; + response = "Failed to connect to the test webapp." + TestUtil.printStackTraceToString(e); + } + return new ReasonableStatus(statusCode, response); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java new file mode 100644 index 0000000000..f6a66c530c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/ReasonableStatus.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2008, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.vehicle.ejbliteshare; + +import com.sun.ts.lib.harness.Status; + +/** + * This class is used to work around javatest bugs/features: javatest Status constructor replaces all unprintable chars + * with one single space, making any multi-line reason unreadable; javatest Status does not have an overrideable + * setReason method. + */ +public class ReasonableStatus extends Status { + private String reason; + + public ReasonableStatus(int c, String r) { + super(c, ""); + reason = r; + + // print the status reason to console, regardless of same.jvm value. + // If it were printed inside exit() method, it will not be called when + // same.jvm is enabled (e.g., with -Dsame.jvm=true from command line) + System.out.println(reason); + } + + @Override + public String getReason() { + return reason; + } + + // In same.jvm mode, when this method is overridden, the test status is + // printed + // three times in jtr report file. When not overridden, only the status + // withou + // detailed reason (only pass/fail/notrun, etc) is included in jtr file. + // + // It does not affect different jvm mode. + // It does not affect test output on the console. + // @Override + // public String toString() { + // return String.format("%s; %s", super.toString(), reason); + // } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/ejbliteshare/build.xml diff --git a/el/src/main/resources/vehicle/jsp/JSPVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/JSPVehicleRunner.java similarity index 82% rename from el/src/main/resources/vehicle/jsp/JSPVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/JSPVehicleRunner.java index c12a1b4b8e..7787d20c93 100644 --- a/el/src/main/resources/vehicle/jsp/JSPVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/JSPVehicleRunner.java @@ -25,12 +25,12 @@ import com.sun.ts.tests.common.vehicle.web.WebVehicleRunner; public class JSPVehicleRunner extends WebVehicleRunner { - protected Status run() { - // run in a Jsp - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a Jsp + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil.logMsg("Test: returning from running in a jsp vehicle"); + TestUtil.logMsg("Test: returning from running in a jsp vehicle"); - return sTestStatus; - } + return sTestStatus; + } } diff --git a/el/src/main/resources/vehicle/jsp/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/build.xml similarity index 100% rename from el/src/main/resources/vehicle/jsp/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/build.xml diff --git a/jta/src/main/resources/vehicle/jsp/contentRoot/client.html b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/contentRoot/client.html similarity index 100% rename from jta/src/main/resources/vehicle/jsp/contentRoot/client.html rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/contentRoot/client.html diff --git a/jta/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/contentRoot/jsp_vehicle.jsp similarity index 100% rename from jta/src/main/resources/vehicle/jsp/contentRoot/jsp_vehicle.jsp rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/contentRoot/jsp_vehicle.jsp diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/jsp_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/jsp_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/jsp_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/jsp/jsp_vehicle_web.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java new file mode 100644 index 0000000000..cbb7effbd4 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicle.java @@ -0,0 +1,130 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.vehicle.pmservlet; + +import javax.naming.Context; +import javax.naming.InitialContext; +import javax.naming.NamingException; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManager; +import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManagerFactory; +import com.sun.ts.tests.common.vehicle.ejb3share.UserTransactionWrapper; +import com.sun.ts.tests.common.vehicle.servlet.ServletVehicle; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceContexts; +import jakarta.persistence.PersistenceUnit; +import jakarta.transaction.UserTransaction; + +import java.io.PrintWriter; +import java.io.StringWriter; + +@PersistenceContexts({ @PersistenceContext(name = "persistence/CTS-EM", unitName = "CTS-EM"), + @PersistenceContext(name = "persistence/CTS-EM2", unitName = "CTS-EM2") }) +public class PMServletVehicle extends ServletVehicle { + + private static final String EM_LOOKUP_NAME = "java:comp/env/persistence/CTS-EM"; + + private UserTransaction ut; + + @PersistenceUnit(unitName = "CTS-EM") + EntityManagerFactory emf; + + public EntityTransaction getEntityTransaction() { + try { + TSNamingContext nctx = new TSNamingContext(); + ut = (UserTransaction) nctx.lookup("java:comp/UserTransaction"); + } catch (Exception e) { + TestUtil.logMsg("Naming service exception: " + e.getMessage()); + e.printStackTrace(); + } + return new UserTransactionWrapper(ut); + } + + private Object lookup(String lookupName) throws IllegalStateException { + Object result = null; + try { + Context context = new InitialContext(); + result = context.lookup(lookupName); + } catch (NamingException e) { + throw new IllegalStateException("Failed to lookup:" + lookupName, e); + } + return result; + } + + protected RemoteStatus runTest() { + properties.put("persistence.unit.name", "CTS-EM"); + + RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); + + try { + // call EETest impl's run method + if (testObj instanceof UseEntityManager) { + + // lookup EntityManager for each http request, + // so it's not shared by multiple threads + EntityManager em = (EntityManager) lookup(EM_LOOKUP_NAME); + + if (em == null) { + throw new IllegalStateException("EntityManager is null"); + } + UseEntityManager client2 = (UseEntityManager) testObj; + EntityTransaction et = getEntityTransaction(); + client2.setEntityManager(em); + client2.setEntityTransaction(et); + client2.setInContainer(true); + } + + if (testObj instanceof UseEntityManagerFactory) { + + if (emf == null) { + throw new IllegalStateException("EntityManagerFactory is null"); + } + UseEntityManagerFactory client2 = (UseEntityManagerFactory) testObj; + client2.setEntityManagerFactory(emf); + } + + sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); + + if (sTestStatus.getType() == Status.PASSED) { + System.out.println("Test running in pmservlet vehicle passed"); + } else { + System.out.println("Test running in pmservlet vehicle failed"); + } + } catch (Throwable e) { + StringBuilder sb = new StringBuilder(); + sb.append("Test running in pmservlet vehicle failed: "); + StringWriter sw = new StringWriter(); + e.printStackTrace(new PrintWriter(sw)); + sb.append(sw.toString()); + sTestStatus = new RemoteStatus(Status.failed(sb.toString())); + TestUtil.logErr("Test running in pmservlet vehicle failed", e); + } + + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java similarity index 80% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java index 4863c4b85a..d455f8e53e 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/PMServletVehicleRunner.java @@ -25,12 +25,12 @@ import com.sun.ts.tests.common.vehicle.web.WebVehicleRunner; public class PMServletVehicleRunner extends WebVehicleRunner { - protected Status run() { - // run in a pmservlet - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a pmservlet + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil.logMsg("Test: returning from running in a pmservlet vehicle"); + TestUtil.logMsg("Test: returning from running in a pmservlet vehicle"); - return sTestStatus; - }// run + return sTestStatus; + }// run } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/pmservlet/pmservlet_vehicle_web.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java new file mode 100644 index 0000000000..82a2719ed2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicle.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.vehicle.puservlet; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManager; +import com.sun.ts.tests.common.vehicle.ejb3share.UseEntityManagerFactory; +import com.sun.ts.tests.common.vehicle.servlet.ServletVehicle; + +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceUnit; + +public class PUServletVehicle extends ServletVehicle { + + @PersistenceUnit(unitName = "CTS-EM-NOTX") + EntityManagerFactory emf; + + protected RemoteStatus runTest() { + RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); + properties.put("persistence.unit.name", "CTS-EM-NOTX"); + + EntityManager em = null; + try { + // call EETest impl's run method + if (testObj instanceof UseEntityManager) { + em = emf.createEntityManager(); + if (em == null) { + throw new IllegalStateException("EntityManager is null"); + } + UseEntityManager client2 = (UseEntityManager) testObj; + EntityTransaction et = em.getTransaction(); + client2.setEntityManager(em); + client2.setEntityTransaction(et); + client2.setInContainer(true); + } + + if (testObj instanceof UseEntityManagerFactory) { + if (emf == null) { + throw new IllegalStateException("EntityManagerFactory is null"); + } + UseEntityManagerFactory client2 = (UseEntityManagerFactory) testObj; + client2.setEntityManagerFactory(emf); + } + + sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); + + if (sTestStatus.getType() == Status.PASSED) { + System.out.println("Test running in PersistenceUnit servlet vehicle passed"); + } else { + System.out.println("Test running in PersistenceUnit servlet vehicle failed"); + } + } catch (Throwable e) { + sTestStatus = new RemoteStatus(Status.failed("Test running in PersistenceUnit servlet vehicle failed")); + e.printStackTrace(); + } finally { + if (em != null) { + if (em.isOpen()) + em.close(); + } + } + + return sTestStatus; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java similarity index 80% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java index 285f9a937e..0cd1a4a3b2 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/PUServletVehicleRunner.java @@ -25,12 +25,12 @@ import com.sun.ts.tests.common.vehicle.web.WebVehicleRunner; public class PUServletVehicleRunner extends WebVehicleRunner { - protected Status run() { - // run in a pmservlet - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a pmservlet + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil.logMsg("Test: returning from running in a puservlet vehicle"); + TestUtil.logMsg("Test: returning from running in a puservlet vehicle"); - return sTestStatus; - }// run + return sTestStatus; + }// run } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/puservlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/puservlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/puservlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/puservlet/puservlet_vehicle_web.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicle.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicle.java new file mode 100644 index 0000000000..65821c60c2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicle.java @@ -0,0 +1,131 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * the pmservlet and puservlet vehicles are extended from this + * vehicle. + * + */ +package com.sun.ts.tests.common.vehicle.servlet; + +import java.io.BufferedInputStream; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.rmi.RemoteException; +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +public class ServletVehicle extends HttpServlet { + protected Properties properties = null; + + protected String[] arguments = null; + + protected EETest testObj = null; + + public void init(ServletConfig config) throws ServletException { + TestUtil.logTrace("init " + this.getClass().getName() + " ..."); + super.init(config); + } + + public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + try { + // get the inputstream and read any objects passed from the + // client, e.g. properties, args, etc. + // wrap the Inputstream in an ObjectInputstream and read + // the properties and args. + TestUtil.logTrace("ServletVehicle - In doGet"); + + ObjectInputStream objInStream = new ObjectInputStream(new BufferedInputStream(req.getInputStream())); + System.out.println("ServletVehicle - got InputStream"); + TestUtil.logTrace("ServletVehicle - got InputStream"); + properties = (Properties) objInStream.readObject(); + System.out.println("read properties!!!"); + + // create an instance of the test client and run here + String testClassName = TestUtil.getProperty(properties, "test_classname"); + Class c = Class.forName(testClassName); + testObj = (EETest) c.newInstance(); + + // Thread.currentThread().dumpStack(); + arguments = (String[]) objInStream.readObject(); + // arguments = new String[1]; + // arguments[0] = ""; + TestUtil.logTrace("ServletVehicle - read Objects"); + try { + TestUtil.init(properties); + TestUtil.logTrace("Remote logging set for Servlet Vehicle"); + TestUtil.logTrace("ServletVehicle - Here are the props"); + TestUtil.list(properties); + } catch (Exception e) { + throw new ServletException("unable to initialize remote logging"); + } + ObjectOutputStream objOutStream = new ObjectOutputStream(res.getOutputStream()); + System.out.println("got outputstream"); + // now run the test and return the result + RemoteStatus finalStatus = runTest(); + System.out.println("ran test"); + objOutStream.writeObject(finalStatus); + objOutStream.flush(); + objOutStream.close(); + + } catch (Throwable t) { + System.out.println(t.getMessage()); + TestUtil.logTrace(t.getMessage()); + t.printStackTrace(); + throw new ServletException("test failed to run within the Servlet Vehicle"); + } + + } + + public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + System.out.println("In doPost!"); + TestUtil.logTrace("In doPost"); + doGet(req, res); + } + + protected RemoteStatus runTest() throws RemoteException { + RemoteStatus sTestStatus = new RemoteStatus(Status.passed("")); + + try { + // call EETest impl's run method + sTestStatus = new RemoteStatus(testObj.run(arguments, properties)); + + if (sTestStatus.getType() == Status.PASSED) + TestUtil.logMsg("Test running in servlet vehicle passed"); + else + TestUtil.logMsg("Test running in servlet vehicle failed"); + } catch (Throwable e) { + TestUtil.logErr("Test running in servlet vehicle failed", e); + sTestStatus = new RemoteStatus(Status.failed("Test running in servlet vehicle failed")); + } + return sTestStatus; + } +} diff --git a/el/src/main/resources/vehicle/servlet/ServletVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicleRunner.java similarity index 81% rename from el/src/main/resources/vehicle/servlet/ServletVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicleRunner.java index 168ec4ebb7..9bef3931af 100644 --- a/el/src/main/resources/vehicle/servlet/ServletVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/ServletVehicleRunner.java @@ -25,12 +25,12 @@ import com.sun.ts.tests.common.vehicle.web.WebVehicleRunner; public class ServletVehicleRunner extends WebVehicleRunner { - protected Status run() { - // run in a servlet - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a servlet + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil.logMsg("Test: returning from running in a servlet vehicle"); + TestUtil.logMsg("Test: returning from running in a servlet vehicle"); - return sTestStatus; - }// run + return sTestStatus; + }// run } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/servlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/servlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/servlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/servlet/servlet_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/standalone/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/standalone/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/standalone/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/standalone/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java new file mode 100644 index 0000000000..3cc85699a0 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleBean.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.stateful3; + +import java.util.Properties; + +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.tests.common.vehicle.ejb3share.NoopTransactionWrapper; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.persistence.EntityManager; +import jakarta.persistence.EntityManagerFactory; +import jakarta.persistence.EntityTransaction; +import jakarta.persistence.PersistenceContext; +import jakarta.persistence.PersistenceUnit; + +@Stateful(name = "Stateful3VehicleBean") +@Remote({ Stateful3VehicleIF.class }) +public class Stateful3VehicleBean extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean + implements Stateful3VehicleIF, java.io.Serializable { + + @PersistenceUnit(name = "STATEFUL3EMF", unitName = "CTS-EM") + EntityManagerFactory emf; + + public Stateful3VehicleBean() { + super(); + } + + protected String getVehicleType() { + return STATEFUL3; + } + + @PostConstruct + public void init() { + try { + System.out.println("In PostContruct"); + EntityManagerFactory emf = (EntityManagerFactory) sessionContext.lookup("STATEFUL3EMF"); + setEntityManagerFactory(emf); + } catch (Exception e) { + System.out.println("ERROR: " + " In PostConstruct: Exception caught while setting EntityManagerFactory"); + e.printStackTrace(); + } + } + + // ================== business methods ==================================== + @Remove + public RemoteStatus runTest(String[] args, Properties props) { + RemoteStatus retValue; + props.put("persistence.unit.name", "CTS-EM"); + retValue = super.runTest(args, props); + return retValue; + } + ///////////////////////////////////////////////////////////////////////// + + @Resource + public void setSessionContext(SessionContext sessionContext) { + this.sessionContext = sessionContext; + } + + @PersistenceContext(unitName = "CTS-EM") + public void setEntityManager(EntityManager entityManager) { + this.entityManager = entityManager; + } + + public void setEntityManagerFactory(EntityManagerFactory emf) { + this.entityManagerFactory = emf; + } + + protected EntityTransaction getEntityTransaction() { + return new NoopTransactionWrapper(); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java similarity index 88% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java index 179b78674e..235efd5215 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleIF.java @@ -20,7 +20,6 @@ package com.sun.ts.tests.common.vehicle.stateful3; -public interface Stateful3VehicleIF - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { +public interface Stateful3VehicleIF extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java similarity index 60% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java index d5763129a1..8ce16a9c6d 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/Stateful3VehicleRunner.java @@ -28,20 +28,19 @@ import com.sun.ts.tests.common.vehicle.VehicleRunnable; public class Stateful3VehicleRunner implements VehicleRunnable { - public static final String STATEFUL3_REF_NAME = "java:comp/env/ejb/Stateful3VehicleBean"; + public static final String STATEFUL3_REF_NAME = "java:comp/env/ejb/Stateful3VehicleBean"; - public Status run(String[] args, Properties props) { - Status sTestStatus = null; - try { - TSNamingContext jc = new TSNamingContext(); - Stateful3VehicleIF bean = (Stateful3VehicleIF) jc - .lookup(STATEFUL3_REF_NAME); - TestUtil.logTrace("stateful3 runner looked up vehicle: " + bean); - sTestStatus = (bean.runTest(args, props)).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed.", e); - sTestStatus = Status.failed("Test run in stateful3 vehicle failed."); + public Status run(String[] args, Properties props) { + Status sTestStatus = null; + try { + TSNamingContext jc = new TSNamingContext(); + Stateful3VehicleIF bean = (Stateful3VehicleIF) jc.lookup(STATEFUL3_REF_NAME); + TestUtil.logTrace("stateful3 runner looked up vehicle: " + bean); + sTestStatus = (bean.runTest(args, props)).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed.", e); + sTestStatus = Status.failed("Test run in stateful3 vehicle failed."); + } + return sTestStatus; } - return sTestStatus; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateful3/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java similarity index 51% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java index dfd6707dad..db6b0a2bd5 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleBean.java @@ -39,52 +39,47 @@ @PersistenceContext(name = "STATELESS3EM", unitName = "CTS-EM") @Remote({ Stateless3VehicleIF.class }) @TransactionManagement(TransactionManagementType.BEAN) -public class Stateless3VehicleBean - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean - implements Stateless3VehicleIF { +public class Stateless3VehicleBean extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean implements Stateless3VehicleIF { - @PersistenceUnit(name = "STATELESS3EMF", unitName = "CTS-EM") - EntityManagerFactory emf; + @PersistenceUnit(name = "STATELESS3EMF", unitName = "CTS-EM") + EntityManagerFactory emf; - public Stateless3VehicleBean() { - super(); - } + public Stateless3VehicleBean() { + super(); + } - protected String getVehicleType() { - return STATELESS3; - } + protected String getVehicleType() { + return STATELESS3; + } - @Resource - public void setSessionContext(SessionContext sessionContext) { - this.sessionContext = sessionContext; - } + @Resource + public void setSessionContext(SessionContext sessionContext) { + this.sessionContext = sessionContext; + } - @PostConstruct - public void init() { - try { - System.out.println("In PostContruct"); - EntityManager entityManager = (EntityManager) sessionContext - .lookup("STATELESS3EM"); - EntityManagerFactory emf = (EntityManagerFactory) sessionContext - .lookup("STATELESS3EMF"); - setEntityManager(entityManager); - setEntityManagerFactory(emf); - } catch (Exception e) { - System.out.println("ERROR: " - + " In PostConstruct: Exception caught while setting EntityManager"); - e.printStackTrace(); + @PostConstruct + public void init() { + try { + System.out.println("In PostContruct"); + EntityManager entityManager = (EntityManager) sessionContext.lookup("STATELESS3EM"); + EntityManagerFactory emf = (EntityManagerFactory) sessionContext.lookup("STATELESS3EMF"); + setEntityManager(entityManager); + setEntityManagerFactory(emf); + } catch (Exception e) { + System.out.println("ERROR: " + " In PostConstruct: Exception caught while setting EntityManager"); + e.printStackTrace(); + } } - } - public void setEntityManager(EntityManager entityManager) { - this.entityManager = entityManager; - } + public void setEntityManager(EntityManager entityManager) { + this.entityManager = entityManager; + } - public void setEntityManagerFactory(EntityManagerFactory emf) { - this.entityManagerFactory = emf; - } + public void setEntityManagerFactory(EntityManagerFactory emf) { + this.entityManagerFactory = emf; + } - protected EntityTransaction getEntityTransaction() { - return new UserTransactionWrapper(sessionContext.getUserTransaction()); - } + protected EntityTransaction getEntityTransaction() { + return new UserTransactionWrapper(sessionContext.getUserTransaction()); + } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java similarity index 88% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java index a6035c9b1f..eb2462c8fd 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleIF.java @@ -20,7 +20,6 @@ package com.sun.ts.tests.common.vehicle.stateless3; -public interface Stateless3VehicleIF - extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { +public interface Stateless3VehicleIF extends com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareIF { } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java similarity index 55% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java index 0efd065db7..58ed596792 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/Stateless3VehicleRunner.java @@ -29,23 +29,22 @@ public class Stateless3VehicleRunner implements VehicleRunnable { - public static final String STATELESS3_REF_NAME = "java:comp/env/ejb/Stateless3VehicleBean"; + public static final String STATELESS3_REF_NAME = "java:comp/env/ejb/Stateless3VehicleBean"; - public Status run(String[] args, Properties props) { - Status sTestStatus = null; - Class beanType = Stateless3VehicleIF.class; - String refName = beanType.getName(); - try { - TSNamingContext jc = new TSNamingContext(); - Stateless3VehicleIF bean = (Stateless3VehicleIF) jc - .lookup(STATELESS3_REF_NAME); - TestUtil.logTrace("stateless3 runner looked up vehicle: " + bean); - props.put("persistence.unit.name", "CTS-EM"); - sTestStatus = (bean.runTest(args, props)).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed.", e); - sTestStatus = Status.failed("Test run in stateless3 vehicle failed."); + public Status run(String[] args, Properties props) { + Status sTestStatus = null; + Class beanType = Stateless3VehicleIF.class; + String refName = beanType.getName(); + try { + TSNamingContext jc = new TSNamingContext(); + Stateless3VehicleIF bean = (Stateless3VehicleIF) jc.lookup(STATELESS3_REF_NAME); + TestUtil.logTrace("stateless3 runner looked up vehicle: " + bean); + props.put("persistence.unit.name", "CTS-EM"); + sTestStatus = (bean.runTest(args, props)).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed.", e); + sTestStatus = Status.failed("Test run in stateless3 vehicle failed."); + } + return sTestStatus; } - return sTestStatus; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/stateless3/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java new file mode 100644 index 0000000000..69a4d99fa3 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/web/WebVehicleRunner.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.vehicle.web; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.util.Properties; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.RemoteStatus; +import com.sun.ts.lib.porting.TSURL; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.vehicle.VehicleRunnable; + +public class WebVehicleRunner implements VehicleRunnable { + + protected String sVehicle = ""; + + protected Status sTestStatus = Status.passed(""); + + String urlSuffix = ""; + + Status sServletStatus = Status.passed(""); + + Status sJspStatus = Status.passed(""); + + String sVehicleArchiveName = ""; + + String contextRootPrefix; + + String[] argv; + + Properties p; + + public Status run(String[] argv, Properties p) { + this.argv = argv; + this.p = p; + sVehicle = TestUtil.getProperty(p, "vehicle"); + + // use this name for the context root or jndi name to eliminate + // naming conflicts for apps deployed at the same time + sVehicleArchiveName = TestUtil.getProperty(p, "vehicle_archive_name"); + + if (sVehicleArchiveName.indexOf("_vehicles") != -1) { + contextRootPrefix = sVehicleArchiveName.substring(0, sVehicleArchiveName.indexOf("_vehicles") + 1) + sVehicle + "_vehicle_web"; + } else { + if (sVehicleArchiveName.endsWith("_web")) { + contextRootPrefix = sVehicleArchiveName; + } else { + contextRootPrefix = sVehicleArchiveName + "_web"; + } + } + + // default urlSuffix + urlSuffix = "/" + contextRootPrefix + "/" + sVehicle + "_vehicle"; + + return run(); + }// run + + protected Status run() { + if (sVehicle.equalsIgnoreCase("web")) { + // run in a servlet + urlSuffix = "/" + contextRootPrefix + "/servlet_vehicle"; + sServletStatus = runWebVehicleTest("servlet"); + + // run in a Jsp + urlSuffix = "/" + contextRootPrefix + "/jsp_vehicle"; + sJspStatus = runWebVehicleTest("jsp"); + + TestUtil.logMsg("Test: returning from running in web vehicles"); + } + + if (sServletStatus.isPassed() && sJspStatus.isPassed()) { + sTestStatus = Status.passed("Test passed in a servlet and in a jsp"); + } else if (sServletStatus.isFailed() && sServletStatus.isFailed()) { + sTestStatus = Status.failed("Test failed in a servlet and in a jsp"); + } else if (sJspStatus.isFailed()) { + sTestStatus = Status.failed("Test passed in a jsp but failed in a servlet"); + } else { + sTestStatus = Status.failed("Test passed in a servlet but failed in a jsp"); + } + return sTestStatus; + } + + protected Status runWebVehicleTest(String vehicle) { + URLConnection connection = null; + URL url = null; + ObjectOutputStream objOut = null; + ObjectInputStream objIn = null; + Status status; + + try { + if (vehicle.indexOf("jsp") != -1) { + urlSuffix += ".jsp"; + } + + TSURL ctsURL = new TSURL(); + url = ctsURL.getURL("http", TestUtil.getProperty(p, "webServerHost"), + Integer.parseInt(TestUtil.getProperty(p, "webServerPort")), urlSuffix); + connection = url.openConnection(); + TestUtil.logMsg("Opened connection to " + url); + connection.setDoOutput(true); + connection.setDoInput(true); + connection.setUseCaches(false); + connection.setRequestProperty("Content-Type", "java-internal/" + p.getClass().getName()); + // connection.connect(); + objOut = new ObjectOutputStream(connection.getOutputStream()); + TestUtil.logTrace("got outputstream"); + objOut.writeObject(p); + objOut.writeObject(argv); + TestUtil.logTrace("wrote objects to the " + vehicle + " vehicle"); + objOut.flush(); + objOut.close(); + objOut = null; + + // read the status when it comes back + if (vehicle.indexOf("jsp") != -1) { + Properties sprop = TestUtil.getResponseProperties(connection); + int type = Integer.parseInt(TestUtil.getProperty(sprop, "type")); + String reason = TestUtil.getProperty(sprop, "reason"); + status = new Status(type, reason); + } else { + objIn = new ObjectInputStream(connection.getInputStream()); + status = ((RemoteStatus) objIn.readObject()).toStatus(); + } + TestUtil.logMsg("Test status from a " + vehicle + ": " + status.getType() + ":" + status.getReason()); + + } catch (MalformedURLException e) { + e.printStackTrace(); + status = Status.failed("Fatal: Improper URL"); + } catch (NumberFormatException e) { + e.printStackTrace(); + status = Status.failed("Please set an appropriate value for the property: webServerPort"); + } catch (IOException e) { + e.printStackTrace(); + status = Status.failed("Fatal: Problem with connection: " + e); + } catch (Exception e) { + e.printStackTrace(); + status = Status.failed("ServiceTest failed inside a " + vehicle + ": " + e.getMessage()); + } finally { + + if (objOut != null) { + try { + objOut.close(); + } catch (Exception e) { + } + } + + if (objIn != null) { + try { + objIn.close(); + } catch (Exception e) { + } + } + } + return status; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/web/web_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/web/web_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/web/web_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/web/web_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/WSAppclient.java.src b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/WSAppclient.java.src similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/WSAppclient.java.src rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/WSAppclient.java.src diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/wsappclient_vehicle_client.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/wsappclient_vehicle_client.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/wsappclient_vehicle_client.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsappclient/wsappclient_vehicle_client.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicle.java.src b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicle.java.src similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicle.java.src rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicle.java.src diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java similarity index 90% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java index 00c68593a8..1b05eb9ae1 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRemote.java @@ -25,7 +25,7 @@ import com.sun.ts.lib.harness.RemoteStatus; public interface WSEJBVehicleRemote { - public RemoteStatus runTest(); + public RemoteStatus runTest(); - public void initialize(String[] args, Properties p); + public void initialize(String[] args, Properties p); } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java similarity index 57% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java index 03d39ca421..c5cb910392 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/WSEJBVehicleRunner.java @@ -28,23 +28,22 @@ import com.sun.ts.tests.common.vehicle.VehicleRunnable; public class WSEJBVehicleRunner implements VehicleRunnable { - public Status run(String[] argv, Properties p) { - Status sTestStatus = Status.passed(""); + public Status run(String[] argv, Properties p) { + Status sTestStatus = Status.passed(""); - String sEJBVehicleJndiName = ""; - WSEJBVehicleRemote ref = null; - try { - TSNamingContext jc = new TSNamingContext(); - sEJBVehicleJndiName = "java:comp/env/ejb/WSEJBVehicle"; - ref = (WSEJBVehicleRemote) jc.lookup(sEJBVehicleJndiName, - WSEJBVehicleRemote.class); - ref.initialize(argv, p); - TestUtil.logTrace("in wsejbvehicle: initialize ok; call runTest()"); - sTestStatus = (ref.runTest()).toStatus(); - } catch (Exception e) { - TestUtil.logErr("Test failed", e); - sTestStatus = Status.failed("Test run in wsejb vehicle failed"); + String sEJBVehicleJndiName = ""; + WSEJBVehicleRemote ref = null; + try { + TSNamingContext jc = new TSNamingContext(); + sEJBVehicleJndiName = "java:comp/env/ejb/WSEJBVehicle"; + ref = (WSEJBVehicleRemote) jc.lookup(sEJBVehicleJndiName, WSEJBVehicleRemote.class); + ref.initialize(argv, p); + TestUtil.logTrace("in wsejbvehicle: initialize ok; call runTest()"); + sTestStatus = (ref.runTest()).toStatus(); + } catch (Exception e) { + TestUtil.logErr("Test failed", e); + sTestStatus = Status.failed("Test run in wsejb vehicle failed"); + } + return sTestStatus; } - return sTestStatus; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_client.xml.src b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_client.xml.src similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_client.xml.src rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_client.xml.src diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_ejb.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_ejb.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_ejb.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsejb/wsejb_vehicle_ejb.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicle.java.src b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicle.java.src similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicle.java.src rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicle.java.src diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java similarity index 80% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java index 57d6bb183a..2f780d99a5 100644 --- a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/WSServletVehicleRunner.java @@ -25,12 +25,12 @@ import com.sun.ts.tests.common.vehicle.web.WebVehicleRunner; public class WSServletVehicleRunner extends WebVehicleRunner { - protected Status run() { - // run in a wsservlet - sTestStatus = runWebVehicleTest(sVehicle); + protected Status run() { + // run in a wsservlet + sTestStatus = runWebVehicleTest(sVehicle); - TestUtil.logMsg("Test: returning from running in a wsservlet vehicle"); + TestUtil.logMsg("Test: returning from running in a wsservlet vehicle"); - return sTestStatus; - }// run + return sTestStatus; + }// run } diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/wsservlet_vehicle_web.xml b/tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/wsservlet_vehicle_web.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/wsservlet_vehicle_web.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/vehicle/wsservlet/wsservlet_vehicle_web.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java similarity index 62% rename from common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java rename to tools/common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java index ceff21b7c8..d2a713130b 100644 --- a/common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/web/JSPBeanWrapper.java @@ -33,27 +33,26 @@ */ public class JSPBeanWrapper implements java.io.Serializable { - protected TSNamingContext nctx = null; - - /** No args constructor */ - public JSPBeanWrapper() { - try { - WebUtil.logMsg("[JSPBeanWrapper] Getting Naming Context"); - nctx = new TSNamingContext(); - } catch (Exception e) { - WebUtil.logErr("[JSPBeanWrapper] Unexpected exception", e); + protected TSNamingContext nctx = null; + + /** No args constructor */ + public JSPBeanWrapper() { + try { + WebUtil.logMsg("[JSPBeanWrapper] Getting Naming Context"); + nctx = new TSNamingContext(); + } catch (Exception e) { + WebUtil.logErr("[JSPBeanWrapper] Unexpected exception", e); + } } - } - public String executeTest(HttpServletRequest request) - throws ServletException { + public String executeTest(HttpServletRequest request) throws ServletException { - Properties resultProps; + Properties resultProps; - WebUtil.logTrace("[JSPBeanWrapper] executeTest()"); - resultProps = WebUtil.executeTest(this, request); + WebUtil.logTrace("[JSPBeanWrapper] executeTest()"); + resultProps = WebUtil.executeTest(this, request); - return WebUtil.propsToString(resultProps); - } + return WebUtil.propsToString(resultProps); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java b/tools/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java new file mode 100644 index 0000000000..c1da5e52cc --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/web/ServletWrapper.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.web; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; + +import jakarta.servlet.ServletConfig; +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServlet; +import jakarta.servlet.http.HttpServletRequest; +import jakarta.servlet.http.HttpServletResponse; + +/** + * Provide a testing framework for a Servlet test. + * + * This class is intended to be extended by the actual Servlet test class that will define one or more test methods. + * This is why this class is tagged "abstract". + * + * This class shield the final Servlet class from Servlet life cycle and specific testing framework. + * + * @see com.sun.ts.tests.common.web.WebServer + */ +public abstract class ServletWrapper extends HttpServlet { + + /** Name of property used to send back test result to client */ + public static final String RESULT_PROP = "ctsWebTestResult"; + + public static final String TEST_NAME_PROP = "ctsWebTestName"; + + protected static TSNamingContext nctx = null; + + private Properties servletProps = null; + + public void init(ServletConfig config) throws ServletException { + super.init(config); + + try { + WebUtil.logTrace("[ServletWrapper] init()"); + WebUtil.logTrace("[ServletWrapper] Getting naming ctx..."); + nctx = new TSNamingContext(); + } catch (Exception e) { + WebUtil.logErr("[ServletWrapper] Cannot get Naming ctx", e); + throw new ServletException("Cannot initialize Servlet"); + } + } + + public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + + PrintWriter out = null; + + try { + WebUtil.logTrace("[ServletWrapper] doGet()"); + res.setContentType("text/plain"); + out = res.getWriter(); + servletProps.list(out); + } catch (Exception e) { + WebUtil.logErr("[ServletWrapper] Exception in doGet()", e); + if (null != out) { + e.printStackTrace(out); + } + } finally { + if (null != out) { + out.close(); + } + } + } + + public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { + + WebUtil.logTrace("[ServletWrapper] doPost()"); + servletProps = WebUtil.executeTest(this, req); + doGet(req, res); + servletProps = null; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java b/tools/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java new file mode 100644 index 0000000000..071ba2e65c --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/web/WebServer.java @@ -0,0 +1,180 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.web; + +import java.net.URL; +import java.net.URLConnection; +import java.util.Properties; + +import com.sun.ts.lib.porting.TSURL; +import com.sun.ts.lib.util.TestUtil; + +/** + * Facade class to ease client access to a TS test deployed in the Web container. Shield clients from underlying TS and + * HTPP indiosyncrasies. + */ +public class WebServer { + + protected static final String PROTOCOL = "http"; + + protected static final String WEB_HOST_PROP = "webServerHost"; + + protected static final String WEB_PORT_PROP = "webServerPort"; + + protected static final String RESULT_PROP = "ctsWebTestResult"; + + protected static final String TEST_NAME_PROP = "ctsWebTestName"; + + protected String host; + + protected int port; + + protected URL url; + + protected URLConnection conn; + + protected Properties props; + + /** Constructor */ + private WebServer(String hostName, int portNumber, Properties p) throws IllegalArgumentException { + + if (null == hostName) { + throw new IllegalArgumentException("null host name!"); + } + + this.host = hostName; + this.port = portNumber; + this.props = p; + } + + /** + * Factory method to build a WebServer object from TS props parsing relevant properties. + */ + public static WebServer newInstance(Properties props) throws IllegalArgumentException { + + String host; + String portValue; + String msg; + int port; + + if (null == props) { + msg = "null properties!"; + TestUtil.logErr("[TSTestURL] " + msg); + throw new IllegalArgumentException(msg); + } + + host = TestUtil.getProperty(props, WEB_HOST_PROP); + if (null == host || host.equals("")) { + msg = "Empty " + WEB_HOST_PROP + " property: " + host; + printConfigError(msg); + throw new IllegalArgumentException(msg); + } + + portValue = TestUtil.getProperty(props, WEB_PORT_PROP); + if (null == portValue || portValue.equals("")) { + msg = "Empty " + WEB_PORT_PROP + " property: " + portValue; + printConfigError(msg); + throw new IllegalArgumentException(msg); + } + + try { + port = Integer.parseInt(portValue); + } catch (Exception e) { + msg = "Invalid " + WEB_PORT_PROP + " property: '" + portValue + "' : " + e.getMessage(); + printConfigError(msg); + throw new IllegalArgumentException(msg); + } + + return new WebServer(host, port, props); + } + + /** + * Call test 'testName' in web component deployed as 'webFile'. + * + * @param webFile file component (see java.net.URL) of the url the web component mapped to. + * + * @param testName Name of the test to run in this web component. + * + * @return true if test pass. false otherwise. + */ + public boolean test(String webFile, String testName) { + return (null != call(webFile, testName, this.props)); + } + + /** + * Call test 'testName' in web component deployed as 'webFile', passing 'args' as input parameters. + * + * @param webFile file component (see java.net.URL) of the url the web component mapped to. + * + * @param testName Name of the test to run in this web component. + * + * @param args input parameters in a Properties object. This object need at least to have valid TS harness logging + * properties; + * + * @return output parameters in a Properties object. Return null if a problem occured or test failed. + */ + public Properties call(String webFile, String testName, Properties args) throws IllegalArgumentException { + + URL url; + String status; + Properties results; + + if (null == args) { + throw new IllegalArgumentException("null args!"); + } + + try { + args.setProperty(TEST_NAME_PROP, testName); + + url = (new TSURL()).getURL(PROTOCOL, host, port, webFile); + conn = TestUtil.sendPostData(args, url); + TestUtil.logMsg("Getting response from url connection: " + url.toString()); + + results = TestUtil.getResponseProperties(conn); + if (null == results) { + TestUtil.logErr("[TSTestURL] null response props!"); + return null; + } + + // Too verbose - TestUtil.list(results); + + /* Check whether test passed, return null if test failed */ + status = results.getProperty(RESULT_PROP); + if (!(Boolean.valueOf(status).booleanValue())) { + return null; + } + } catch (Exception e) { + TestUtil.logErr("Caught exception: " + e.getMessage()); + e.printStackTrace(); + return null; + } + + return results; + } + + /** Convenience method to print TS configuration error messages */ + protected static void printConfigError(String msg) { + TestUtil.logErr("[TSTestURL] " + msg); + TestUtil.logErr("Please check you that " + WEB_HOST_PROP + " and " + WEB_PORT_PROP + " properties are set correctly " + + "in you ts.jte file"); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java b/tools/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java new file mode 100644 index 0000000000..a99d4ece38 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/web/WebUtil.java @@ -0,0 +1,170 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.web; + +import java.lang.reflect.Method; +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.servlet.ServletException; +import jakarta.servlet.http.HttpServletRequest; + +/** + * Factorize code used by JSP and Servlets. + * + * @see com.sun.ts.tests.common.web.ServletWrapper + * @see com.sun.ts.common.util.TestUtil + */ +public class WebUtil { + + /** Name of property used to send back test result to client */ + public static final String RESULT_PROP = "ctsWebTestResult"; + + /** Name of the property used to get the test method name */ + public static final String TEST_NAME_PROP = "ctsWebTestName"; + + public static void logMsg(String msg) { + TestUtil.logMsg(msg); + System.out.println(msg); + } + + public static void logTrace(String msg) { + TestUtil.logTrace(msg); + System.out.println(msg); + } + + public static void logErr(String msg) { + TestUtil.logErr(msg); + System.out.println(msg); + } + + public static void logErr(String msg, Exception e) { + TestUtil.logErr(msg, e); + System.out.println(msg + " : " + e); + e.printStackTrace(); + } + + /** + * Use information provided in a HTTPRequest to execute a test method on a testDriver object. The test method is + * "discovered" at runtime using the reflection API. The testDriver could be any java object. + */ + public static Properties executeTest(Object testDriver, HttpServletRequest req) throws ServletException { + + Boolean pass = Boolean.FALSE; + Properties webProps = null; + Class testDriverClass; + String testName; + Method testMethod; + Class params[] = { Properties.class }; + Object args[] = new Object[1]; + + logTrace("[WebUtil] executeTestOnInstance()"); + + /* + * Get harness properties and initialize logging. + */ + try { + logTrace("[WebUtil] Retrieving harness props..."); + + webProps = new Properties(); + Enumeration names = req.getParameterNames(); + while (names.hasMoreElements()) { + String name = (String) names.nextElement(); + String value = req.getParameter(name); + webProps.setProperty(name, value); + } + + logTrace("[WebUtil] Initializing Remote Logging..."); + TestUtil.init(webProps); + } catch (Exception e) { + System.out.println("Exception: " + e); + e.printStackTrace(); + throw new ServletException("Cannot Initialize CST Logging"); + } + + /* + * Get name of the test method. + */ + try { + logTrace("[WebUtil] Getting test name..."); + testName = TestUtil.getProperty(webProps, TEST_NAME_PROP); + } catch (Exception e) { + logErr("[WebUtil] Unexpected exception", e); + throw new ServletException("Cannot get test name"); + } + if (null == testName || testName.equals("")) { + logErr("[WebUtil] Invalid test name : " + testName); + throw new ServletException("Invalid test name"); + } + + /* + * Invoke test method on current instance. + */ + try { + logTrace("[WebUtil] Invoke test '" + testName + "'"); + testDriverClass = testDriver.getClass(); + testMethod = testDriverClass.getMethod(testName, params); + args[0] = webProps; + pass = (Boolean) testMethod.invoke(testDriver, args); + } catch (NoSuchMethodException e) { + logErr("[WebUtil] Cannot find method '" + testName + "' make sure it is defined in sub-class", e); + throw new ServletException("Test method is not defined"); + } catch (java.lang.reflect.InvocationTargetException e) { + logErr("[WebUtil] InvocationTargetException '" + testName + "' caused by " + e.getTargetException()); + throw new ServletException("Test method is not defined"); + } catch (Exception e) { + logErr("[WebUtil] Unexpected exception", e); + throw new ServletException("Cannot Invoke test method"); + } + + /* + * Set test result and send all properties back to client. + */ + webProps.setProperty(RESULT_PROP, pass.toString()); + + return webProps; + } + + /** + * Convert Java Properties to a String, as expected by on the client side (WebServer) + */ + public static String propsToString(Properties props) { + StringBuffer sb = new StringBuffer(1000); + Enumeration keys; + String name; + + if (null == props) { + throw new IllegalArgumentException("null props!"); + } + + keys = props.keys(); + while (keys.hasMoreElements()) { + name = (String) keys.nextElement(); + sb.append(name + "=" + props.getProperty(name) + "\n"); + } + + return sb.toString(); + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/common/web/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/web/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/web/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/web/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java new file mode 100644 index 0000000000..84fc81619d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/BaseUrlClient.java @@ -0,0 +1,585 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient; + +import java.util.Enumeration; +import java.util.Properties; +import java.util.logging.Logger; +import java.util.logging.Level; + +import com.sun.ts.lib.harness.Status; +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.util.TestUtil; +import org.apache.commons.httpclient.HttpState; + +import com.sun.ts.tests.common.webclient.http.HttpRequest; + +/** + *
+ * Provides base test initialization and runtime
+ * logic into a common class.
+ * All test areas will need to extend this class
+ * to provided area specific functionality needed for
+ * that particular technology.
+ * 
+ */ +public abstract class BaseUrlClient extends EETest { + private static final Logger LOGGER = Logger.getLogger(BaseUrlClient.class.getName()); + + /** + * Properties parameters + */ + public Properties _props; + + /** + * 401 - Unauthorized + */ + protected static final String UNAUTHORIZED = "401"; + + /** + * 403 - Forbidden + */ + protected static final String FORBIDDEN = "403"; + + /** + * 404 - not found + */ + protected static final String NOT_FOUND = "404"; + + /** + * 200 - ok + */ + protected static final String OK = "200"; + + /** + * 201 - created + */ + protected static final String CREATED = "201"; + + /** + * 500 - internal server error + */ + protected static final String INTERNAL_SERVER_ERROR = "500"; + + /** + * 503 - service unavailable + */ + protected static final String SERVICE_UNAVAILABLE = "503"; + + /** + * 100 - continue + */ + protected static final String CONTINUE = "100"; + + /** + * 302 - moved temporarily + */ + protected static final String MOVED_TEMPORARY = "302"; + + /** + * 410 - GONE + */ + protected static final String GONE = "410"; + + /** + * 411 - length required + */ + protected static final String LENGTH_REQUIRED = "411"; + + /** + * TS Webserver host property + */ + protected static final String SERVLETHOSTPROP = "webServerHost"; + + /** + * TS Webserver port property + */ + protected static final String SERVLETPORTPROP = "webServerPort"; + + /** + * TS home property + */ + protected static final String TSHOME = "ts_home"; + + /** + * Test properties + */ + protected static final Properties TEST_PROPS = new Properties(); + + /** + * StatusCode property + */ + protected static final String STATUS_CODE = "status-code"; + + /** + * Reason-Phrase property + */ + protected static final String REASON_PHRASE = "reason-phrase"; + + /** + * Expected headers property + */ + protected static final String EXPECTED_HEADERS = "expected_headers"; + + /** + * Unexpected header property + */ + protected static final String UNEXPECTED_HEADERS = "unexpected_headers"; + + /** + * Expect response body property + */ + protected static final String EXPECT_RESPONSE_BODY = "expect_response_body"; + + /** + * Request property + */ + protected static final String REQUEST = "request"; + + /** + * Request headers property + */ + protected static final String REQUEST_HEADERS = "request_headers"; + + /** + * Goldenfile property + */ + protected static final String GOLDENFILE = "goldenfile"; + + /** + * Search string property + */ + protected static final String SEARCH_STRING = "search_string"; + + /** + * Search string case insensitive property + */ + protected static final String SEARCH_STRING_IGNORE_CASE = "search_string_ignore_case"; + + /** + * Basic Auth username + */ + protected static final String BASIC_AUTH_USER = "basic_auth_user"; + + /** + * Basic Auth password + */ + protected static final String BASIC_AUTH_PASSWD = "basic_auth_passwd"; + + /** + * Basic Auth realm + */ + protected static final String BASIC_AUTH_REALM = "basic_auth_realm"; + + /** + * Unordered search string property + */ + protected static final String UNORDERED_SEARCH_STRING = "unordered_search_string"; + + /** + * Content property + */ + protected static final String CONTENT = "content"; + + /** + * Test name property + */ + protected static final String TEST_NAME = "testname"; + + /** + * Response Match property + */ + protected static final String RESPONSE_MATCH = "response_match"; + + /** + * Unexpected response match property + */ + protected static final String UNEXPECTED_RESPONSE_MATCH = "unexpected_response_match"; + + /** + * Standard test property + */ + protected static final String STANDARD = "standard"; + + /** + * Ignore response body + */ + protected static final String IGNORE_BODY = "ignore_body"; + + /** + * Validation strategy + */ + protected static final String STRATEGY = "strategy"; + + /** + * Current test directory + */ + protected String TESTDIR = null; + + /** + * Goldenfile directory + */ + protected String GOLDENFILEDIR = "/src/web"; + + /** + * Default request method + */ + protected static final String GET = "GET "; + + /** + * HTTP 1.0 + */ + protected static final String HTTP10 = " HTTP/1.0"; + + /** + * HTTP 1.1 + */ + protected static final String HTTP11 = " HTTP/1.1"; + + /** + * Forward slash + */ + protected static final String SL = "/"; + + /** + * Goldenfile suffix + */ + protected static final String GF_SUFFIX = ".gf"; + + /** + * JSP suffix + */ + protected static final String JSP_SUFFIX = ".jsp"; + + /** + * Use any saved state + */ + protected static final String USE_SAVED_STATE = "use_saved_state"; + + /** + * Save current HTTP state. + */ + protected static final String SAVE_STATE = "save_state"; + + /** + * Ignore HTTP status codes + */ + protected static final String IGNORE_STATUS_CODE = "ignore_status_code"; + + /** + * Current test name + */ + protected String _testName = null; + + /** + * location of _tsHome + */ + protected String _tsHome = null; + + /** + * Context root of target tests + */ + protected String _contextRoot = null; + + /** + * General file/request URI for both gfiles and tests + */ + protected String _generalURI = null; + + /** + * Target webserver hostname + */ + protected String _hostname = null; + + /** + * Target webserver port + */ + protected int _port = 0; + + /** + * HttpState that may be used for multiple invocations requiring state. + */ + protected HttpState _state = null; + + /** + * Test case. + */ + protected WebTestCase _testCase = null; + + /** + * Use saved state. + */ + protected boolean _useSavedState = false; + + /** + * Save state. + */ + protected boolean _saveState = false; + + /** + * Follow redirect. + */ + protected String FOLLOW_REDIRECT = "follow_redirect"; + + protected boolean _redirect = false; + + /* + * public methods ======================================================================== + */ + + /** + * setTestDir sets the current test directory. + * + * @param testDir a String value + */ + public void setTestDir(String testDir) { + TESTDIR = testDir; + // setGoldenFileDir(testDir); + } + + public void setGeneralURI(String URI) { + _generalURI = URI; + } + + public void setContextRoot(String root) { + _contextRoot = root; + } + + public String getContextRoot() { + return _contextRoot; + } + + /** + * Sets the goldenfile directory + * + * @param goldenDir goldenfile directory based off test directory + */ + public void setGoldenFileDir(String goldenDir) { + GOLDENFILEDIR = goldenDir; + } + + /** + * setup is by the test harness to initialize the tests. + * + * @param args a String[] value + * @param p a Properties value + */ + public void setup(String[] args, Properties p) throws Exception { + _props = p; + String hostname = TestUtil.getProperty(p, SERVLETHOSTPROP).trim(); + String portnum = TestUtil.getProperty(p, SERVLETPORTPROP).trim(); + String tshome = TestUtil.getProperty(p, TSHOME).trim(); + + if (!isNullOrEmpty(hostname)) { + _hostname = hostname; + } else { + throw new Exception("[BaseUrlClient] 'webServerHost' was not set in the" + " ts.jte."); + } + + if (!isNullOrEmpty(portnum)) { + _port = Integer.parseInt(portnum); + } else { + throw new Exception("[BaseUrlClient] 'webServerPort' was not set in the" + " ts.jte."); + } + + if (!isNullOrEmpty(tshome)) { + _tsHome = tshome; + } else { + throw new Exception("[BaseUrlClient] 'tshome' was not set in the " + " ts.jte."); + } + + TestUtil.logMsg("[BaseUrlClient] Test setup OK"); + } + + /** + * cleanup is called by the test harness to cleanup after text execution + * + */ + public void cleanup() throws Exception { + TestUtil.logMsg("[BaseUrlClient] Test cleanup OK"); + } + + /* + * protected methods ======================================================================== + */ + + /** + *
+     * Invokes a test based on the properties
+      * stored in TEST_PROPS.  Once the test has completed,
+      * the properties in TEST_PROPS will be cleared.
+     * 
+ * + * @throws Exception If an error occurs during the test run + */ + protected void invoke() throws Exception { + try { + _testCase = new WebTestCase(); + setTestProperties(_testCase); + TestUtil.logTrace("[BaseUrlClient] EXECUTING"); + LOGGER.fine("[BaseUrlClient] EXECUTING"); + if (_useSavedState && _state != null) { + _testCase.getRequest().setState(_state); + } + if (_redirect != false) { + TestUtil.logTrace("##########Call setFollowRedirects"); + LOGGER.fine("##########Call setFollowRedirects"); + _testCase.getRequest().setFollowRedirects(_redirect); + } + _testCase.execute(); + TestUtil.logMsg(_testCase.getResponse().getResponseBodyAsString()); + if (_saveState) { + _state = _testCase.getResponse().getState(); + } + } catch (TestFailureException tfe) { + Throwable t = tfe.getRootCause(); + if (t != null) { + TestUtil.logErr("Root cause of Failure: " + t.getMessage(), t); + LOGGER.log(Level.WARNING, "Root cause of Failure: " + t.getMessage(), t); + } + throw new Exception("[BaseUrlClient] " + _testName + " failed! Check output for cause of failure.", tfe); + } finally { + _useSavedState = false; + _saveState = false; + _redirect = false; + clearTestProperties(); + } + } + + /** + *
+     * Sets the appropriate test properties based
+      * on the values stored in TEST_PROPS
+     * 
+ */ + protected void setTestProperties(WebTestCase testCase) { + HttpRequest req = testCase.getRequest(); + + // Check for a request object. If doesn't exist, then + // check for a REQUEST property and create the request object. + + if (req == null) { + String request = TEST_PROPS.getProperty(REQUEST); + + if (request.startsWith("GET") || request.startsWith("POST") || request.startsWith("OPTIONS") || request.startsWith("PUT") + || request.startsWith("DELETE") || request.startsWith("HEAD") || request.endsWith(HTTP10) || request.endsWith(HTTP11)) { + // user has overriden default request behavior + req = new HttpRequest(request, _hostname, _port); + testCase.setRequest(req); + } else { + req = new HttpRequest(getTSRequest(request), _hostname, _port); + testCase.setRequest(req); + } + } + + String key = null; + String value = null; + // proces the remainder of the properties + for (Enumeration e = TEST_PROPS.propertyNames(); e.hasMoreElements();) { + key = (String) e.nextElement(); + value = TEST_PROPS.getProperty(key); + + if (key.equals(STATUS_CODE)) { + testCase.setExpectedStatusCode(value); + } else if (key.equals(IGNORE_STATUS_CODE)) { + testCase.setExpectedStatusCode("-1"); + } else if (key.equals(REASON_PHRASE)) { + testCase.setExpectedReasonPhrase(value); + } else if (key.equals(EXPECTED_HEADERS)) { + testCase.addExpectedHeader(value); + } else if (key.equals(UNEXPECTED_HEADERS)) { + testCase.addUnexpectedHeader(value); + } else if (key.equals(SEARCH_STRING)) { + testCase.setResponseSearchString(value); + } else if (key.equals(SEARCH_STRING_IGNORE_CASE)) { + testCase.setResponseSearchStringIgnoreCase(value); + } else if (key.equals(STRATEGY)) { + testCase.setStrategy(value); + } else if (key.equals(GOLDENFILE)) { + StringBuffer sb = new StringBuffer(50); + sb.append(_tsHome).append(GOLDENFILEDIR); + sb.append(_generalURI).append(SL); + sb.append(value); + testCase.setGoldenFilePath(sb.toString()); + } else if (key.equals(CONTENT)) { + req.setContent(value); + } else if (key.equals(TEST_NAME)) { + // testName = TEST_PROPS.getProperty(key); + } else if (key.equals(RESPONSE_MATCH)) { + // setResponseMatch(TEST_PROPS.getProperty(key)); + } else if (key.equals(REQUEST_HEADERS)) { + req.addRequestHeader(TEST_PROPS.getProperty(key)); + } else if (key.equals(EXPECT_RESPONSE_BODY)) { + // FIXME + // setExpectResponseBody(false); + } else if (key.equals(IGNORE_BODY)) { + // FIXME + // setIgnoreResponseBody(true); + testCase.setGoldenFilePath(null); + } else if (key.equals(UNEXPECTED_RESPONSE_MATCH)) { + testCase.setUnexpectedResponseSearchString(value); + } else if (key.equals(UNORDERED_SEARCH_STRING)) { + testCase.setUnorderedSearchString(value); + } else if (key.equals(USE_SAVED_STATE)) { + _useSavedState = true; + } else if (key.equals(SAVE_STATE)) { + _saveState = true; + } else if (key.equals(FOLLOW_REDIRECT)) { + LOGGER.fine("##########Found redirect Property"); + _redirect = true; + } else if (key.equals(BASIC_AUTH_USER) || key.equals(BASIC_AUTH_PASSWD) || key.equals(BASIC_AUTH_REALM)) { + + String user = TEST_PROPS.getProperty(BASIC_AUTH_USER); + String password = TEST_PROPS.getProperty(BASIC_AUTH_PASSWD); + String realm = TEST_PROPS.getProperty(BASIC_AUTH_REALM); + req.setAuthenticationCredentials(user, password, HttpRequest.BASIC_AUTHENTICATION, realm); + } + } + } + + /* + * private methods ======================================================================== + */ + + private String getTSRequest(String request) { + StringBuffer finReq = new StringBuffer(50); + + finReq.append(GET).append(_contextRoot).append(SL).append(_generalURI); + finReq.append(SL).append(request).append(HTTP10); + + return finReq.toString(); + } + + /** + * Clears the contents of TEST_PROPS + */ + private void clearTestProperties() { + TEST_PROPS.clear(); + } + + private boolean isNullOrEmpty(String val) { + if (val == null || val.equals("")) { + return true; + } + return false; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java new file mode 100644 index 0000000000..4ae2737103 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Goldenfile.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; + +import com.sun.ts.lib.util.TestUtil; + +/** + * A representation of a Goldenfile that may be used by a particular test case. + */ + +public class Goldenfile { + + /* + * Message to be returned if the goldenfile cannot be located. + */ + private static final byte[] NOTFOUND = "NO GOLDENFILE FOUND".getBytes(); + + /* + * Message to be returned if the goldenfile doesn't have read permissions. + */ + private static final byte[] NOPERM = "INSUFFICIENT PERMISSIONS".getBytes(); + + /* + * Goldenfile represented by this object. + */ + private File _file = null; + + /* + * Error message to return by public methods if the file is not found or the user has insufficient permissions. + */ + private byte[] _errMessage = null; + + /* + * Goldenfile length + */ + private long _length = 0L; + + /* + * Encoding + */ + private String _encoding = null; + + /** + * Creates a new GoldenFile based on the fully qualified filename provided. + * + * @param path Fully qualified file name + * @param encoding to use when reading the goldenfile + */ + public Goldenfile(String path, String encoding) { + _file = new File(path); + if (!_file.exists()) { + TestUtil.logTrace("[GoldenFile] Goldenfile: " + path + ", not found!"); + _errMessage = NOTFOUND; + _file = null; + } else if (!_file.canRead()) { + _errMessage = NOPERM; + _file = null; + } else { + _length = _file.length(); + _encoding = encoding; + } + } + + /* + * public methods ======================================================================== + */ + + /** + * Returns the length of the Goldenfile. + * + * @return long length + */ + public long getLength() { + return _length; + } + + /** + * Returns the byte content of the specified goldenfile using the charset encoding specified in the response from the + * server. + * + * @return the goldenfile as a byte array + * @throws IOException if an error occurs processing the file. + */ + public byte[] getGoldenFileAsBytes() throws IOException { + if (_file != null) { + return getGoldenFileAsString().getBytes(); + } else { + return _errMessage; + } + } + + /** + * Retuns a string representation of the specified goldenfile using the charset encoding specified in the response from + * the server. + * + * @return the goldenfile as a String. + * @throws IOException if an error occurs processing the file. + */ + public String getGoldenFileAsString() throws IOException { + String gf = null; + if (_file != null) { + TestUtil.logTrace("[Goldenfile] Loading goldenfile using " + "encoding: " + _encoding); + FileInputStream in = new FileInputStream(_file); + gf = Util.getEncodedStringFromStream(in, _encoding); + in.close(); + } else { + gf = new String(_errMessage); + } + return gf; + } + + /** + * Returns the goldenfile as an InputStream using the charset encoding specified in the response from the server. + * + * @return goldenfile as an InputStream + * @throws IOException If an error occurs processing the file. + */ + public InputStream getGoldenFileAsStream() throws IOException { + if (_file != null) { + return new ByteArrayInputStream(getGoldenFileAsBytes()); + } else { + return new ByteArrayInputStream(_errMessage); + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java similarity index 51% rename from common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java index 65601c35db..c06d693527 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestCase.java @@ -25,43 +25,38 @@ */ public interface TestCase { - /** - * Executes the test case. - * - * @throws TestFailureException - * if the test fails for any reason. - */ - public void execute() throws TestFailureException; - - /** - * Sets the name of the test case. - * - * @param name - * of the test case - */ - public void setName(String name); - - /** - * Returns the name of this test case. - * - * @return test case name - */ - public String getName(); - - /** - * Sets the state for this test case. This state will differ from - * implementation to implementation. - * - * @param state - * test state - */ - public void setState(Object state); - - /** - * Returns the state of the test case. The state returned could possibly - * differ depending on when this method is called and when the test case has - * been executed. - */ - public Object getState(); + /** + * Executes the test case. + * + * @throws TestFailureException if the test fails for any reason. + */ + public void execute() throws TestFailureException; + + /** + * Sets the name of the test case. + * + * @param name of the test case + */ + public void setName(String name); + + /** + * Returns the name of this test case. + * + * @return test case name + */ + public String getName(); + + /** + * Sets the state for this test case. This state will differ from implementation to implementation. + * + * @param state test state + */ + public void setState(Object state); + + /** + * Returns the state of the test case. The state returned could possibly differ depending on when this method is called + * and when the test case has been executed. + */ + public Object getState(); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java new file mode 100644 index 0000000000..0f6b24a1b0 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestFailureException.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient; + +/** + * Signifies a failure at some point during a test cycle. + */ +public class TestFailureException extends java.lang.Exception { + + private static final long serialVersionUID = -4651996590051941456L; + + /** + * Creates a new instance of TestFailureException without a detailed message. + */ + public TestFailureException() { + } + + /** + * Creates a new instance of TestFailureException containing the root cause of the test failure. + * + * @param t - root cause + */ + public TestFailureException(Throwable t) { + super(t); + } + + /** + * Creates a new instance of TestFailureException with the specified detail message. + * + * @param msg - the detail message. + */ + public TestFailureException(String msg) { + super(msg); + } + + /** + * Creates a new instance of TestFailureException with the specified detail message, and the root cause of + * the test failure + * + * @param msg - the detail message + * @param t - root cause + */ + public TestFailureException(String msg, Throwable t) { + super(msg, t); + } + + /** + * Returns, if any, the root cause of this Exception. + * + * @return the root cause of this exception, or null + */ + public Throwable getRootCause() { + return getCause(); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java new file mode 100644 index 0000000000..b2619ec58e --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/TestSequence.java @@ -0,0 +1,156 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.sun.ts.lib.util.TestUtil; + +/** + * This class represents a logic sequence for executing a series of test cases in a specific order. In this case, the + * execution order will be the same order that the test cases were added to the sequence. + * + * The TestSequence has the added benefit of managing state between the test invocations. + */ +public class TestSequence implements TestCase { + + private Map _testMap = null; + + private List _testNameList = null; + + private String _name = "DEFAULT"; + + private boolean _managed = false; + + /** Creates a new instance of TestSequence */ + public TestSequence() { + _testMap = new HashMap(); + _testNameList = new ArrayList(); + } + + /* + * public methods ======================================================================== + */ + + /** + * Executes the test sequence. + * + * @throws TestFailureException if any test in the sequence fails. + */ + public void execute() throws TestFailureException { + + TestUtil.logTrace( + "[TestSequence] Beginning execution of sequence '" + _name + "' containing '" + _testNameList.size() + "' test entities."); + + TestCase cse; + for (int i = 0, size = _testNameList.size(); i < size; i++) { + String testName = _testNameList.get(i); + TestUtil.logTrace("[TestSequence] Executing test case: " + testName); + cse = _testMap.get(testName); + if (_managed) { + cse.setState(cse.getState()); + } + cse.execute(); + TestUtil.logTrace("[TestSequence] Test case: " + testName + "complete."); + } + TestUtil.logTrace("[TestSequence] Sequence complete!"); + } + + /** + * enableStateManagement, when enabled, will cause the test sequence to manage state between test case + * invocations. By default, a test sequence will not manage state. + * + * @param value a value of true enables session management. + */ + public void enableStateManagement(boolean value) { + _managed = value; + } + + /** + * Returns a value indicating whether state management is enabled or not. + * + * @return boolean value indicating state management status + */ + public boolean isStateManagementEnabled() { + return _managed; + } + + /** + * Adds a test case to the sequence denoted by a unique identifier. + * + * @param identifier for this test case + * @param cs the test case + */ + public void addTestCase(String identifier, TestCase cs) { + _testMap.put(identifier, cs); + _testNameList.add(identifier); + } + + /** + * Removes a test case from the sequence. + * + * @param identifier + */ + public void removeTestCase(String identifier) { + _testMap.remove(identifier); + _testNameList.remove(identifier); + } + + /** + * Sets the name of this TestSequence. If not set, the default value is "DEFAULT". + * + * @param name + */ + public void setName(String name) { + _name = name; + } + + /** + * Returns the name of this TestSequence. + * + * @return sequence name + */ + public String getName() { + return _name; + } + + /** + * Sets the initial state for the test sequence to use when invoking test cases. + * + * @param state the initial state + */ + public void setState(Object state) { + } + + /** + * Returns the state of the sequence. Note: This value can differ depending on when it has been called in relation to + * when execute has been called. + * + * @return state of the sequence + */ + public Object getState() { + throw new UnsupportedOperationException(); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java new file mode 100644 index 0000000000..1c419747b7 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/Util.java @@ -0,0 +1,218 @@ +/* + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000 The Apache Software Foundation. All rights + * Copyright (c) 2000 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * "This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/)." + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names "Apache" and "Apache Software Foundation" must + * not be used to endorse or promote products derived from this + * software without prior written permission. For written + * permission, please contact apache@apache.org. + * + * 5. Products derived from this software may not be called "Apache", + * nor may "Apache" appear in their name, without prior written + * permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * ==================================================================== + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * . + * + * Portions of this software are based upon public domain software + * originally written at the National Center for Supercomputing Applications, + * University of Illinois, Urbana-Champaign. + */ + +package com.sun.ts.tests.common.webclient; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; + +import com.sun.ts.lib.util.BASE64Encoder; + +public class Util { + + /** + * Zeros + */ + private static final String ZEROS = "00000000"; + + /** + * short pad size + */ + private static final int SHORTPADSIZE = 4; + + /** + * byte pad size + */ + private static final int BYTEPADSIZE = 2; + + /** Creates new Util */ + private Util() { + } + + /* + * public methods ======================================================================== + */ + + /** + * BASE64 encodes the provided string. + * + * @return BASE64 encoded string. + */ + public static String getBase64EncodedString(String value) { + BASE64Encoder encoder = new BASE64Encoder(); + return encoder.encode(value.getBytes()); + } + + /** + * Returns a charset encoded string based on the provided InputStream and charset encoding. + * + * @return encoding string + */ + public static String getEncodedStringFromStream(InputStream in, String enc) throws IOException { + BufferedReader bin = new BufferedReader(new InputStreamReader(in, enc)); + StringBuffer sb = new StringBuffer(128); + for (int ch = bin.read(); ch != -1; ch = bin.read()) { + sb.append((char) ch); + } + return sb.toString(); + } + + /** + * getHexValue displays a formatted hex representation of the passed byte array. It also allows for only a + * specified offset and length of a particular array to be returned. + * + * @param bytes byte[] array to process. + * @param pos int specifies offset to begin processing. + * @param len int specifies the number of bytes to process. + * @return String formatted hex representation of processed array. + */ + public static String getHexValue(byte[] bytes, int pos, int len) { + StringBuffer outBuf = new StringBuffer(bytes.length * 2); + int bytesPerLine = 36; + int cnt = 1; + int groups = 4; + int curPos = pos; + int linePos = 1; + boolean displayOffset = true; + + while (len-- > 0) { + if (displayOffset) { + + outBuf.append("\n" + paddedHexString(pos, SHORTPADSIZE, true) + ": "); + displayOffset = false; + } + + outBuf.append(paddedHexString((int) bytes[pos], BYTEPADSIZE, false)); + linePos += 2; // Byte is padded to 2 characters + + if ((cnt % 4) == 0) { + outBuf.append(" "); + linePos++; + } + + // Now display the characters that are printable + if ((cnt % (groups * 4)) == 0) { + outBuf.append(" "); + + while (curPos <= pos) { + if (!Character.isWhitespace((char) bytes[curPos])) { + outBuf.append((char) bytes[curPos]); + } else { + outBuf.append("."); + } + + curPos++; + } + + curPos = pos + 1; + linePos = 1; + displayOffset = true; + } + + cnt++; + pos++; + } + + // pad out the line with spaces + while (linePos++ <= bytesPerLine) { + outBuf.append(" "); + } + + outBuf.append(" "); + // Now display the printable characters for the trailing bytes + while (curPos < pos) { + if (!Character.isWhitespace((char) bytes[curPos])) { + outBuf.append((char) bytes[curPos]); + } else { + outBuf.append("."); + } + + curPos++; + } + + return outBuf.toString(); + } + + /* + * private methods ======================================================================== + */ + + /** + * paddedHexString pads the passed value based on the specified wordsize and the value of the prefixFlag. + * + * @param val an int value + * @param wordsize an int value + * @param prefixFlag a boolean value + * @return a String value + */ + private static String paddedHexString(int val, int wordsize, boolean prefixFlag) { + + String prefix = prefixFlag ? "0x" : ""; + String hexVal = Integer.toHexString(val); + + if (hexVal.length() > wordsize) + hexVal = hexVal.substring(hexVal.length() - wordsize); + + return (prefix + (wordsize > hexVal.length() ? ZEROS.substring(0, wordsize - hexVal.length()) : "") + hexVal); + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java new file mode 100644 index 0000000000..7cb72eada7 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/WebTestCase.java @@ -0,0 +1,564 @@ +/* + * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient; + +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; +import java.util.logging.Logger; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.webclient.http.HttpRequest; +import com.sun.ts.tests.common.webclient.http.HttpResponse; +import com.sun.ts.tests.common.webclient.validation.ValidationFactory; +import com.sun.ts.tests.common.webclient.validation.ValidationStrategy; +import org.apache.commons.httpclient.Header; +import org.apache.commons.httpclient.HttpState; + +/** + * A TestCase implementation for HTTP-based testing. This allows the user to set criteria for test success which will be + * compared against the response from the server. + */ +public class WebTestCase implements TestCase { + + private static final Logger LOGGER = Logger.getLogger(WebTestCase.class.getName()); + + /** + * Tokenized response validation strategy + */ + public static final String TOKENIZED_STRATEGY = "com.sun.ts.tests.common.webclient.validation.TokenizedValidator"; + + /** + * Whitespace response validation strategy + */ + public static final String WHITESPACE_STRATEGY = "com.sun.ts.tests.common.webclient.validation.WhitespaceValidator"; + + /** + * The request for this case. + */ + private HttpRequest _request = null; + + /** + * The server's response. + */ + private HttpResponse _response = null; + + // use HttpMethod instances to store test + // case headers that are expected or not + // expected. + + /** + * Storage for headers that are expected in the response + */ + private Map _expected = null; + + /** + * Storage for headers that are not expected in the response + */ + private Map _unexpected = null; + + /** + * Expected response status code. + */ + private String _statusCode = null; + + /** + * Expected response reason phrase. + */ + private String _reasonPhrase = null; + + /** + * Path to goldenfile. + */ + private String _goldenfilePath = null; + + private InputStream _goldenfileStream = null; + + /** + * A List of strings that will be searched for in the response in the order they appear in the list. + */ + private List _searchStrings = null; + + /** + * A List of case insensitive strings that will be searched for in the response in the order they appear in the list. + */ + private List _searchStringsNoCase = null; + + /** + * A List of strings that will be search for in the response with no attention paid to the order they appear. + */ + private List _unorderedSearchStrings = null; + + /** + * A List of strings that should not be in the server's response. + */ + private List _uSearchStrings = null; + + /** + * Indicates whether a response body should be expected or not. + */ + private boolean _expectResponseBody = true; + + /** + * Strategy to use when validating the test case against the server's response. + */ + private ValidationStrategy _strategy = null; + + /** + * Logical name for test case. + */ + private String _name = "Test Case"; + + /** + * Creates a new instance of WebTestCase By default, a new WebTestCase instance will use the TokenizedValidator to + * verify the response with the configured properties of the test case. + */ + public WebTestCase() { + _strategy = ValidationFactory.getInstance(TOKENIZED_STRATEGY); + } + + /* + * public methods ======================================================================== + */ + /** + * Executes the test case. + * + * @throws TestFailureException if the test fails for any reason. + * @throws IllegalStateException if no request was configured or if no Validator is available at runtime. + */ + public void execute() throws TestFailureException { + + // If no request was created, we can't run. + if (_request == null) { + throw new IllegalStateException("[FATAL] HttpRequest is null."); + } + + // If no stragey instance is available (strange, but has happened), + // fail. + if (_strategy == null) { + throw new IllegalStateException("[FATAL] No Validator available."); + } + + try { + _response = _request.execute(); + } catch (Throwable t) { + String message = t.getMessage(); + throw new TestFailureException( + "[FATAL] Unexpected failure during " + "test execution." + (message == null ? t.toString() : message), t); + } + + // Validate this test case instance + if (!_strategy.validate(this)) { + throw new TestFailureException("Test FAILED!"); + } + + } + + /** + * Sets the status code to be expected in the response from the server, i.e. 500 or 404, etc. + * + * @param statusCode the expected status code + */ + public void setExpectedStatusCode(String statusCode) { + _statusCode = statusCode; + } + + /** + * Sets the reason phrase to be expected in the response from the server. + * + * @param reasonPhrase the expected reason-phrase + */ + public void setExpectedReasonPhrase(String reasonPhrase) { + _reasonPhrase = reasonPhrase; + } + + /** + * Adds a header that is to be expected in the response from the server. + * + * @param header in the format of : (test:foo) + */ + public void addExpectedHeader(String header) { + if (_expected == null) { + _expected = new HashMap<>(); + } + addHeader(_expected, header); + } + + /** + * Sets the path to the goldenfile the test case should use. + * + * @param gfPath a fully qualified path including filename. + */ + public void setGoldenFilePath(String gfPath) { + _goldenfilePath = gfPath; + } + + /** + * Sets the InputStream of the goldenfile the test case should use. + * + * @param in an InputStream value of the goldenfile. + */ + public void setGoldenFileStream(InputStream in) { + _goldenfileStream = in; + } + + /** + * Sets the request that should be dispatched by this test case. + * + * @param request the HTTP request used for this test case + */ + public void setRequest(HttpRequest request) { + _request = request; + } + + /** + * Adds a header that is should not be in the server's response. + * + * @param header in the format of : (test:foo) + */ + public void addUnexpectedHeader(String header) { + if (_unexpected == null) { + _unexpected = new HashMap(); + } + addHeader(_unexpected, header); + } + + /** + * Enables/Disables an assertion that a response body is present. + * + * @param value a value of true will enable the assertion. + */ + public void setAssertNoResponseBody(boolean value) { + } + + /** + * Sets a string that will be scanned for and expected in the response body from the server. + * + * If multiple search strings are required, one can either call this method for each string, or pass in one string with + * pipe | delimiting the individual search strings within the large string. + * + * @param searchString a string expected in the server's response body + */ + public void setResponseSearchString(String searchString) { + if (_searchStrings == null) { + _searchStrings = new ArrayList(); + } + addSearchStrings(_searchStrings, searchString); + } + + /** + * Sets a string that will be scanned for and expected in the response body from the server. + * + * If multiple search strings are required, one can either call this method for each string, or pass in one string with + * pipe | delimiting the individual search strings within the large string. + * + * @param searchString a case insensitive string expected in the server's response body + */ + public void setResponseSearchStringIgnoreCase(String searchString) { + if (_searchStringsNoCase == null) { + _searchStringsNoCase = new ArrayList(); + } + addSearchStrings(_searchStringsNoCase, searchString); + } + + /** + * Sets a string that will be scanned for and should not be present in the response body from the server. + * + * If multiple search strings are required, one can either call this method for each string, or pass in one string with + * pipe | delimiting the individual search strings within the large string. + * + * @param searchString a string that is not expected in the server's response body + */ + public void setUnexpectedResponseSearchString(String searchString) { + if (_uSearchStrings == null) { + _uSearchStrings = new ArrayList(); + } + addSearchStrings(_uSearchStrings, searchString); + } + + /** + * Sets a string or series of strings that will be searched for in the response. If multiple search strings are + * required, one can either call this method for each string, or pass in one string with pipe | delimiting + * the individual search strings within the large string. + * + * @param searchString a string that is not expected in the server's response body + */ + public void setUnorderedSearchString(String searchString) { + if (_unorderedSearchStrings == null) { + _unorderedSearchStrings = new ArrayList(); + } + addSearchStrings(_unorderedSearchStrings, searchString); + } + + /** + * Returns the list of search strings. + * + * @return the list of search strings. + */ + public List getUnorderedSearchStrings() { + return _unorderedSearchStrings; + } + + /** + * Returns the response for this particular test case. + * + * @return an HttpResponse object + */ + public HttpResponse getResponse() { + return _response; + } + + /** + * Returns an array of Header objects that are expected to be found in the responst. + * + * @return an array of headers + */ + public Header[] getExpectedHeaders() { + if (_expected == null) { + return null; + } + return _expected.values().toArray(new Header[_expected.size()]); + } + + /** + * Returns an array of Header objects that are not expected to be found in the responst. + * + * @return an array of headers + */ + public Header[] getUnexpectedHeaders() { + if (_unexpected == null) { + return null; + } + return _unexpected.values().toArray(new Header[_unexpected.size()]); + } + + /** + * Returns the status code expected to be found in the server's response + * + * @return status code + */ + public String getStatusCode() { + return _statusCode; + } + + /** + * Returns the reason phrase that is expected to be found in the server's response. + * + * @return reason phrase + */ + public String getReasonPhrase() { + return _reasonPhrase; + } + + /** + * Returns the configured list of strings that will be used when scanning the server's response. + * + * @return list of Strings + */ + public List getSearchStrings() { + if (_searchStrings == null) { + return null; + } + return _searchStrings; + } + + /** + * Returns the configured list of strings that will be used when scanning the server's response. + * + * @return list of case insensitive Strings + */ + public List getSearchStringsNoCase() { + if (_searchStringsNoCase == null) { + return null; + } + return _searchStringsNoCase; + } + + /** + * Returns the configured list of strings that will be used when scanning the server's response (these strings are not + * expected in the response). + * + * @return list of Strings + */ + public List getUnexpectedSearchStrings() { + if (_uSearchStrings == null) { + return null; + } + return _uSearchStrings; + } + + /** + * Returns an indicator on whether a response body is expected or not. + * + * @return boolean value + */ + public boolean getExpectResponseBody() { + return _expectResponseBody; + } + + /** + * Returns the HttpRequest for this particular test case. + * + * @return HttpRequest of this test case + */ + public HttpRequest getRequest() { + return _request; + } + + /** + * Returns the path to the goldenfile. + * + * @return path to the goldenfile + */ + public String getGoldenfilePath() { + return _goldenfilePath; + } + + /** + * Returns the InputStream of the goldenfile. + * + * @return InputStream of the goldenfile + */ + public InputStream getGoldenfileStream() { + return _goldenfileStream; + } + + /** + * Returns the state for this particular test case. + * + * @return test state + */ + public Object getState() { + if (_response != null) { + return _response.getState(); + } else { + // an initial request for state + return _request.getState(); + } + } + + /** + * Sets the state for this test case. + * + * @param state test state + */ + public void setState(Object state) { + _request.setState((HttpState) state); + } + + /** + * Sets a logical name for this test case. + * + * @param name the logical name for this test + */ + public void setName(String name) { + _name = name; + } + + /** + * Returns the logical name for this test case. + * + * @return test name + */ + public String getName() { + return _name; + } + + /** + * Sets the validation strategy for this test case instance. + * + * @param validator - the fully qualified class name of the response validator to use. + */ + public void setStrategy(String validator) { + ValidationStrategy strat = ValidationFactory.getInstance(validator); + if (strat != null) { + _strategy = strat; + } else { + TestUtil.logMsg("[WebTestCase][WARNING] An attempt was made to use a " + "non-existing validator (" + validator + ")" + + ". Falling back to the TokenizedValidator"); + } + } + + /** + * Returns the class name of the response validator used. + * + * @return the fully qualified class of the validator used + */ + public String getStrategy() { + return _strategy.getClass().getName(); + } + + /* + * Private Methods =========================================================================== + */ + + /** + * Utility method to add headers to test case holder objects. + * + * @param map the object in which to add header to + * @param headerString String representation of a header in the form of : + */ + private void addHeader(Map map, String headerString) { + LOGGER.fine("[WebTestCase] addHeader utility method called: " + headerString); + StringTokenizer st = new StringTokenizer(headerString, "|"); + while (st.hasMoreTokens()) { + String head = st.nextToken(); + int colIdx = head.indexOf(':'); + String name = head.substring(0, colIdx).trim(); + String value = head.substring(colIdx + 1).trim(); + LOGGER.fine("[WebTestCase] Adding test header: " + name + ", " + value); + Header header = map.get(name); + if (header != null) { + map.put(name, createNewHeader(value, header)); + } else { + map.put(name, new Header(name, value)); + } + } + } + + /** + * Creates a new header based of the provided header and value. + * + * @param newValue - the new value to add to an existing header + * @param header - the original header + * @return new Header + */ + private Header createNewHeader(String newValue, Header header) { + String oldValue = header.getValue(); + return new Header(header.getName(), oldValue + ", " + newValue); + } + + /** + * Adds a search string to the provided list + * + * @param stringList - list to add the string to + * @param s - the search string + */ + private void addSearchStrings(List stringList, String s) { + StringTokenizer st = new StringTokenizer(s, "|"); + while (st.hasMoreTokens()) { + stringList.add(st.nextToken()); + } + } +} \ No newline at end of file diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/webclient/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java new file mode 100644 index 0000000000..b637811625 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ALLOWHandler.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2008, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.common.webclient.handler; + +import java.util.StringTokenizer; + +import org.apache.commons.httpclient.Header; + +import com.sun.ts.lib.util.TestUtil; + +public class ALLOWHandler implements Handler { + + private static final Handler HANDLER = new ALLOWHandler(); + + private static final String DELIM = "##"; + + private ALLOWHandler() { + } + + public static Handler getInstance() { + return HANDLER; + } + + public boolean invoke(Header configuredHeader, Header responseHeader) { + String ALLOWHeader = responseHeader.getValue().toLowerCase(); + String expectedValues = configuredHeader.getValue().toLowerCase().replace(" ", ""); + + TestUtil.logTrace("[ALLOWHandler] ALLOW header received: " + ALLOWHeader); + + StringTokenizer conf = new StringTokenizer(expectedValues, ","); + while (conf.hasMoreTokens()) { + String token = conf.nextToken(); + String token1 = token; + + if ((ALLOWHeader.indexOf(token) < 0) && (ALLOWHeader.indexOf(token1) < 0)) { + TestUtil.logErr("[ALLOWHandler] Unable to find '" + token + "' within the ALLOW header returned by the server."); + return false; + } else { + TestUtil.logTrace("[ALLOWHandler] Found expected value, '" + token + "' in ALLOW header returned by server."); + } + } + return true; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java similarity index 56% rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java index c9c86515b3..e6f9bab3fc 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/ContentTypeHandler.java @@ -77,77 +77,73 @@ */ public class ContentTypeHandler implements Handler { - private static Handler handler = new ContentTypeHandler(); + private static Handler handler = new ContentTypeHandler(); - /** - * Creates new ContentTypeHandler - */ - private ContentTypeHandler() { - } + /** + * Creates new ContentTypeHandler + */ + private ContentTypeHandler() { + } - /* - * public methods - * ======================================================================== - */ + /* + * public methods ======================================================================== + */ - /** - * Returns an instance of this handler. - */ - public static Handler getInstance() { - return handler; - } + /** + * Returns an instance of this handler. + */ + public static Handler getInstance() { + return handler; + } - /** - * Invokes handler logic. - * - * @param configuredHeader - * the user configured header - * @param responseHeader - * the response header from the server - * @return True if the passed match, otherwise false - */ - public boolean invoke(Header configuredHeader, Header responseHeader) { - boolean ret = false; - TestUtil.logTrace("[ContentTypeHandler] ContentTypeHandler invoked."); - String configVal = configuredHeader.getValue().trim(); - String responseVal = responseHeader.getValue().trim(); - int colIdx = configVal.indexOf(';'); - if (colIdx < 0) { - // Info we're interested in : type/subtype + /** + * Invokes handler logic. + * + * @param configuredHeader the user configured header + * @param responseHeader the response header from the server + * @return True if the passed match, otherwise false + */ + public boolean invoke(Header configuredHeader, Header responseHeader) { + boolean ret = false; + TestUtil.logTrace("[ContentTypeHandler] ContentTypeHandler invoked."); + String configVal = configuredHeader.getValue().trim(); + String responseVal = responseHeader.getValue().trim(); + int colIdx = configVal.indexOf(';'); + if (colIdx < 0) { + // Info we're interested in : type/subtype - // check response Content-Type header to see what format - // it's in. - int rColIdx = responseVal.indexOf(';'); - if (rColIdx < 0) { - // Type and subtype, i.e. type/subtype are to be compared - // case insensitively. - if (configVal.equalsIgnoreCase(responseVal)) { - ret = true; - } - } else { - if (configVal.equalsIgnoreCase(responseVal.substring(0, rColIdx))) { - ret = true; - } - } - } else { - // Info we're interested in : type/subtype; parameter=value + // check response Content-Type header to see what format + // it's in. + int rColIdx = responseVal.indexOf(';'); + if (rColIdx < 0) { + // Type and subtype, i.e. type/subtype are to be compared + // case insensitively. + if (configVal.equalsIgnoreCase(responseVal)) { + ret = true; + } + } else { + if (configVal.equalsIgnoreCase(responseVal.substring(0, rColIdx))) { + ret = true; + } + } + } else { + // Info we're interested in : type/subtype; parameter=value - int rColIdx = responseVal.indexOf(';'); - if (rColIdx > -1) { - String confTypeSubType = configVal.substring(0, colIdx).trim(); - String responseTypeSubType = responseVal.substring(0, rColIdx).trim(); - String confParameter = configVal.substring(colIdx + 1).trim(); - String responseParameter = (responseVal.substring(rColIdx + 1).trim()) - .replaceAll(" ", ""); - // compare type/subtype in a case insensitive manner - if (confTypeSubType.equalsIgnoreCase(responseTypeSubType)) { - // next validate the parameter in a case insensitive manner - if (confParameter.equalsIgnoreCase(responseParameter)) { - ret = true; - } + int rColIdx = responseVal.indexOf(';'); + if (rColIdx > -1) { + String confTypeSubType = configVal.substring(0, colIdx).trim(); + String responseTypeSubType = responseVal.substring(0, rColIdx).trim(); + String confParameter = configVal.substring(colIdx + 1).trim(); + String responseParameter = (responseVal.substring(rColIdx + 1).trim()).replaceAll(" ", ""); + // compare type/subtype in a case insensitive manner + if (confTypeSubType.equalsIgnoreCase(responseTypeSubType)) { + // next validate the parameter in a case insensitive manner + if (confParameter.equalsIgnoreCase(responseParameter)) { + ret = true; + } + } + } } - } + return ret; } - return ret; - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java similarity index 64% rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java index 20101418ec..d4f5afd84e 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/DefaultHandler.java @@ -73,73 +73,68 @@ */ public class DefaultHandler implements Handler { - private static Handler handler = new DefaultHandler(); + private static Handler handler = new DefaultHandler(); - /** - * Creates new DefaultHandler - */ - private DefaultHandler() { - } + /** + * Creates new DefaultHandler + */ + private DefaultHandler() { + } - /* - * public methods - * ======================================================================== - */ + /* + * public methods ======================================================================== + */ - /** - * Returns an instance of this handler. - */ - public static Handler getInstance() { - return handler; - } + /** + * Returns an instance of this handler. + */ + public static Handler getInstance() { + return handler; + } - /** - * Invokes handler logic. - * - * @param configuredHeader - * the user configured header - * @param responseHeader - * the response header from the server - * @return True if the passed match, otherwise false - */ - public boolean invoke(Header configuredHeader, Header responseHeader) { + /** + * Invokes handler logic. + * + * @param configuredHeader the user configured header + * @param responseHeader the response header from the server + * @return True if the passed match, otherwise false + */ + public boolean invoke(Header configuredHeader, Header responseHeader) { - TestUtil.logTrace("[DefaulHandler] DefaultHandler invoked."); + TestUtil.logTrace("[DefaulHandler] DefaultHandler invoked."); - return areHeadersEqual(configuredHeader, responseHeader); - } + return areHeadersEqual(configuredHeader, responseHeader); + } - /** - * Utility method to determine equality of two Header objects - * - * @param h1 - * first header - * @param h2 - * second header - * @return true if the headers are equal, otherwise false - */ - protected boolean areHeadersEqual(Header h1, Header h2) { + /** + * Utility method to determine equality of two Header objects + * + * @param h1 first header + * @param h2 second header + * @return true if the headers are equal, otherwise false + */ + protected boolean areHeadersEqual(Header h1, Header h2) { - HeaderElement[] h1Values = h1.getElements(); - HeaderElement[] h2Values = h2.getElements(); + HeaderElement[] h1Values = h1.getElements(); + HeaderElement[] h2Values = h2.getElements(); - if (h1Values.length == h2Values.length) { - for (HeaderElement h1Value : h1Values) { - String h1Val = h1Value.getName(); - boolean found = false; - for (HeaderElement h2Value : h2Values) { - if (h1Val.equals(h2Value.getName())) { - found = true; - break; - } - } - if (!found) { - return false; + if (h1Values.length == h2Values.length) { + for (HeaderElement h1Value : h1Values) { + String h1Val = h1Value.getName(); + boolean found = false; + for (HeaderElement h2Value : h2Values) { + if (h1Val.equals(h2Value.getName())) { + found = true; + break; + } + } + if (!found) { + return false; + } + } + return true; + } else { + return false; } - } - return true; - } else { - return false; } - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java similarity index 87% rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java index 9cb81281c7..dade4aaa51 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/Handler.java @@ -65,20 +65,17 @@ */ public interface Handler { - /* - * public methods - * ======================================================================== - */ + /* + * public methods ======================================================================== + */ - /** - * Invokes handler logic. - * - * @param configuredHeader - * the user configured header - * @param responseHeader - * the response header from the server - * @return True if the passed match, otherwise false - */ - public boolean invoke(Header configuredHeader, Header responseHeader); + /** + * Invokes handler logic. + * + * @param configuredHeader the user configured header + * @param responseHeader the response header from the server + * @return True if the passed match, otherwise false + */ + public boolean invoke(Header configuredHeader, Header responseHeader); } diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java similarity index 64% rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java index d3304ec492..6dbe567bcb 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/HandlerFactory.java @@ -61,66 +61,62 @@ /** *
- * The HandlerManager is responsible for returning the appropriate handler
- * instance based on the provided value.
+ * The HandlerManager is responsible for returning the appropriate handler instance based on the provided value.
  */
 public class HandlerFactory {
 
-  /**
-   * Content-Type handler name.
-   */
-  private static final String CONTENT_TYPE = "content-type";
+    /**
+     * Content-Type handler name.
+     */
+    private static final String CONTENT_TYPE = "content-type";
 
-  /**
-   * Location handler name.
-   */
-  private static final String LOCATION = "location";
+    /**
+     * Location handler name.
+     */
+    private static final String LOCATION = "location";
 
-  /**
-   * Set-Cookie handler name.
-   */
-  private static final String SET_COOKIE = "set-cookie";
+    /**
+     * Set-Cookie handler name.
+     */
+    private static final String SET_COOKIE = "set-cookie";
 
-  /**
-   * ALLOW handler name.
-   */
-  private static final String ALLOW = "allow";
+    /**
+     * ALLOW handler name.
+     */
+    private static final String ALLOW = "allow";
 
-  /**
-   * www-authenticate handler name.
-   */
-  private static final String WWW_AUTH = "www-authenticate";
-  /*
-   * public methods
-   * ========================================================================
-   */
+    /**
+     * www-authenticate handler name.
+     */
+    private static final String WWW_AUTH = "www-authenticate";
+    /*
+     * public methods ========================================================================
+     */
 
-  /**
-   * Constructs a new HandlerManager instance
-   */
-  private HandlerFactory() {
-  }
+    /**
+     * Constructs a new HandlerManager instance
+     */
+    private HandlerFactory() {
+    }
 
-  /**
-   * Returns the appropriate handler instance based on provided discriminate (a
-   * header name).
-   *
-   * @param handlerName
-   *          handler instance to obtain.
-   */
-  public static Handler getHandler(String handlerName) {
-    if (CONTENT_TYPE.equals(handlerName.toLowerCase())) {
-      return ContentTypeHandler.getInstance();
-    } else if (LOCATION.equals(handlerName.toLowerCase())) {
-      return LocationHandler.getInstance();
-    } else if (SET_COOKIE.equals(handlerName.toLowerCase())) {
-      return SetCookieHandler.getInstance();
-    } else if (WWW_AUTH.equals(handlerName.toLowerCase())) {
-      return WWWAuthenticateHandler.getInstance();
-    } else if (ALLOW.equals(handlerName.toLowerCase())) {
-      return ALLOWHandler.getInstance();
-    } else {
-      return DefaultHandler.getInstance();
+    /**
+     * Returns the appropriate handler instance based on provided discriminate (a header name).
+     *
+     * @param handlerName handler instance to obtain.
+     */
+    public static Handler getHandler(String handlerName) {
+        if (CONTENT_TYPE.equals(handlerName.toLowerCase())) {
+            return ContentTypeHandler.getInstance();
+        } else if (LOCATION.equals(handlerName.toLowerCase())) {
+            return LocationHandler.getInstance();
+        } else if (SET_COOKIE.equals(handlerName.toLowerCase())) {
+            return SetCookieHandler.getInstance();
+        } else if (WWW_AUTH.equals(handlerName.toLowerCase())) {
+            return WWWAuthenticateHandler.getInstance();
+        } else if (ALLOW.equals(handlerName.toLowerCase())) {
+            return ALLOWHandler.getInstance();
+        } else {
+            return DefaultHandler.getInstance();
+        }
     }
-  }
 }
diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java
similarity index 55%
rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java
rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java
index 5a362998f7..3437de2257 100644
--- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java
+++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/LocationHandler.java
@@ -78,85 +78,76 @@
  */
 public class LocationHandler implements Handler {
 
-  private static Handler handler = new LocationHandler();
-
-  /**
-   * Creates new ContentTypeHandler
-   */
-  private LocationHandler() {
-  }
-
-  /*
-   * public methods
-   * ========================================================================
-   */
-
-  /**
-   * Returns an instance of this handler.
-   */
-  public static Handler getInstance() {
-    return handler;
-  }
-
-  /**
-   * Invokes handler logic.
-   * 
-   * @param configuredHeader
-   *          the user configured header
-   * @param responseHeader
-   *          the response header from the server
-   * @return True if the passed match, otherwise false
-   */
-  public boolean invoke(Header configuredHeader, Header responseHeader) {
-
-    boolean pass = true;
-
-    try {
-      TestUtil.logTrace("[LocationHandler] LocationHandler invoked.");
-
-      URL configURL = new URL(configuredHeader.getValue());
-      URL responseURL = new URL(responseHeader.getValue());
-
-      if (!(configURL.getProtocol().equals(responseURL.getProtocol()))) {
-        pass = false;
-        TestUtil.logErr("[LocationHandler] Mismatch between protocols:");
-        TestUtil.logErr(
-            "[LocationHandler] Configured value: " + configURL.getProtocol());
-        TestUtil.logErr(
-            "[LocationHandler] Response value: " + responseURL.getProtocol());
-      }
-
-      if (!(configURL.getPath().equals(responseURL.getPath()))) {
-        pass = false;
-        TestUtil.logErr("[LocationHandler] Mismatch between paths:");
-        TestUtil.logErr(
-            "[LocationHandler] Configured value: " + configURL.getPath());
-        TestUtil.logErr(
-            "[LocationHandler] Response value: " + responseURL.getPath());
-      }
-
-      if (configURL.getQuery() == null) {
-        if (responseURL.getQuery() != null) {
-          pass = false;
-          TestUtil.logErr("[LocationHandler] Mismatch between querys:");
-          TestUtil.logErr("[LocationHandler] Configured value is null");
-          TestUtil.logErr("[LocationHandler] Response value is non-null");
-        }
-      } else if (!(configURL.getQuery().equals(responseURL.getQuery()))) {
-        pass = false;
-        TestUtil.logErr("[LocationHandler] Mismatch between querys:");
-        TestUtil.logErr(
-            "[LocationHandler] Configured value: " + configURL.getQuery());
-        TestUtil.logErr(
-            "[LocationHandler] Response value: " + responseURL.getQuery());
-      }
-
-    } catch (MalformedURLException mue) {
-      pass = false;
-      TestUtil.logErr("[LocationHandler] MalformedURLException");
-      TestUtil.printStackTrace(mue);
+    private static Handler handler = new LocationHandler();
+
+    /**
+     * Creates new ContentTypeHandler
+     */
+    private LocationHandler() {
+    }
+
+    /*
+     * public methods ========================================================================
+     */
+
+    /**
+     * Returns an instance of this handler.
+     */
+    public static Handler getInstance() {
+        return handler;
     }
 
-    return pass;
-  }
+    /**
+     * Invokes handler logic.
+     * 
+     * @param configuredHeader the user configured header
+     * @param responseHeader the response header from the server
+     * @return True if the passed match, otherwise false
+     */
+    public boolean invoke(Header configuredHeader, Header responseHeader) {
+
+        boolean pass = true;
+
+        try {
+            TestUtil.logTrace("[LocationHandler] LocationHandler invoked.");
+
+            URL configURL = new URL(configuredHeader.getValue());
+            URL responseURL = new URL(responseHeader.getValue());
+
+            if (!(configURL.getProtocol().equals(responseURL.getProtocol()))) {
+                pass = false;
+                TestUtil.logErr("[LocationHandler] Mismatch between protocols:");
+                TestUtil.logErr("[LocationHandler] Configured value: " + configURL.getProtocol());
+                TestUtil.logErr("[LocationHandler] Response value: " + responseURL.getProtocol());
+            }
+
+            if (!(configURL.getPath().equals(responseURL.getPath()))) {
+                pass = false;
+                TestUtil.logErr("[LocationHandler] Mismatch between paths:");
+                TestUtil.logErr("[LocationHandler] Configured value: " + configURL.getPath());
+                TestUtil.logErr("[LocationHandler] Response value: " + responseURL.getPath());
+            }
+
+            if (configURL.getQuery() == null) {
+                if (responseURL.getQuery() != null) {
+                    pass = false;
+                    TestUtil.logErr("[LocationHandler] Mismatch between querys:");
+                    TestUtil.logErr("[LocationHandler] Configured value is null");
+                    TestUtil.logErr("[LocationHandler] Response value is non-null");
+                }
+            } else if (!(configURL.getQuery().equals(responseURL.getQuery()))) {
+                pass = false;
+                TestUtil.logErr("[LocationHandler] Mismatch between querys:");
+                TestUtil.logErr("[LocationHandler] Configured value: " + configURL.getQuery());
+                TestUtil.logErr("[LocationHandler] Response value: " + responseURL.getQuery());
+            }
+
+        } catch (MalformedURLException mue) {
+            pass = false;
+            TestUtil.logErr("[LocationHandler] MalformedURLException");
+            TestUtil.printStackTrace(mue);
+        }
+
+        return pass;
+    }
 }
diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java
new file mode 100644
index 0000000000..833213bfee
--- /dev/null
+++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/SetCookieHandler.java
@@ -0,0 +1,79 @@
+/*
+ * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id$
+ */
+
+package com.sun.ts.tests.common.webclient.handler;
+
+import java.util.StringTokenizer;
+
+import org.apache.commons.httpclient.Header;
+
+import com.sun.ts.lib.util.TestUtil;
+
+public class SetCookieHandler implements Handler {
+
+    private static final Handler HANDLER = new SetCookieHandler();
+
+    private static final String DELIM = "##";
+
+    private SetCookieHandler() {
+    }
+
+    public static Handler getInstance() {
+        return HANDLER;
+    }
+
+    public boolean invoke(Header configuredHeader, Header responseHeader) {
+        String setCookieHeader = responseHeader.getValue().toLowerCase();
+        String expectedValues = configuredHeader.getValue().toLowerCase();
+
+        TestUtil.logTrace("[SetCookieHandler] Set-Cookie header received: " + setCookieHeader);
+
+        StringTokenizer conf = new StringTokenizer(expectedValues, DELIM);
+        while (conf.hasMoreTokens()) {
+            String token = conf.nextToken();
+            String token1 = token;
+
+            if (token.endsWith("\"") && (token.indexOf("=\"") > 1)) {
+                token1 = token.replace("=\"", "=");
+                token1 = token1.substring(0, token.length() - 2);
+            }
+
+            if (token.startsWith("!")) {
+                String attr = token.substring(1);
+                String attr1 = token1.substring(1);
+                if ((setCookieHeader.indexOf(attr) > -1) || (setCookieHeader.indexOf(attr1) > -1)) {
+                    TestUtil.logErr("[SetCookieHandler] Unexpected attribute found " + " Set-Cookie header.  Attribute: " + attr
+                            + "\nSet-Cookie header: " + setCookieHeader);
+                    return false;
+                }
+            } else {
+                if ((setCookieHeader.indexOf(token) < 0) && (setCookieHeader.indexOf(token1) < 0)) {
+                    TestUtil.logErr(
+                            "[SetCookieHandler] Unable to find '" + token + "' within the Set-Cookie header returned by the server.");
+                    return false;
+                } else {
+                    TestUtil.logTrace("[SetCookieHandler] Found expected value, '" + token + "' in Set-Cookie header returned by server.");
+                }
+            }
+        }
+
+        return true;
+    }
+}
diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java
similarity index 79%
rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java
rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java
index 2063429d81..82a01ed41d 100644
--- a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java
+++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/WWWAuthenticateHandler.java
@@ -75,39 +75,35 @@
  */
 public class WWWAuthenticateHandler implements Handler {
 
-  private static Handler handler = new WWWAuthenticateHandler();
+    private static Handler handler = new WWWAuthenticateHandler();
 
-  /**
-   * Creates new ContentTypeHandler
-   */
-  private WWWAuthenticateHandler() {
-  }
+    /**
+     * Creates new ContentTypeHandler
+     */
+    private WWWAuthenticateHandler() {
+    }
 
-  /*
-   * public methods
-   * ========================================================================
-   */
+    /*
+     * public methods ========================================================================
+     */
 
-  /**
-   * Returns an instance of this handler.
-   */
-  public static Handler getInstance() {
-    return handler;
-  }
+    /**
+     * Returns an instance of this handler.
+     */
+    public static Handler getInstance() {
+        return handler;
+    }
 
-  /**
-   * Invokes handler logic.
-   * 
-   * @param configuredHeader
-   *          the user configured header
-   * @param responseHeader
-   *          the response header from the server
-   * @return True if the passed match, otherwise false
-   */
-  public boolean invoke(Header configuredHeader, Header responseHeader) {
+    /**
+     * Invokes handler logic.
+     * 
+     * @param configuredHeader the user configured header
+     * @param responseHeader the response header from the server
+     * @return True if the passed match, otherwise false
+     */
+    public boolean invoke(Header configuredHeader, Header responseHeader) {
 
-    TestUtil
-        .logTrace("[WWWAuthenticateHandler] WWAuthenticateHandler invoked.");
-    return true;
-  }
+        TestUtil.logTrace("[WWWAuthenticateHandler] WWAuthenticateHandler invoked.");
+        return true;
+    }
 }
diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/handler/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/build.xml
similarity index 100%
rename from common/src/main/java/com/sun/ts/tests/common/webclient/handler/build.xml
rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/handler/build.xml
diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java
new file mode 100644
index 0000000000..4b0277c673
--- /dev/null
+++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpRequest.java
@@ -0,0 +1,546 @@
+/*
+ * Copyright (c) 2007, 2022 Oracle and/or its affiliates. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v. 2.0, which is available at
+ * http://www.eclipse.org/legal/epl-2.0.
+ *
+ * This Source Code may also be made available under the following Secondary
+ * Licenses when the conditions for such availability set forth in the
+ * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
+ * version 2 with the GNU Classpath Exception, which is available at
+ * https://www.gnu.org/software/classpath/license.html.
+ *
+ * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
+ */
+
+/*
+ * $Id$
+ */
+
+package com.sun.ts.tests.common.webclient.http;
+
+import java.io.IOException;
+import java.util.StringTokenizer;
+
+import org.apache.commons.httpclient.Cookie;
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpConnection;
+import org.apache.commons.httpclient.HttpException;
+import org.apache.commons.httpclient.HttpMethod;
+import org.apache.commons.httpclient.HttpState;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.cookie.CookiePolicy;
+import org.apache.commons.httpclient.methods.EntityEnclosingMethod;
+import org.apache.commons.httpclient.methods.StringRequestEntity;
+import org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory;
+import org.apache.commons.httpclient.protocol.Protocol;
+import org.apache.commons.httpclient.protocol.ProtocolSocketFactory;
+import org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory;
+// this import is used to force this class to get compiled
+import com.sun.ts.tests.common.webclient.log.WebLog;
+
+import com.sun.ts.lib.util.TestUtil;
+import com.sun.ts.tests.common.webclient.Util;
+
+/**
+ * Represents an HTTP client Request
+ */
+
+public class HttpRequest {
+
+    static {
+        if (TestUtil.traceflag) {
+            System.setProperty("org.apache.commons.logging.Log", "com.sun.ts.tests.common.webclient.log.WebLog");
+            System.setProperty("org.apache.commons.logging.simplelog.log.httpclient.wire", "debug");
+        }
+    }
+
+    /**
+     * Default HTTP port.
+     */
+    public static int DEFAULT_HTTP_PORT = 80;
+
+    /**
+     * Default HTTP SSL port.
+     */
+    public static final int DEFAULT_SSL_PORT = 443;
+
+    /**
+     * No authentication
+     */
+    public static final int NO_AUTHENTICATION = 0;
+
+    /**
+     * Basic authentication
+     */
+    public static final int BASIC_AUTHENTICATION = 1;
+
+    /**
+     * Digest authenctication
+     */
+    public static final int DIGEST_AUTHENTICATION = 2;
+
+    /**
+     * Method representation of request.
+     */
+    private HttpMethod _method = null;
+
+    /**
+     * Target web container host
+     */
+    private String _host = null;
+
+    /**
+     * Target web container port
+     */
+    private int _port = DEFAULT_HTTP_PORT;
+
+    /**
+     * Is the request going over SSL
+     */
+    private boolean _isSecure = false;
+
+    /**
+     * HTTP state
+     */
+    private HttpState _state = null;
+
+    /**
+     * Original request line for this request.
+     */
+    private String _requestLine = null;
+
+    /**
+     * Authentication type for current request
+     */
+    private int _authType = NO_AUTHENTICATION;
+
+    /**
+     * Flag to determine if session tracking will be used or not.
+     */
+    private boolean _useCookies = false;
+
+    /**
+     * Content length of request body.
+     */
+    private int _contentLength = 0;
+
+    /**
+     * FollowRedirects
+     */
+    private boolean _redirect = false;
+
+    Header[] _headers = null;
+
+    protected HttpClient client = null;
+
+    /**
+     * Creates new HttpRequest based of the passed request line. The request line provied must be in the form of:
+ * + *
+     *     METHOD PATH HTTP-VERSION
+     *     Ex.  GET /index.html HTTP/1.0
+     * 
+ */ + public HttpRequest(String requestLine, String host, int port) { + client = new HttpClient(); + _method = MethodFactory.getInstance(requestLine); + _method.setFollowRedirects(false); + _host = host; + _port = port; + + if (port == DEFAULT_SSL_PORT) { + _isSecure = true; + } + + // If we got this far, the request line is in the proper + // format + _requestLine = requestLine; + } + + /* + * public methods ======================================================================== + */ + + /** + * getRequestPath returns the request path for this particular request. + * + * @return String request path + */ + public String getRequestPath() { + return _method.getPath(); + } + + /** + * getRequestMethod returns the request type, i.e., GET, POST, etc. + * + * @return String request type + */ + public String getRequestMethod() { + return _method.getName(); + } + + /** + * isSecureConnection() indicates if the Request is secure or not. + * + * @return boolean whether Request is using SSL or not. + */ + public boolean isSecureRequest() { + return _isSecure; + } + + /** + * setSecureRequest configures this request to use SSL. + * + * @param secure - whether the Request uses SSL or not. + */ + public void setSecureRequest(boolean secure) { + _isSecure = secure; + } + + /** + * setContent will set the body for this request. Note, this is only valid for POST and PUT operations, + * however, if called and the request represents some other HTTP method, it will be no-op'd. + * + * @param content request content + */ + public void setContent(String content) { + if (_method instanceof EntityEnclosingMethod) { + ((EntityEnclosingMethod) _method).setRequestEntity(new StringRequestEntity(content)); + } + _contentLength = content.length(); + } + + /** + * setAuthenticationCredentials configures the request to + * perform authentication. + * + *

username and password cannot be null. + *

+ * + *

+ * It is legal for realm to be null. + *

+ * + * @param username the user + * @param password the user's password + * @param authType authentication type + * @param realm authentication realm + */ + public void setAuthenticationCredentials(String username, String password, int authType, String realm) { + if (username == null) { + throw new IllegalArgumentException("Username cannot be null"); + } + + if (password == null) { + throw new IllegalArgumentException("Password cannot be null"); + } + + UsernamePasswordCredentials cred = new UsernamePasswordCredentials(username, password); + AuthScope scope = new AuthScope(_host, _port, realm); + getState().setCredentials(scope, cred); + TestUtil.logTrace( + "[HttpRequest] Added credentials for '" + username + "' with password '" + password + "' in realm '" + realm + "'"); + + _authType = authType; + } + + /** + * addRequestHeader adds a request header to this request. If a request header of the same name already + * exists, the new value, will be added to the set of already existing values. + * + * NOTE: that header names are not case-sensitive. + * + * @param headerName request header name + * @param headerValue request header value + */ + public void addRequestHeader(String headerName, String headerValue) { + _method.addRequestHeader(headerName, headerValue); + TestUtil.logTrace("[HttpRequest] Added request header: " + _method.getRequestHeader(headerName).toExternalForm()); + } + + public void addRequestHeader(String header) { + StringTokenizer st = new StringTokenizer(header, "|"); + while (st.hasMoreTokens()) { + String h = st.nextToken(); + if (h.toLowerCase().startsWith("cookie")) { + createCookie(h); + continue; + } + int col = h.indexOf(':'); + addRequestHeader(h.substring(0, col).trim(), h.substring(col + 1).trim()); + } + } + + /** + * setRequestHeader sets a request header for this request overwritting any previously existing + * header/values with the same name. + * + * NOTE: Header names are not case-sensitive. + * + * @param headerName request header name + * @param headerValue request header value + */ + public void setRequestHeader(String headerName, String headerValue) { + _method.setRequestHeader(headerName, headerValue); + TestUtil.logTrace("[HttpRequest] Set request header: " + _method.getRequestHeader(headerName).toExternalForm()); + + } + + /** + * setFollowRedirects indicates whether HTTP redirects are followed. By default, redirects are not + * followed. + */ + public void setFollowRedirects(boolean followRedirects) { + _method.setFollowRedirects(followRedirects); + } + + /** + * getFollowRedirects indicates whether HTTP redirects are followed. + */ + public boolean getFollowRedirects() { + return _method.getFollowRedirects(); + } + + /** + * setState will set the HTTP state for the current request (i.e. session tracking). This has the side + * affect + */ + public void setState(HttpState state) { + _state = state; + _useCookies = true; + } + + /** + * execute will dispatch the current request to the target server. + * + * @return HttpResponse the server's response. + * @throws IOException if an I/O error occurs during dispatch. + */ + public HttpResponse execute() throws IOException, HttpException { + String method; + int defaultPort; + ProtocolSocketFactory factory; + + if (_method.getFollowRedirects()) { + client = new HttpClient(); + + if (_isSecure) { + method = "https"; + defaultPort = DEFAULT_SSL_PORT; + factory = new SSLProtocolSocketFactory(); + } else { + method = "http"; + defaultPort = DEFAULT_HTTP_PORT; + factory = new DefaultProtocolSocketFactory(); + } + + Protocol protocol = new Protocol(method, factory, defaultPort); + HttpConnection conn = new HttpConnection(_host, _port, protocol); + + if (conn.isOpen()) { + throw new IllegalStateException("Connection incorrectly opened"); + } + + conn.open(); + + TestUtil.logMsg("[HttpRequest] Dispatching request: '" + _requestLine + "' to target server at '" + _host + ":" + _port + "'"); + + addSupportHeaders(); + _headers = _method.getRequestHeaders(); + + TestUtil.logTrace("########## The real value set: " + _method.getFollowRedirects()); + + client.getHostConfiguration().setHost(_host, _port, protocol); + + client.executeMethod(_method); + + return new HttpResponse(_host, _port, _isSecure, _method, getState()); + } else { + if (_isSecure) { + method = "https"; + defaultPort = DEFAULT_SSL_PORT; + factory = new SSLProtocolSocketFactory(); + } else { + method = "http"; + defaultPort = DEFAULT_HTTP_PORT; + factory = new DefaultProtocolSocketFactory(); + } + + Protocol protocol = new Protocol(method, factory, defaultPort); + HttpConnection conn = new HttpConnection(_host, _port, protocol); + + if (conn.isOpen()) { + throw new IllegalStateException("Connection incorrectly opened"); + } + + conn.open(); + + TestUtil.logMsg("[HttpRequest] Dispatching request: '" + _requestLine + "' to target server at '" + _host + ":" + _port + "'"); + + addSupportHeaders(); + _headers = _method.getRequestHeaders(); + + TestUtil.logTrace("########## The real value set: " + _method.getFollowRedirects()); + + _method.execute(getState(), conn); + + return new HttpResponse(_host, _port, _isSecure, _method, getState()); + } + } + + /** + * Returns the current state for this request. + * + * @return HttpState current state + */ + public HttpState getState() { + if (_state == null) { + _state = new HttpState(); + } + return _state; + } + + public String toString() { + StringBuffer sb = new StringBuffer(255); + sb.append("[REQUEST LINE] -> ").append(_requestLine).append('\n'); + + if (_headers != null && _headers.length != 0) { + + for (Header _header : _headers) { + sb.append(" [REQUEST HEADER] -> "); + sb.append(_header.toExternalForm()).append('\n'); + } + } + + if (_contentLength != 0) { + sb.append(" [REQUEST BODY LENGTH] -> ").append(_contentLength); + sb.append('\n'); + } + + return sb.toString(); + + } + + /* + * private methods ======================================================================== + */ + + private void createCookie(String cookieHeader) { + String cookieLine = cookieHeader.substring(cookieHeader.indexOf(':') + 1).trim(); + StringTokenizer st = new StringTokenizer(cookieLine, " ;"); + Cookie cookie = new Cookie(); + cookie.setVersion(1); + + getState(); + + if (cookieLine.indexOf("$Version") == -1) { + cookie.setVersion(0); + _method.getParams().setCookiePolicy(CookiePolicy.NETSCAPE); + } + + while (st.hasMoreTokens()) { + String token = st.nextToken(); + + if (token.charAt(0) != '$' && !token.startsWith("Domain") && !token.startsWith("Path")) { + cookie.setName(token.substring(0, token.indexOf('='))); + cookie.setValue(token.substring(token.indexOf('=') + 1)); + } else if (token.indexOf("Domain") > -1) { + cookie.setDomainAttributeSpecified(true); + cookie.setDomain(token.substring(token.indexOf('=') + 1)); + } else if (token.indexOf("Path") > -1) { + cookie.setPathAttributeSpecified(true); + cookie.setPath(token.substring(token.indexOf('=') + 1)); + } + } + _state.addCookie(cookie); + + } + + /** + * Adds any support request headers necessary for this request. These headers will be added based on the state of the + * request. + */ + private void addSupportHeaders() { + + // Authentication headers + // NOTE: Possibly move logic to generic method + switch (_authType) { + case NO_AUTHENTICATION: + break; + case BASIC_AUTHENTICATION: + setBasicAuthorizationHeader(); + break; + case DIGEST_AUTHENTICATION: + throw new UnsupportedOperationException("Digest Authentication is not currently " + "supported"); + } + + // A Host header will be added to each request to handle + // cases where virtual hosts are used, or there is no DNS + // available on the system where the container is running. + setHostHeader(); + + // Content length header + setContentLengthHeader(); + + // Cookies + setCookieHeader(); + } + + /** + * Sets a basic authentication header in the request is Request is configured to use basic authentication + */ + private void setBasicAuthorizationHeader() { + UsernamePasswordCredentials cred = (UsernamePasswordCredentials) getState().getCredentials(new AuthScope(_host, _port, null)); + String authString = null; + if (cred != null) { + authString = "Basic " + Util.getBase64EncodedString(cred.getUserName() + ":" + cred.getPassword()); + } else { + TestUtil.logTrace("[HttpRequest] NULL CREDENTIALS"); + } + _method.setRequestHeader("Authorization", authString); + } + + /** + * Sets a Content-Length header in the request if content is present + */ + private void setContentLengthHeader() { + if (_contentLength > 0) { + _method.setRequestHeader("Content-Length", Integer.toString(_contentLength)); + } + } + + /** + * Sets a host header in the request. If the configured host value is an IP address, the Host header will be sent, but + * without any value. + * + * If we adhered to the HTTP/1.1 spec, the Host header must be empty of the target server is identified via IP address. + * However, no user agents I've tested follow this. And if a custom client library does this, it may not work properly + * with the target server. For now, the Host request-header will always have a value. + */ + private void setHostHeader() { + if (_port == DEFAULT_HTTP_PORT || _port == DEFAULT_SSL_PORT) { + _method.setRequestHeader("Host", _host); + } else { + _method.setRequestHeader("Host", _host + ":" + _port); + } + } + + /** + * Sets a Cookie header if this request is using cookies. + */ + private void setCookieHeader() { + if (_useCookies) { + Cookie[] cookies = _state.getCookies(); + if (cookies != null && cookies.length > 0) { + Header cHeader = CookiePolicy.getCookieSpec(CookiePolicy.RFC_2109).formatCookieHeader(_state.getCookies()); + if (cHeader != null) { + _method.setRequestHeader(cHeader); + } + } + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java new file mode 100644 index 0000000000..a8de97e6f0 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/HttpResponse.java @@ -0,0 +1,299 @@ +/* + * Copyright (c) 2006, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient.http; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; + +import org.apache.commons.httpclient.Header; +import org.apache.commons.httpclient.HttpMethod; +import org.apache.commons.httpclient.HttpMethodBase; +import org.apache.commons.httpclient.HttpState; +import org.apache.commons.httpclient.HttpVersion; + +import com.sun.ts.tests.common.webclient.Util; + +/** + * This class represents an HTTP response from the server. + */ + +public class HttpResponse { + + /** + * Default encoding based on Servlet Specification + */ + private static final String DEFAULT_ENCODING = "ISO-8859-1"; + + /** + * Content-Type header + */ + private static final String CONTENT_TYPE = "Content-Type"; + + /** + * Wrapped HttpMethod used to pull response info from. + */ + private HttpMethod _method = null; + + /** + * HttpState obtained after execution of request + */ + private HttpState _state = null; + + /** + * Charset encoding returned in the response + */ + private String _encoding = DEFAULT_ENCODING; + + /** + * The response body. Initialized after first call to one of the getResponseBody methods and cached for subsequent + * calls. + */ + private String _responseBody = null; + + /** + * Host name used for processing request + */ + private String _host = null; + + /** + * Port number used for processing request + */ + private int _port; + + /** + * Issecure + */ + private boolean _isSecure; + + /** Creates new HttpResponse */ + public HttpResponse(String host, int port, boolean isSecure, HttpMethod method, HttpState state) { + + _host = host; + _port = port; + _isSecure = isSecure; + _method = method; + _state = state; + } + + /* + * public methods ======================================================================== + */ + + /** + * Returns the HTTP status code returned by the server + * + * @return HTTP status code + */ + public String getStatusCode() { + return Integer.toString(_method.getStatusCode()); + } + + /** + * Returns the HTTP reason-phrase returned by the server + * + * @return HTTP reason-phrase + */ + public String getReasonPhrase() { + return _method.getStatusText(); + } + + /** + * Returns the headers received in the response from the server. + * + * @return response headers + */ + public Header[] getResponseHeaders() { + return _method.getResponseHeaders(); + } + + /** + * Returns the headers designated by the name provided. + * + * @return response headers + */ + public Header[] getResponseHeaders(String headerName) { + return _method.getResponseHeaders(headerName); + } + + /** + * Returns the response header designated by the name provided. + * + * @return a specfic response header or null if the specified header doesn't exist. + */ + public Header getResponseHeader(String headerName) { + return _method.getResponseHeader(headerName); + } + + /** + * Returns the response body as a byte array using the charset specified in the server's response. + * + * @return response body as an array of bytes. + */ + public byte[] getResponseBodyAsBytes() throws IOException { + return getEncodedResponse().getBytes(); + } + + /** + * Returns the response as bytes (no encoding is performed by client. + * + * @return the raw response bytes + * @throws IOException if an error occurs reading from server + */ + public byte[] getResponseBodyAsRawBytes() throws IOException { + return _method.getResponseBody(); + } + + /** + * Returns the response body as a string using the charset specified in the server's response. + * + * @return response body as a String + */ + public String getResponseBodyAsString() throws IOException { + return getEncodedResponse(); + } + + /** + * Returns the response body of the server without being encoding by the client. + * + * @return an unecoded String representation of the response + * @throws IOException if an error occurs reading from the server + */ + public String getResponseBodyAsRawString() throws IOException { + return _method.getResponseBodyAsString(); + } + + /** + * Returns the response body as an InputStream using the encoding specified in the server's response. + * + * @return response body as an InputStream + */ + public InputStream getResponseBodyAsStream() throws IOException { + return new ByteArrayInputStream(getEncodedResponse().getBytes()); + } + + /** + * Returns the response body as an InputStream without any encoding applied by the client. + * + * @return an InputStream to read the response + * @throws IOException if an error occurs reading from the server + */ + public InputStream getResponseBodyAsRawStream() throws IOException { + return _method.getResponseBodyAsStream(); + } + + /** + * Returns the charset encoding for this response. + * + * @return charset encoding + */ + public String getResponseEncoding() { + Header content = _method.getResponseHeader(CONTENT_TYPE); + if (content != null) { + String headerVal = content.getValue(); + int idx = headerVal.indexOf(";charset="); + if (idx > -1) { + // content encoding included in response + _encoding = headerVal.substring(idx + 9); + } + } + return _encoding; + } + + /** + * Returns the post-request state. + * + * @return an HttpState object + */ + public HttpState getState() { + return _state; + } + + /** + * Displays a String representation of the response. + * + * @return string representation of response + */ + public String toString() { + StringBuffer sb = new StringBuffer(255); + + sb.append("[RESPONSE STATUS LINE] -> "); + sb.append(((HttpMethodBase) _method).getParams().getVersion().equals(HttpVersion.HTTP_1_1) ? "HTTP/1.1 " : "HTTP/1.0 "); + sb.append(_method.getStatusCode()).append(' '); + sb.append(_method.getStatusText()).append('\n'); + Header[] headers = _method.getResponseHeaders(); + if (headers != null && headers.length != 0) { + for (int i = 0; i < headers.length; i++) { + sb.append(" [RESPONSE HEADER] -> "); + sb.append(headers[i].toExternalForm()).append('\n'); + } + } + + String resBody; + try { + resBody = _method.getResponseBodyAsString(); + } catch (IOException ioe) { + resBody = "UNEXECTED EXCEPTION: " + ioe.toString(); + } + if (resBody != null && resBody.length() != 0) { + sb.append("------ [RESPONSE BODY] ------\n"); + sb.append(resBody); + sb.append("\n-----------------------------\n\n"); + } + return sb.toString(); + } + + /* + * Eventually they need to come from _method + */ + + public String getHost() { + return _host; + } + + public int getPort() { + return _port; + } + + public String getProtocol() { + return _isSecure ? "https" : "http"; + } + + public String getPath() { + return _method.getPath(); + } + + /* + * Private Methods ========================================================================== + */ + + /** + * Returns the response body using the encoding returned in the response. + * + * @return encoded response String. + */ + private String getEncodedResponse() throws IOException { + if (_responseBody == null) { + _responseBody = Util.getEncodedStringFromStream(_method.getResponseBodyAsStream(), getResponseEncoding()); + } + return _responseBody; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java new file mode 100644 index 0000000000..aa99dfcf33 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/MethodFactory.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient.http; + +import java.util.NoSuchElementException; +import java.util.StringTokenizer; + +import org.apache.commons.httpclient.HttpMethod; +import org.apache.commons.httpclient.HttpMethodBase; +import org.apache.commons.httpclient.HttpVersion; +import org.apache.commons.httpclient.methods.DeleteMethod; +import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.commons.httpclient.methods.HeadMethod; +import org.apache.commons.httpclient.methods.OptionsMethod; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.methods.PutMethod; + +import com.sun.ts.lib.porting.TSURL; + +/** + * Simple factory class which returns HttpMethod implementations based on a request line. + *

+ * For example, a request line of GET /index.jsp HTTP/1.0 would return an HttpMethod implementation that + * handles GET requests using HTTP/1.0. + *

+ */ + +public class MethodFactory { + + /** + * HTTP GET + */ + private static final String GET_METHOD = "GET"; + + /** + * HTTP POST + */ + private static final String POST_METHOD = "POST"; + + /** + * HTTP HEAD + */ + private static final String HEAD_METHOD = "HEAD"; + + /** + * HTTP PUT + */ + private static final String PUT_METHOD = "PUT"; + + /** + * HTTP DELETE + */ + private static final String DELETE_METHOD = "DELETE"; + + /** + * HTTP OPTIONS + */ + private static final String OPTIONS_METHOD = "OPTIONS"; + + /** + * TSURL implementation + */ + private static final TSURL TS_URL = new TSURL(); + + /** + * Private constructor as all interaction with this class is through the getInstance() method. + */ + private MethodFactory() { + } + + /* + * public methods ======================================================================== + */ + + /** + * Returns the approriate request method based on the provided request string. The request must be in the format of + * METHOD URI_PATH HTTP_VERSION, i.e. GET /index.jsp HTTP/1.1. + * + * @return HttpMethod based in request. + */ + public static HttpMethod getInstance(String request) { + StringTokenizer st = new StringTokenizer(request); + String method; + String query = null; + String uri; + String version; + try { + method = st.nextToken(); + uri = TS_URL.getRequest(st.nextToken()); + version = st.nextToken(); + } catch (NoSuchElementException nsee) { + throw new IllegalArgumentException("Request provided: " + request + " is malformed."); + } + + // check to see if there is a query string appended + // to the URI + int queryStart = uri.indexOf('?'); + if (queryStart != -1) { + query = uri.substring(queryStart + 1); + uri = uri.substring(0, queryStart); + } + + HttpMethodBase req; + + if (method.equals(GET_METHOD)) { + req = new GetMethod(uri); + } else if (method.equals(POST_METHOD)) { + req = new PostMethod(uri); + } else if (method.equals(PUT_METHOD)) { + req = new PutMethod(uri); + } else if (method.equals(DELETE_METHOD)) { + req = new DeleteMethod(uri); + } else if (method.equals(HEAD_METHOD)) { + req = new HeadMethod(uri); + } else if (method.equals(OPTIONS_METHOD)) { + req = new OptionsMethod(uri); + } else { + throw new IllegalArgumentException("Invalid method: " + method); + } + + setHttpVersion(version, req); + + if (query != null) { + req.setQueryString(query); + } + + return req; + } + + /* + * private methods ======================================================================== + */ + + /** + * Sets the HTTP version for the method in question. + * + * @param version HTTP version to use for this request + * @param method method to adjust HTTP version + */ + private static void setHttpVersion(String version, HttpMethodBase method) { + final String oneOne = "HTTP/1.1"; + method.getParams().setVersion((version.equals(oneOne) ? HttpVersion.HTTP_1_1 : HttpVersion.HTTP_1_0)); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/http/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/webclient/http/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/http/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java similarity index 56% rename from common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java index 58850b088b..cb8ba1867d 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/log/WebLog.java @@ -26,34 +26,32 @@ public class WebLog extends SimpleLog { - /** - * Construct a simple log with given name. - * - * @param name - * log name - */ - public WebLog(String name) { - super(name); - } - - /** - *

- * Do the actual logging. This method assembles the message and then prints to - * System.err. - *

- */ - protected void log(int type, Object message, Throwable t) { - StringBuffer buf = new StringBuffer(64); - // append log type - buf.append("[WIRE] - "); - - // append the message - buf.append(String.valueOf(message)); - - if (t == null) { - TestUtil.logTrace(buf.toString()); - } else { - TestUtil.logTrace(buf.toString(), t); + /** + * Construct a simple log with given name. + * + * @param name log name + */ + public WebLog(String name) { + super(name); + } + + /** + *

+ * Do the actual logging. This method assembles the message and then prints to System.err. + *

+ */ + protected void log(int type, Object message, Throwable t) { + StringBuffer buf = new StringBuffer(64); + // append log type + buf.append("[WIRE] - "); + + // append the message + buf.append(String.valueOf(message)); + + if (t == null) { + TestUtil.logTrace(buf.toString()); + } else { + TestUtil.logTrace(buf.toString(), t); + } } - } } diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java similarity index 57% rename from common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java index 1da481eb25..d53f5c6ad0 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/CheckOneOfStatusesTokenizedValidator.java @@ -19,9 +19,8 @@ import java.io.IOException; /** - * Sometimes it is not clear what result one should get, there might be more two - * or more possibilities. This strategy checks the response contains at least - * one of the given statuses. + * Sometimes it is not clear what result one should get, there might be more two or more possibilities. This strategy + * checks the response contains at least one of the given statuses. * * The statuses are supposed to be separated by "|" character * @@ -29,20 +28,18 @@ */ public class CheckOneOfStatusesTokenizedValidator extends TokenizedValidator { - /** - * When WebTestCase contains more expected response codes it always means to - * check one of them is present; if present, other statuses are dropped. Super - * class method is called to get the logging messages - */ - @Override - protected boolean checkStatusCode() throws IOException { - String responseCode = _res.getStatusCode(); - String caseCodes = _case.getStatusCode(); + /** + * When WebTestCase contains more expected response codes it always means to check one of them is present; if present, + * other statuses are dropped. Super class method is called to get the logging messages + */ + @Override + protected boolean checkStatusCode() throws IOException { + String responseCode = _res.getStatusCode(); + String caseCodes = _case.getStatusCode(); - if (caseCodes != null && caseCodes.charAt(0) != '!' - && caseCodes.contains("|") && caseCodes.contains(responseCode)) - _case.setExpectedStatusCode(responseCode); - return super.checkStatusCode(); - } + if (caseCodes != null && caseCodes.charAt(0) != '!' && caseCodes.contains("|") && caseCodes.contains(responseCode)) + _case.setExpectedStatusCode(responseCode); + return super.checkStatusCode(); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java new file mode 100644 index 0000000000..39ebf70562 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/TokenizedValidator.java @@ -0,0 +1,153 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient.validation; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStreamWriter; +import java.util.StringTokenizer; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.webclient.Goldenfile; +import com.sun.ts.tests.common.webclient.Util; + +/** + *
+ * This class provides all of the functionality of the
+ * WebValidatorBase class.  Additionally, it will compare
+ * the server's response body with the test case's configured
+ * goldenfile using a StringTokenizer.
+ * 
+ */ +public class TokenizedValidator extends WebValidatorBase { + + /** + * System property that will cause the specified goldenfile to be written if it doesn't already exist. + */ + private static final String RECORD_GF = "ts.record.gf"; + + /** + * Creates a new instance of TokenizedValidator + */ + public TokenizedValidator() { + } + + /* + * protected methods ======================================================================== + */ + + /** + * Compare the server response and golenfile using a StringTokenizer. + * + * @return true if response and goldenfile are the same. + * @throws IOException if an error occurs will processing the Goldenfile + */ + protected boolean checkGoldenfile() throws IOException { + String gf = null; + String path = _case.getGoldenfilePath(); + String enc = _res.getResponseEncoding(); + + if (path == null) { + return true; + } + + Goldenfile file = new Goldenfile(_case.getGoldenfilePath(), enc); + + try { + File goldenFile = new File(_case.getGoldenfilePath()); + if (goldenFile.exists()) { + gf = file.getGoldenFileAsString(); + } else if (_case.getGoldenfileStream() != null) { + gf = Util.getEncodedStringFromStream(_case.getGoldenfileStream(), enc); + } + } catch (IOException ioe) { + TestUtil.logErr("[TokenizedValidator] Unexpected exception while accessing " + "goldenfile! " + ioe.toString()); + return false; + } + + String response = _res.getResponseBodyAsString(); + StringTokenizer gfTokenizer = new StringTokenizer(gf); + StringTokenizer resTokenizer = new StringTokenizer(response); + int gfCount = gfTokenizer.countTokens(); + int resCount = resTokenizer.countTokens(); + + // Logic to handle the recording of goldenfiles. + if (gf.equals("NO GOLDENFILE FOUND") && Boolean.getBoolean(RECORD_GF)) { + + TestUtil.logTrace("[TokenizedValidator][INFO] RECORDING GOLDENFILE: " + path); + OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(path), enc); + out.write(response); + out.flush(); + out.close(); + } + + // If the token counts are the same, continue checking + // each individual token, otherwise, immediately fail. + if (gfCount == resCount) { + while (gfTokenizer.hasMoreTokens()) { + String exp = gfTokenizer.nextToken(); + String res = resTokenizer.nextToken(); + if (!exp.equals(res)) { + StringBuffer sb = new StringBuffer(255); + sb.append("[TokenizedValidator]: Server's response and "); + sb.append("goldenfile to not match!\n"); + sb.append("\n Goldenfile token: ").append(exp); + sb.append("\n Response token: ").append(res); + TestUtil.logErr(sb.toString()); + dumpResponseInfo(response, gf); + return false; + } + } + } else { + TestUtil.logErr("[TokenizedValidator]: Token count between server response " + "and goldenfile do not match.\n Response Token" + + "count: " + resCount + "\nGoldenfile Token count: " + gfCount); + + dumpResponseInfo(response, gf); + return false; + } + TestUtil.logTrace("[TokenizedValidator]: Server's response matches the " + "configured goldenfile."); + return true; + } + + /* + * private methods ======================================================================== + */ + + /** + * Dumps the response from the server and the content of the Goldenfile/ + * + * @param serverResponse the response body from the server. + * @param goldenFile the test goldenfile + */ + private static void dumpResponseInfo(String serverResponse, String goldenFile) { + StringBuffer sb = new StringBuffer(255); + sb.append("\nServer Response (below):\n"); + sb.append("------------------------------------------\n"); + sb.append(serverResponse); + sb.append("\n------------------------------------------\n"); + sb.append("\nGoldenfile (below):\n"); + sb.append("------------------------------------------\n"); + sb.append(goldenFile); + sb.append("\n------------------------------------------\n"); + TestUtil.logErr(sb.toString()); + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java new file mode 100644 index 0000000000..b0d5395e3e --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationFactory.java @@ -0,0 +1,60 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient.validation; + +import com.sun.ts.lib.util.TestUtil; + +/** + * Returns a ValidationStrategy instance used to validate a response against a particular WebTestCase + * + * @author Ryan Lubke + * @version %I% + */ +public class ValidationFactory { + + /** + * Private constructor as all interaction with the class is through the getInstance() method. + */ + private ValidationFactory() { + } + + /* + * public methods ======================================================================== + */ + + /** + * Returns a ValidationStrategy instance based on the available factory types. + * + * @param validator Validator instance to obtain + * @return a ValidationStrategy instance or null if the instance could not be obtained. + */ + public static ValidationStrategy getInstance(String validator) { + try { + Object o = Thread.currentThread().getContextClassLoader().loadClass(validator).newInstance(); + if (o instanceof ValidationStrategy) { + return (ValidationStrategy) o; + } + } catch (Throwable t) { + TestUtil.logMsg("[ValidationFactory] Unable to obtain " + "ValidationStrategy instance: " + validator); + } + return null; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java similarity index 86% rename from common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java index 78b9d77817..3312d26c0d 100644 --- a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/ValidationStrategy.java @@ -23,10 +23,9 @@ import com.sun.ts.tests.common.webclient.WebTestCase; /** - * A ValidationStrategy is used to compare a server response with a configured - * test case. How this validation is performed is up to the concrete - * implementation. + * A ValidationStrategy is used to compare a server response with a configured test case. How this validation is + * performed is up to the concrete implementation. */ public interface ValidationStrategy { - public boolean validate(WebTestCase testCase); + public boolean validate(WebTestCase testCase); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java new file mode 100644 index 0000000000..5c82a20476 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/WebValidatorBase.java @@ -0,0 +1,646 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.common.webclient.validation; + +import java.io.IOException; +import java.util.Iterator; +import java.util.List; + +import org.apache.commons.httpclient.Header; + +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.common.webclient.WebTestCase; +import com.sun.ts.tests.common.webclient.handler.Handler; +import com.sun.ts.tests.common.webclient.handler.HandlerFactory; +import com.sun.ts.tests.common.webclient.http.HttpRequest; +import com.sun.ts.tests.common.webclient.http.HttpResponse; + +/** + * Base abstract class for WebTestCase validation. + */ +public abstract class WebValidatorBase implements ValidationStrategy { + + /** + * Used to detect 4xx class HTTP errors to allow fail fast situations when 4xx errors are not expected. + */ + protected static final char CLIENT_ERROR = '4'; + + /** + * Used to detect 5xx class HTTP errors to allows fail fast situations when 5xx errors are not expected. + */ + protected static final char SERVER_ERROR = '5'; + + /** + * This test case's HttpResponse + */ + protected HttpResponse _res = null; + + /** + * This test case's HttpRequest + */ + protected HttpRequest _req = null; + + /** + * The test case being validated + */ + protected WebTestCase _case = null; + + /** + * validate Will validate the response against the configured TestCase. + * + * + *
    + *
  • Check the HTTP status-code
  • + *
  • Check the HTTP reason-phrase
  • + *
  • Check for expected headers
  • + *
  • Check from unexpected headers
  • + *
  • Check expected search strings
  • + *
  • Check unexpected search strings
  • + *
  • Check the goldenfile
  • + *
+ */ + public boolean validate(WebTestCase testCase) { + _res = testCase.getResponse(); + _req = testCase.getRequest(); + _case = testCase; + + // begin the check + try { + if (!checkStatusCode() || !checkReasonPhrase() || !checkExpectedHeaders() || !checkUnexpectedHeaders() || !checkSearchStrings() + || !checkSearchStringsNoCase() || !checkUnorderedSearchStrings() || !checkUnexpectedSearchStrings() + || !checkGoldenfile()) { + return false; + } + } catch (IOException ioe) { + TestUtil.logErr("[WebValidatorBase] Unexpected Exception: " + ioe.toString()); + return false; + } + return true; + } + + /** + * checkStatusCode will perform status code comparisons based on the algorithm below + *
    + *
  • Check the HTTP status code
  • + *
      + *
    • + *

      + * If status code is -1, then return true + *

      + *
    • + *
    • + *

      + * If test case status code null and response 4xx, return failure, print error; return false + *

      + *
    • + *
    • + *

      + * If test case status code null and response 5xx, return failure include response body; return false + *

      + *

    • + *
    • + *

      + * If test case status code null, and response not 4xx or 5xx, return true + *

      + *
    • + *
    • + *

      + * Test case status code not null, compare it with the response status code; return true if equal + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected boolean checkStatusCode() throws IOException { + String sCode = _case.getStatusCode(); + String resCode = _res.getStatusCode(); + if ("-1".equals(sCode)) + return true; + + if (sCode == null && resCode.charAt(0) == CLIENT_ERROR) { + TestUtil.logErr("[WebValidatorBase] Unexpected " + resCode + " received from " + "target server! Request path: " + + _req.getRequestPath()); + return false; + } + + if (sCode == null && (resCode.charAt(0) == SERVER_ERROR)) { + String resBody = _res.getResponseBodyAsRawString(); + StringBuffer sb = new StringBuffer(75 + resBody.length()); + sb.append("[WebValidatorBase] Unexpected '"); + sb.append(resCode).append("' received from target server!\n"); + sb.append("Error response recieved from server:\n"); + sb.append("------------------------------------------------\n"); + sb.append(resBody != null ? resBody : "NO RESPONSE"); + TestUtil.logErr(sb.toString()); + return false; + } + + if (sCode == null) { + return true; + } + + /* + * Take sCode as a comma separated list of status codes. + * + * If prefixed by "!" the response status code must not match any in the list. + * + * Otherwise matching any in the list is accepted. + */ + + boolean exclusions = sCode.charAt(0) == '!'; + String[] sCodes = exclusions ? sCode.substring(1).split(",") : sCode.split(","); + + if (exclusions) { + for (String current : sCodes) { + if (current.equals(resCode)) { + TestUtil.logErr("[WebValidatorBase] Unexpected Status Code " + "recieved from server. Expected any value except '" + + sCode + "', received '" + resCode + "'"); + return false; + } + } + } else { + boolean found = false; + for (String current : sCodes) { + if (current.equals(resCode)) { + TestUtil.logTrace("[WebValidatorBase] Expected Status Code '" + current + "' found in response line!"); + found = true; + break; + } + } + + if (!found) { + TestUtil.logTrace("[WebValidatorBase] Status Code '" + sCode + "' not found in response line!"); + + return false; + } + } + + return true; + } + + /** + * checkSearchStrings will scan the response for the configured strings that are to be expected in the + * response. + *
    + *
  • Check search strings
  • + *
      + *
    • + *

      + * If list of Strings is null, return true. + *

      + *
    • + *
    • + *

      + * If list of Strings is not null, scan response body. If string is found, return true, otherwise display error and + * return false. + *

      + *
    • + *
    + *
+ * NOTE: If there are multiple search strings, the search will be performed as such to preserve the order. For + * example, if the list of search strings contains two entities, the search for the second entity will be started after + * the index if the first match. + * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected boolean checkSearchStrings() throws IOException { + List list = _case.getSearchStrings(); + boolean found = true; + if (list != null && !list.isEmpty()) { + String responseBody = _res.getResponseBodyAsRawString(); + + String search = null; + + for (int i = 0, n = list.size(), startIdx = 0, bodyLength = responseBody.length(); i < n; i++) { + + // set the startIdx to the same value as the body length + // and let the test fail (prevents index based runtime + // exceptions). + if (startIdx >= bodyLength) { + startIdx = bodyLength; + } + + search = (String) list.get(i); + int searchIdx = responseBody.indexOf(search, startIdx); + + TestUtil.logTrace("[WebValidatorBase] Scanning response for " + "search string: '" + search + "' starting at index " + + "location: " + startIdx); + if (searchIdx < 0) { + found = false; + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Unable to find the following "); + sb.append("search string in the server's "); + sb.append("response: '").append(search).append("' at index: "); + sb.append(startIdx); + sb.append("\n[WebValidatorBase] Server's response:\n"); + sb.append("-------------------------------------------\n"); + sb.append(responseBody); + sb.append("\n-------------------------------------------\n"); + TestUtil.logErr(sb.toString()); + break; + } + + TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search + "' at index '" + searchIdx + "' in the server's " + + "response"); + // the new searchIdx is the old index plus the lenght of the + // search string. + startIdx = searchIdx + search.length(); + } + } + return found; + } + + /** + * checkSearchStringsNoCase will scan the response for the configured case insensitive strings that are to + * be expected in the response. + *
    + *
  • Check search strings
  • + *
      + *
    • + *

      + * If list of Strings is null, return true. + *

      + *
    • + *
    • + *

      + * If list of Strings is not null, scan response body. If string is found, return true, otherwise display error and + * return false. + *

      + *
    • + *
    + *
+ * NOTE: If there are multiple search strings, the search will be performed as such to preserve the order. For + * example, if the list of search strings contains two entities, the search for the second entity will be started after + * the index if the first match. + * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected boolean checkSearchStringsNoCase() throws IOException { + List list = _case.getSearchStringsNoCase(); + boolean found = true; + if (list != null && !list.isEmpty()) { + String responseBody = _res.getResponseBodyAsRawString(); + + String search = null; + + for (int i = 0, n = list.size(), startIdx = 0, bodyLength = responseBody.length(); i < n; i++) { + + // set the startIdx to the same value as the body length + // and let the test fail (prevents index based runtime + // exceptions). + if (startIdx >= bodyLength) { + startIdx = bodyLength; + } + + search = (String) list.get(i); + int searchIdx = responseBody.toLowerCase().indexOf(search.toLowerCase(), startIdx); + + TestUtil.logTrace("[WebValidatorBase] Scanning response for " + "search string: '" + search + "' starting at index " + + "location: " + startIdx); + if (searchIdx < 0) { + found = false; + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Unable to find the following "); + sb.append("search string in the server's "); + sb.append("response: '").append(search).append("' at index: "); + sb.append(startIdx); + sb.append("\n[WebValidatorBase] Server's response:\n"); + sb.append("-------------------------------------------\n"); + sb.append(responseBody); + sb.append("\n-------------------------------------------\n"); + TestUtil.logErr(sb.toString()); + break; + } + + TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search + "' at index '" + searchIdx + "' in the server's " + + "response"); + // the new searchIdx is the old index plus the lenght of the + // search string. + startIdx = searchIdx + search.length(); + } + } + return found; + } + + /** + * checkUnorderedSearchStrings will scan the response for the configured strings that are to be expected in + * the response. + *
    + *
  • Check search strings
  • + *
      + *
    • + *

      + * If list of Strings is null, return true. + *

      + *
    • + *
    • + *

      + * If list of Strings is not null, scan response body. If string is found, return true, otherwise display error and + * return false. + *

      + *
    • + *
    + *
+ * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected boolean checkUnorderedSearchStrings() throws IOException { + List list = _case.getUnorderedSearchStrings(); + boolean found = true; + if (list != null && !list.isEmpty()) { + String responseBody = _res.getResponseBodyAsRawString(); + + String search = null; + + for (int i = 0, n = list.size(); i < n; i++) { + + search = (String) list.get(i); + int searchIdx = responseBody.indexOf(search); + + TestUtil.logTrace("[WebValidatorBase] Scanning response for " + "search string: '" + search + "'..."); + if (searchIdx < 0) { + found = false; + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Unable to find the following "); + sb.append("search string in the server's "); + sb.append("response: '").append(search); + sb.append("\n[WebValidatorBase] Server's response:\n"); + sb.append("-------------------------------------------\n"); + sb.append(responseBody); + sb.append("\n-------------------------------------------\n"); + TestUtil.logErr(sb.toString()); + break; + } + + TestUtil.logTrace("[WebValidatorBase] Found search string: '" + search + "' at index '" + searchIdx + "' in the server's " + + "response"); + } + } + return found; + } + + /** + * checkUnexpectedSearchStrings will scan the response for the configured strings that are not expected in + * the response. + *
    + *
  • Check unexpected search strings
  • + *
      + *
    • + *

      + * If list of Strings is null, return true. + *

      + *
    • + *
    • + *

      + * If list of Strings is not null, scan response body. If string is not found, return true, otherwise display error and + * return false. + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected boolean checkUnexpectedSearchStrings() throws IOException { + List list = _case.getUnexpectedSearchStrings(); + if (list != null && !list.isEmpty()) { + String responseBody = _res.getResponseBodyAsRawString(); + Iterator iter = list.iterator(); + while (iter.hasNext()) { + String search = (String) iter.next(); + TestUtil.logTrace("[WebValidatorBase] Scanning response. The following" + + " string should not be present in the response: '" + search + "'"); + if (responseBody.indexOf(search) > -1) { + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Found the following unexpected "); + sb.append("search string in the server's "); + sb.append("response: '").append(search).append("'"); + sb.append("\n[WebValidatorBase] Server's response:\n"); + sb.append("-------------------------------------------\n"); + sb.append(responseBody); + sb.append("\n-------------------------------------------\n"); + TestUtil.logErr(sb.toString()); + return false; + } + } + } + return true; + } + + /** + * checkGoldenFile compare the server's response with the configured goldenfile + *
    + *
  • Check the goldenfile
  • + *
      + *
    • + *

      + * If goldenfile is null, return true. + *

      + *
    • + *
    • + *

      + * If goldenfile is not null, compare the goldenfile with the response. If equal, return true, otherwise display error + * and return false. + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + * @throws IOException if an IO error occurs during validation + */ + protected abstract boolean checkGoldenfile() throws IOException; + + /** + * checkReasonPhrase will perform comparisons between the configued reason-phrase and that of the response. + *
    + *
  • Check reason-phrase
  • + *
      + *
    • + *

      + * If configured reason-phrase is null, return true. + *

      + *
    • + *
    • + *

      + * If configured reason-phrase is not null, compare the reason-phrases with the response. If equal, return true, + * otherwise display error and return false. + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + */ + protected boolean checkReasonPhrase() { + String sReason = _case.getReasonPhrase(); + String resReason = _res.getReasonPhrase(); + + if (sReason == null) { + return true; + } else if (sReason.equalsIgnoreCase(resReason)) { + return true; + } else { + return false; + } + } + + /** + * checkExpectedHeaders will check the response for the configured expected headers. + *
    + *
  • Check expected headers
  • + *
      + *
    • + *

      + * If there are no expected headers, return true. + *

      + *
    • + *
    • + *

      + * If there are expected headers, scan the response for the expected headers. If all expected headers are found, return + * true, otherwise display an error and return false. + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + */ + protected boolean checkExpectedHeaders() { + Header[] expected = _case.getExpectedHeaders(); + if (isEmpty(expected)) { + return true; + } else { + boolean found = true; + Header currentHeader = null; + for (int i = 0; i < expected.length; i++) { + currentHeader = expected[i]; + Header resHeader = _res.getResponseHeader(currentHeader.getName()); + if (resHeader != null) { + Handler handler = HandlerFactory.getHandler(currentHeader.getName()); + if (!handler.invoke(currentHeader, resHeader)) { + found = false; + break; + } + } else { + found = false; + break; + } + } + if (!found) { + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Unable to find the following header"); + sb.append(" in the server's response: "); + sb.append(currentHeader.toExternalForm()).append("\n"); + sb.append("[WebValidatorBase] Response headers recieved from"); + sb.append(" server:"); + + Header[] resHeaders = _res.getResponseHeaders(); + for (int i = 0; i < resHeaders.length; i++) { + sb.append("\n\tResponseHeader -> "); + sb.append(resHeaders[i].toExternalForm()); + } + sb.append("\n"); + TestUtil.logErr(sb.toString()); + + return false; + } else { + TestUtil.logTrace("[WebValidatorBase] Found expected header: " + currentHeader.toExternalForm()); + return true; + } + } + } + + /** + * checkUnexpectedHeaders will check the response for the configured unexpected expected headers. + *
    + *
  • Check unexpected headers
  • + *
      + *
    • + *

      + * If there are no configured unexpected headers, return true. + *

      + *
    • + *
    • + *

      + * If there are configured unexpected headers, scan the response for the unexpected headers. If the headers are not + * found, return true, otherwise display an error and return false. + *

      + *

    • + *
    + *
+ * + * @return boolen result of check + */ + protected boolean checkUnexpectedHeaders() { + Header[] unexpected = _case.getUnexpectedHeaders(); + if (isEmpty(unexpected)) { + return true; + } else { + Header currentHeader = null; + for (int i = 0; i < unexpected.length; i++) { + currentHeader = unexpected[i]; + String currName = currentHeader.getName(); + String currValue = currentHeader.getValue(); + Header resHeader = _res.getResponseHeader(currName); + if (resHeader != null) { + if (resHeader.getValue().equals(currValue)) { + StringBuffer sb = new StringBuffer(255); + sb.append("[WebValidatorBase] Unexpected header found in the "); + sb.append("server's response: "); + sb.append(currentHeader.toExternalForm()).append("\n"); + sb.append("[WebValidatorBase] Response headers recieved from"); + sb.append("server:"); + + Header[] resHeaders = _res.getResponseHeaders(); + for (int j = 0; j < resHeaders.length; j++) { + sb.append("\n\tResponseHeader -> "); + sb.append(resHeaders[j].toExternalForm()); + } + sb.append("\n"); + TestUtil.logErr(sb.toString()); + + return false; + } + } + } + } + return true; + } + + /** + * Utility method to determine of the expected or unexpected headers are empty or not. + */ + protected boolean isEmpty(Header[] headers) { + if (headers == null || headers.length == 0) { + return true; + } else { + return false; + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/common/webclient/validation/build.xml b/tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/common/webclient/validation/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/common/webclient/validation/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java new file mode 100644 index 0000000000..6afe3758c2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/BytesMessageTestImpl.java @@ -0,0 +1,824 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.jms.common; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.ObjectStreamField; + +import jakarta.jms.BytesMessage; +import jakarta.jms.JMSException; +import jakarta.jms.MessageEOFException; +import jakarta.jms.MessageFormatException; +import jakarta.jms.MessageNotReadableException; +import jakarta.jms.MessageNotWriteableException; + +/** + * Class Declaration. + * + * @see + * + * @author + */ +public class BytesMessageTestImpl extends MessageTestImpl implements BytesMessage { + static final private ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("buf", byte[].class) }; + + long bodyLength = 0; + + transient ByteArrayInputStream bais; + + transient DataInputStream dis; + + byte[] buf; + + transient ByteArrayOutputStream baos; + + transient DataOutputStream dos; + + /** + * Class Constructor. + * + * @see + */ + public BytesMessageTestImpl() { + super(); + init(); + } + + /** + * Method Declaration. + * + * + * @see + */ + private void init() { + buf = new byte[0]; + baos = new ByteArrayOutputStream(); + dos = new DataOutputStream(baos); + } + + /** + * Method Declaration. + * + * @param oos + * + * @exception IOException + * + * @see + */ + private void writeObject(ObjectOutputStream oos) throws IOException { + dos.flush(); + buf = baos.toByteArray(); + oos.defaultWriteObject(); + } + + /** + * Method Declaration. + * + * @param ois + * + * @exception ClassNotFoundException + * @exception IOException + * + * @see + */ + private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { + ois.defaultReadObject(); + baos = new ByteArrayOutputStream(); + dos = new DataOutputStream(baos); + if (buf != null) { + dos.write(buf); + buf = null; + } + } + + /** + * Method Declaration. + * + * @exception JMSException + * + * @see + */ + public void clearBody() throws JMSException { + buf = null; + bais = null; + dis = null; + readMode = false; + } + + /** + * Read a boolean from the BytesMessage. + * + * @return the boolean value read. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if end of message stream + */ + public boolean readBoolean() throws JMSException { + boolean ret = false; + checkReadAccess(); + + try { + ret = dis.readBoolean(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readBoolean() + + /** + * Read a signed 8-bit value from the BytesMessage. + * + * @return the next byte from the BytesMessage as a signed 8-bit byte. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public byte readByte() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readByte"); + checkReadAccess(); + + byte ret = 0; + try { + ret = dis.readByte(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readByte() + + /** + * Read an unsigned 8-bit number from the BytesMessage. + * + * @return the next byte from the BytesMessage, interpreted as an unsigned 8-bit number. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public int readUnsignedByte() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readUnsignedByte"); + int ret = 0; + checkReadAccess(); + + try { + ret = dis.readUnsignedByte(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readUnsignedByte() + + /** + * Read a signed 16-bit number from the BytesMessage. + * + * @return the next two bytes from the BytesMessage, interpreted as a signed 16-bit number. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public short readShort() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readShort"); + checkReadAccess(); + short ret = 0; + + try { + ret = dis.readShort(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readShort() + + /** + * Read an unsigned 16-bit number from the BytesMessage. + * + * @return the next two bytes from the BytesMessage, interpreted as an unsigned 16-bit integer. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public int readUnsignedShort() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readUnsignedShort"); + checkReadAccess(); + int ret = 0; + + try { + ret = dis.readUnsignedShort(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readUnsignedShort() + + /** + * Read a Unicode character value from the BytesMessage. + * + * @return the next two bytes from the BytesMessage as a Unicode character. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public char readChar() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readChar"); + checkReadAccess(); + char ret = 0; + + try { + ret = dis.readChar(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readChar() + + /** + * Read a signed 32-bit integer from the BytesMessage. + * + * @return the next four bytes from the BytesMessage, interpreted as an int. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public int readInt() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readInt"); + checkReadAccess(); + int ret = 0; + + try { + ret = dis.readInt(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readInt() + + /** + * Read a signed 64-bit integer from the BytesMessage. + * + * @return the next eight bytes from the BytesMessage, interpreted as a long. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public long readLong() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readLong"); + checkReadAccess(); + long ret = 0; + + try { + ret = dis.readLong(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readLong() + + /** + * Read a float from the BytesMessage. + * + * @return the next four bytes from the BytesMessage, interpreted as a float. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public float readFloat() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readFloat"); + checkReadAccess(); + float ret = 0; + + try { + ret = dis.readFloat(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readFloat() + + /** + * Read a double from the BytesMessage. + * + * @return the next eight bytes from the BytesMessage, interpreted as a double. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public double readDouble() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readDouble"); + checkReadAccess(); + double ret = 0; + + try { + ret = dis.readDouble(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readDouble() + + /** + * Read in a string that has been encoded using a modified UTF-8 format from the BytesMessage. + * + *

+ * For more information on the UTF-8 format, see "File System Safe UCS Transformation Format (FSS_UFT)", X/Open + * Preliminary Specification, X/Open Company Ltd., Document Number: P316. This information also appears in ISO/IEC + * 10646, Annex P. + * + * @return a Unicode string from the BytesMessage. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public String readUTF() throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readUTF"); + checkReadAccess(); + String ret = null; + + try { + ret = dis.readUTF(); + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readUTF() + + /** + * Read a byte array from the BytesMessage. + * + * @param value the buffer into which the data is read. + * + * @return the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream + * has been reached. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public int readBytes(byte[] value) throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readBytes"); + checkReadAccess(); + int ret = -1; + + try { + ret = dis.read(value); + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readBytes() + + /** + * Read a portion of the bytes message. + * + * @param value the buffer into which the data is read. + * @param length the number of bytes to read. + * + * @return the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream + * has been reached. + * + * @exception MessageNotReadableException if message in write-only mode. + * @exception MessageEOFException if end of message stream + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public int readBytes(byte[] value, int length) throws JMSException { + com.sun.ts.lib.util.TestUtil.logTrace("readBytes"); + checkReadAccess(); + int ret = -1; + + if ((length < 0) || (length > value.length)) { + throw new IndexOutOfBoundsException(); + } + try { + ret = dis.read(value, 0, length); + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readBytes() + + /** + * Write a boolean to the BytesMessage as a 1-byte value. The value true is written out as the + * value (byte)1; the value false is written out as the value (byte)0. + * + * @param value the boolean value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeBoolean(boolean writeBoolean) throws JMSException { + + try { + dos.writeBoolean(writeBoolean); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeBoolean() + + /** + * Write out a byte to the BytesMessage as a 1-byte value. + * + * @param value the byte value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeByte(byte value) throws JMSException { + + try { + dos.writeByte((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeByte() + + /** + * Write a short to the BytesMessage as two bytes, high byte first. + * + * @param value the short to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeShort(short value) throws JMSException { + + try { + dos.writeShort((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeShort() + + /** + * Write a char to the BytesMessage as a 2-byte value, high byte first. + * + * @param value the char value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeChar(char value) throws JMSException { + + try { + dos.writeChar((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeChar() + + /** + * Write an int to the BytesMessage as four bytes, high byte first. + * + * @param value the int to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeInt(int value) throws JMSException { + try { + dos.writeInt(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeInt() + + /** + * Write a long to the BytesMessage as eight bytes, high byte first. + * + * @param value the long to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeLong(long value) throws JMSException { + try { + dos.writeLong(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeLong() + + /** + * Convert the float argument to an int using the floatToIntBits method in class + * Float, and then writes that int value to the stream message as a 4-byte quantity, high byte + * first. + * + * @param value the float value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeFloat(float value) throws JMSException { + try { + dos.writeFloat(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeFloat() + + /** + * Convert the double argument to a long using the doubleToLongBits method in class + * Double, and then writes that long value to the stream message as an 8-byte quantity, high + * byte first. + * + * @param value the double value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeDouble(double value) throws JMSException { + try { + dos.writeDouble(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeDouble() + + /** + * Write a string to the BytesMessage using UTF-8 encoding in a machine-independent manner. + * + *

+ * For more information on the UTF-8 format, see "File System Safe UCS Transformation Format (FSS_UFT)", X/Open + * Preliminary Specification, X/Open Company Ltd., Document Number: P316. This information also appears in ISO/IEC + * 10646, Annex P. + * + * @param value the String value to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeUTF(String value) throws JMSException { + try { + dos.writeUTF(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeUTF() + + /** + * Write a byte array to the BytesMessage. + * + * @param value the byte array to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeBytes(byte[] value) throws JMSException { + try { + dos.write(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeBytes() + + /** + * Write a portion of a byte array to the BytesMessage. + * + * @param value the byte array value to be written. + * @param offset the initial offset within the byte array. + * @param length the number of bytes to use. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeBytes(byte[] value, int offset, int length) throws JMSException { + try { + dos.write(value, offset, length); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } + } // writeBytes() + + /** + * Write a Java object to the BytesMessage. + * + *

+ * Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and + * byte arrays. + * + * @param value the Java object to be written. + * + * @exception MessageNotWriteableException if message in read-only mode. + * @exception MessageFormatException if object is invalid type. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + */ + public void writeObject(Object value) throws JMSException { + if (value == null) { + throw new NullPointerException(); + } + if (value instanceof Boolean) { + writeBoolean(((Boolean) value).booleanValue()); + } else if (value instanceof Byte) { + writeByte(((Byte) value).byteValue()); + } else if (value instanceof Character) { + writeChar(((Character) value).charValue()); + } else if (value instanceof Double) { + writeDouble(((Double) value).doubleValue()); + } else if (value instanceof Float) { + writeFloat(((Float) value).floatValue()); + } else if (value instanceof Integer) { + writeInt(((Integer) value).intValue()); + } else if (value instanceof Long) { + writeLong(((Long) value).longValue()); + } else if (value instanceof Short) { + writeShort(((Short) value).shortValue()); + } else if (value instanceof String) { + writeUTF((String) value); + } else if (value instanceof byte[]) { + writeBytes((byte[]) value); + } else { + throw new MessageFormatException("Invalid type"); // I18N + } // if .. else + } // writeObject() + + /** + * Put the message in read-only mode, and reposition the stream of bytes to the beginning. + * + * @exception JMSException if JMS fails to reset the message due to some internal JMS error. + * @exception MessageFormatException if message has an invalid format + */ + public void reset() throws JMSException { + + // forces any buffered output bytes to be written out to the stream + // not really needed in this case, because the underlying output stream + // is a ByteArrayOutputStream + try { + if (bufferIsDirty) { + com.sun.ts.lib.util.TestUtil.logTrace("flush dos"); + dos.flush(); + dos.close(); + baos.close(); + } + + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); + jmsEx.setLinkedException(e); + throw jmsEx; + } + + if (baos != null) { + + // copy the content of DataOutputStream dos to buf + buf = baos.toByteArray(); + com.sun.ts.lib.util.TestUtil.logTrace("baos.toByteArray"); + + } else { + if (buf == null) { + buf = new byte[0]; + com.sun.ts.lib.util.TestUtil.logTrace("buf = new byte[0]"); + } + } + bais = new ByteArrayInputStream(buf); + com.sun.ts.lib.util.TestUtil.logTrace("dis = new DataInputStream(bais)"); + dis = new DataInputStream(bais); + + setBufferIsDirty(false); + readMode = true; + } + + public long getBodyLength() { + return bodyLength; + } + + public void setBodyLength(long l) { + bodyLength = l; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java new file mode 100644 index 0000000000..3232187c10 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/Cleanup.java @@ -0,0 +1,306 @@ +/* + * Copyright (c) 2013, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.jms.common; + +import java.util.ArrayList; +import java.util.Enumeration; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.Destination; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageProducer; +import jakarta.jms.ObjectMessage; +import jakarta.jms.Queue; +import jakarta.jms.QueueBrowser; +import jakarta.jms.Session; + +public final class Cleanup { + private String user = null; + + private String pass = null; + + private ConnectionFactory cf = null; + + public static final String JMSDEFAULT = "jmsDefault"; + + /** + * Default constructor + */ + public Cleanup() { + this(JMSDEFAULT, JMSDEFAULT, null); + } + + /** + * Second constructor + * + * @param ConnectionFactory connfactory the connection factory object + */ + public Cleanup(ConnectionFactory cf) { + this(JMSDEFAULT, JMSDEFAULT, cf); + } + + /** + * Third constructor + * + * @param String user the username credentials + * @param String pass the password credentials + * @param ConnectionFactory connfactory the connection factory object + */ + public Cleanup(String user, String pass, ConnectionFactory cf) { + this.user = user; + this.pass = pass; + this.cf = cf; + } + + /** + * Use this method at cleanup time to remove any connections and messages that have remained on the queue. + * + * @param ArrayList connections list of open connections + * @param ArrayList queues list of queues to flush + */ + public void doClientQueueTestCleanup(ArrayList connections, ArrayList queues) { + TestUtil.logTrace("Entering doClientQueueTestCleanup()"); + try { + closeAllConnections(connections); + flushQueue(queues); + if (queues != null) { + queues.clear(); + } + + if (connections != null) { + connections.clear(); + } + } catch (Exception e) { + TestUtil.logTrace("Ignoring exception: " + e); + } + TestUtil.logTrace("Leaving doClientQueueTestCleanup()"); + } + + /** + * Close any connections opened by the tests + * + * @param ArrayList connections list of connections to close + */ + public void closeAllConnections(ArrayList connections) { + TestUtil.logTrace("Entering closeAllConnections()"); + try { + if (connections != null) { + if (!connections.isEmpty()) { + for (int i = 0; i < connections.size(); i++) { + ((Connection) connections.get(i)).close(); + } + } + } + } catch (Exception e) { + } + TestUtil.logTrace("Leaving closeAllConnections()"); + } + + /********************************************************************************** + * flushDestination(Destination) + * + * Use this method at cleanup time to remove any messages that have remained on the queue. + **********************************************************************************/ + public void flushDestination(Destination destination) throws Exception { + Connection conn = null; + MessageConsumer consumer = null; + MessageProducer producer = null; + Session sess = null; + ObjectMessage msg = null; + int priority = 0; + int numMsgsFlushed = 0; + + TestUtil.logTrace("Entering flushDestination()"); + try { + TestUtil.logTrace("Create new Connection,Session,MessageProducer,MessageConsumer to flush Destination"); + conn = cf.createConnection(user, pass); + sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + producer = sess.createProducer(destination); + consumer = sess.createConsumer(destination); + conn.start(); // start the connections so that messages may be received. + + // send a low priority message + // any other messages on the queue should be received first + // and low priority message should signal the end + msg = sess.createObjectMessage(); + msg.setObject("Flush Destination"); + msg.setStringProperty("COM_SUN_JMS_TESTNAME", "flushDestination"); + TestUtil.logTrace("Send low priority message to Destination to signal the last message"); + producer.send(msg, jakarta.jms.Message.DEFAULT_DELIVERY_MODE, priority, jakarta.jms.Message.DEFAULT_TIME_TO_LIVE); + + // flush the Destination + TestUtil.logTrace("Now flush the Destination"); + Message rmsg = consumer.receive(5000); + while (rmsg != null) { + String tname = rmsg.getStringProperty("COM_SUN_JMS_TESTNAME"); + if (tname != null && tname.equals("flushDestination")) { + // Should be last message (try receiveNoWait() to make sure it is) + rmsg = consumer.receiveNoWait(); + while (rmsg != null) { + numMsgsFlushed++; + rmsg = consumer.receiveNoWait(); + } + break; + } else { + numMsgsFlushed++; + rmsg = consumer.receiveNoWait(); + } + } + if (numMsgsFlushed > 0) { + TestUtil.logTrace("#######flushed " + numMsgsFlushed + " messages"); + } + } catch (Exception e) { + TestUtil.logErr("flushDestination exception: " + e.toString()); + TestUtil.printStackTrace(e); + } finally { + try { + conn.close(); + } catch (Exception e) { + } + } + TestUtil.logTrace("Leaving flushDestination()"); + } + + /********************************************************************************** + * flushQueue(ArrayList) + * + * Use this method at cleanup time to remove any messages that have remained on the queue. + * + * @param Queue qToFlush[] QUEUES + **********************************************************************************/ + public void flushQueue(ArrayList queues) throws Exception { + Connection qc = null; + MessageConsumer qconsumer = null; + Session qs = null; + ObjectMessage msg = null; + Enumeration msgs = null; + int priority = 0; + int numMsgsFlushed = 0; + int numMsgs = 0; + + TestUtil.logTrace("Entering flushQueue(Arraylist)"); + try { + TestUtil.logTrace("Create new Connection,Session to flush Queue"); + qc = cf.createConnection(user, pass); + qs = qc.createSession(false, Session.AUTO_ACKNOWLEDGE); + qc.start(); // start the connections so that messages may be received. + + for (int i = 0; i < queues.size(); i++) { + TestUtil.logTrace("Create QueueBrowser to count number of messages left on Queue"); + QueueBrowser qBrowser = qs.createBrowser((Queue) queues.get(i)); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + + if (numMsgs == 0) { + TestUtil.logTrace("No messages left on Queue " + ((Queue) queues.get(i)).getQueueName()); + } else { + TestUtil.logTrace(numMsgs + " messages left on Queue " + ((Queue) queues.get(i)).getQueueName()); + + TestUtil.logTrace("Create new MessageConsumer to flush messages in Queue"); + qconsumer = qs.createConsumer((Queue) queues.get(i)); + + // flush the queue + TestUtil.logTrace("Now flush the Queue"); + Message rmsg = qconsumer.receive(5000); + while (rmsg != null) { + numMsgsFlushed++; + rmsg = qconsumer.receiveNoWait(); + if (rmsg == null) { + // Should be last message (try receiveNoWait() one more time to + // make sure it is) + rmsg = qconsumer.receiveNoWait(); + } + } + + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } + } + } + } catch (Exception e) { + TestUtil.logErr("flushQueue exception: " + e.toString()); + TestUtil.printStackTrace(e); + } finally { + try { + qc.close(); + } catch (Exception e) { + } + } + TestUtil.logTrace("Leaving flushQueue(ArrayList)"); + } + + /********************************************************************************** + * flushQueue(Queue, Session) + * + * Use this method at cleanup time to remove any messages that have remained on the queue. + * + * @param Queue queue the queue to flush + * @param Session session the session + **********************************************************************************/ + public void flushQueue(Queue queue, Session session) throws Exception { + int numMsgsFlushed = 0; + int numMsgs = 0; + Enumeration msgs = null; + + TestUtil.logTrace("Entering flushQueue(Queue, Session)"); + try { + QueueBrowser qBrowser = session.createBrowser(queue); + MessageConsumer consumer = session.createConsumer(queue); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + + if (numMsgs == 0) { + TestUtil.logTrace("No messages left on Queue " + queue.getQueueName()); + } else { + TestUtil.logTrace(numMsgs + " messages left on Queue " + queue.getQueueName()); + if (consumer != null) { + // flush the queue + Message msg = consumer.receiveNoWait(); + while (msg != null) { + numMsgsFlushed++; + msg = consumer.receiveNoWait(); + } + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } + + // if Session is transacted be sure to commit consumed messages + if (numMsgsFlushed > 0 && session.getTransacted()) { + session.commit(); + } + } + } + } catch (Exception e) { + } + TestUtil.logTrace("Leaving flushQueue(Queue, Session)"); + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java similarity index 58% rename from common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java index ab06dd2b4b..a771fe13a9 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/DoneLatch.java @@ -20,35 +20,34 @@ package com.sun.ts.tests.jms.common; /** - * Monitor class for asynchronous examples. Producer signals end of message - * stream; listener calls allDone() to notify consumer that the signal has - * arrived, while consumer calls waitTillDone() to wait for this notification. + * Monitor class for asynchronous examples. Producer signals end of message stream; listener calls allDone() to notify + * consumer that the signal has arrived, while consumer calls waitTillDone() to wait for this notification. */ public class DoneLatch { - boolean done = false; + boolean done = false; - /** - * Waits until done is set to true. - */ - public void waitTillDone() { - synchronized (this) { - while (!done) { - try { - this.wait(); - } catch (InterruptedException ie) { + /** + * Waits until done is set to true. + */ + public void waitTillDone() { + synchronized (this) { + while (!done) { + try { + this.wait(); + } catch (InterruptedException ie) { + } + } } - } } - } - /** - * Sets done to true. - */ - public void allDone() { - synchronized (this) { - done = true; - this.notify(); + /** + * Sets done to true. + */ + public void allDone() { + synchronized (this) { + done = true; + this.notify(); + } } - } } diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java similarity index 60% rename from common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java index b7c6b83e45..75e02c4885 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/InvalidTextMessageTestImpl.java @@ -24,28 +24,27 @@ import jakarta.jms.MessageFormatException; import jakarta.jms.TextMessage; -public class InvalidTextMessageTestImpl extends MessageTestImpl - implements TextMessage { - private String text; +public class InvalidTextMessageTestImpl extends MessageTestImpl implements TextMessage { + private String text; - private int integer; + private int integer; - private java.util.Date date = new java.util.Date(); + private java.util.Date date = new java.util.Date(); - public InvalidTextMessageTestImpl() { - super(); - } + public InvalidTextMessageTestImpl() { + super(); + } - public InvalidTextMessageTestImpl(String string) { - super(); - text = string; - } + public InvalidTextMessageTestImpl(String string) { + super(); + text = string; + } - public void setText(String string) throws JMSException { - text = string; - } + public void setText(String string) throws JMSException { + text = string; + } - public String getText() throws JMSException { - throw new MessageFormatException("bad text message"); - } + public String getText() throws JMSException { + throw new MessageFormatException("bad text message"); + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java new file mode 100644 index 0000000000..21078a6665 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsTool.java @@ -0,0 +1,1517 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.jms.common; + +import java.util.ArrayList; +import java.util.Enumeration; + +import com.sun.ts.lib.porting.TSJMSObjects; +import com.sun.ts.lib.porting.TSJMSObjectsInterface; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.Destination; +import jakarta.jms.JMSConsumer; +import jakarta.jms.JMSContext; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageProducer; +import jakarta.jms.ObjectMessage; +import jakarta.jms.Queue; +import jakarta.jms.QueueBrowser; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueReceiver; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; +import jakarta.jms.TopicPublisher; +import jakarta.jms.TopicSession; +import jakarta.jms.TopicSubscriber; + +public class JmsTool { + + // QUEUE declarations + private Queue testQueue = null; + + private QueueConnection qConnection = null; + + private QueueSession qSession = null; + + private QueueReceiver qReceiver = null; + + private QueueSender qSender = null; + + // TOPIC declarations + private Topic testTopic = null; + + private TopicConnection tConnection = null; + + private TopicSession tSession = null; + + private TopicSubscriber tSubscriber = null; + + private TopicPublisher tPublisher = null; + + // COMMON declarations + private Destination testDestination = null; + + private Connection conn = null; + + private Session sess = null; + + private MessageConsumer receiver = null; + + private MessageProducer sender = null; + + private boolean durableTopic = false; + + private boolean transacted = false; + + private int ttype = 0; + + private int ftype = 5; + + private String username = null; + + private String password = null; + + private String jndiLookupName = null; + + // constants + public static final int QUEUE = 0; + + public static final int TOPIC = 1; + + public static final int TX_QUEUE = 2; + + public static final int TX_TOPIC = 3; + + public static final int DURABLE_TOPIC = 4; + + public static final int DURABLE_TX_TOPIC = 5; + + public static final int FACTORIES_ONLY = 6; + + public static final int QUEUE_FACTORY = 7; + + public static final int TOPIC_FACTORY = 8; + + public static final int DURABLE_TOPIC_FACTORY = 9; + + public static final int FACTORY_Q = 10; + + public static final int FACTORY_T = 11; + + public static final int FACTORY_DT = 12; + + public static final int COMMON_Q = 13; + + public static final int COMMON_T = 14; + + public static final int COMMON_QTX = 15; + + public static final int COMMON_TTX = 16; + + public static final int COMMON_FACTORY = 17; + + public static final String JMS_VERSION = "3.1"; + + public static final int JMS_MAJOR_VERSION = 3; + + public static final int JMS_MINOR_VERSION = 1; + + // JNDI names for JMS objects (Standalone mode) + public static final String TCKTESTQUEUENAME = "MY_QUEUE"; + + public static final String TCKTESTTOPICNAME = "MY_TOPIC"; + + public static final String TCKCONNECTIONFACTORY = "MyConnectionFactory"; + + public static final String TCKQUEUECONNECTIONFACTORY = "MyQueueConnectionFactory"; + + public static final String TCKTOPICCONNECTIONFACTORY = "MyTopicConnectionFactory"; + + public static final String TCKDURABLETOPICCONNECTIONFACTORY = "DURABLE_SUB_CONNECTION_FACTORY"; + + // JNDI names for JMS objects (JakartaEE mode) + public static final String TESTQUEUENAME = "java:comp/env/jms/MY_QUEUE"; + + public static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; + + public static final String CONNECTIONFACTORY = "java:comp/env/jms/MyConnectionFactory"; + + public static final String QUEUECONNECTIONFACTORY = "java:comp/env/jms/MyQueueConnectionFactory"; + + public static final String TOPICCONNECTIONFACTORY = "java:comp/env/jms/MyTopicConnectionFactory"; + + public static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/DURABLE_SUB_CONNECTION_FACTORY"; + + public static final String JMSDEFAULT = "jmsDefault"; + + // statics + private TSNamingContext jndiContext = null; + + private QueueConnectionFactory qcf = null; + + private TopicConnectionFactory tcf = null; + + private TopicConnectionFactory tcf2 = null; + + private ConnectionFactory cf = null; + + private ConnectionFactory cf2 = null; + + private TSJMSObjectsInterface jmsObjects = null; + + private String mode = "jakartaEE"; + + /********************************************************************************** + * Public constructor. Takes a connection type and mode argument. Create connection factory, connection type, and single + * producer/consumer for either QUEUE or TOPIC client. + * + * @param int type (QUEUE type or TOPIC type) + * @param String m (JakartaEE mode or Standalone mode) + **********************************************************************************/ + public JmsTool(int type, String m) throws Exception { + + this(type, JMSDEFAULT, JMSDEFAULT, m); + } + + /********************************************************************************** + * Public constructor. Takes connection type, username, password, jndi lookup name, and mode argument. Create connection + * factory, connection type, and single producer/consumer for TOPIC client. + * + * @param int type (TOPIC type) + * @param String user (username) + * @param String pw (password) + * @param String lookup (connection factory to lookup) + * @param String m (JakartaEE mode or Standalone mode) + **********************************************************************************/ + public JmsTool(int type, String user, String pw, String lookup, String m) throws Exception { + username = user; + password = pw; + ttype = type; + mode = m; + + if (mode.equals("jakartaEE")) { + getJNDIContext(); + } else { + jmsObjects = TSJMSObjects.getJMSObjectsInstance(); + } + + if (type == TOPIC) { + transacted = false; + createTopicSetup(lookup); + } else if (type == TX_TOPIC) { + transacted = true; + createTopicSetup(lookup); + } else if (type == DURABLE_TOPIC) { + transacted = false; + createTopicSetup(lookup); + } else if (type == DURABLE_TX_TOPIC) { + transacted = true; + createTopicSetup(lookup); + } else if (type == COMMON_T) { + transacted = false; + createCommonTSetup(lookup); + } else if (type == COMMON_TTX) { + transacted = true; + createCommonTSetup(lookup); + } else { + String eMsg = "Type must be JmsTool.TOPIC, JmsTool.TX_TOPIC, JmsTool.DURABLE_TOPIC, " + + "JmsTool.DURABLE_TX_TOPIC, JmsTool.COMMON_T, JmsTool.COMMON_TTX."; + throw new Exception(eMsg); + } + } + + /********************************************************************************** + * Public constructor. Takes connection type, username, password, and mode argument. Create connection factory, + * connection type, and single producer/consumer for either QUEUE or TOPIC client. If just a FACTORY type is passed then + * just create the connection factory type. + * + * @param int type (QUEUE type or TOPIC type or FACTORY type) + * @param String user (username) + * @param String pw (password) + * @param String m (JakartaEE mode or Standalone mode) + **********************************************************************************/ + public JmsTool(int type, String user, String pw, String m) throws Exception { + username = user; + password = pw; + ttype = type; + mode = m; + + if (mode.equals("jakartaEE")) { + getJNDIContext(); + } else { + jmsObjects = TSJMSObjects.getJMSObjectsInstance(); + } + + if (type == QUEUE) { + transacted = false; + createQueueSetup(); + } else if (type == TX_QUEUE) { + transacted = true; + createQueueSetup(); + } else if (type == TOPIC) { + durableTopic = false; + transacted = false; + createTopicSetup(); + } else if (type == TX_TOPIC) { + durableTopic = false; + transacted = true; + createTopicSetup(); + } else if (type == DURABLE_TOPIC) { + durableTopic = true; + transacted = false; + createTopicSetup(); + } else if (type == DURABLE_TX_TOPIC) { + durableTopic = true; + transacted = true; + createTopicSetup(); + } else if (type == COMMON_Q) { + transacted = false; + createCommonQSetup(); + } else if (type == COMMON_T) { + transacted = false; + createCommonTSetup(); + } else if (type == COMMON_QTX) { + transacted = true; + createCommonQSetup(); + } else if (type == COMMON_TTX) { + transacted = true; + createCommonTSetup(); + } else if ((type == FACTORIES_ONLY) || (type == QUEUE_FACTORY) || (type == DURABLE_TOPIC_FACTORY) || (type == TOPIC_FACTORY) + || (type == COMMON_FACTORY) || (type == FACTORY_Q) || (type == FACTORY_DT) || (type == FACTORY_T)) + getConnectionFactoriesOnly(type); + else { + String eMsg = "Type must be JmsTool.QUEUE, JmsTool.TOPIC, JmsTool.TX_QUEUE, JmsTool.TX_TOPIC, " + + "JmsTool.DURABLE_TOPIC, JmsTool.DURABLE_TX_TOPIC, JmsTool.FACTORIES_ONLY, " + + "JmsTool.QUEUE_FACTORY, JmsTool.TOPIC_FACTORY, JmsTool.COMMON_FACTORY, " + + "JmsTool.FACTORY_Q, JmsTool.FACTORY_T, JmsTool.FACTORY_DT, " + + "JmsTool.DURABLE_TOPIC_FACTORY, JmsTool.COMMON_Q, JmsTool.COMMON_T, " + "JmsTool.COMMON_QTX, or JmsTool.COMMON_TTX."; + throw new Exception(eMsg); + } + } + + private void getJNDIContext() throws Exception { + + if (jndiContext == null) { + + try { + TestUtil.logTrace("Getting initial context"); + jndiContext = new TSNamingContext(); + } catch (javax.naming.NamingException ne) { + TestUtil.logErr("Could not create JNDI context because: ", ne); + throw ne; + } + } + } + + /************************************************************************ + * Used by tests that create all their own connections + ***********************************************************************/ + private void getConnectionFactoriesOnly(int factype) throws Exception { + + try { + ftype = factype; + this.getConnectionFactoriesOnly(); + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw e; + } + } + + /************************************************************************ + * Used by tests that create all their own connections + ***********************************************************************/ + private void getConnectionFactoriesOnly() throws Exception { + + if ((ftype == QUEUE_FACTORY) || (ftype == FACTORIES_ONLY)) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting QueueConnectionFactory " + QUEUECONNECTIONFACTORY); + qcf = (QueueConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); + jndiLookupName = QUEUECONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting QueueConnectionFactory " + TCKQUEUECONNECTIONFACTORY); + qcf = (QueueConnectionFactory) jmsObjects.getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); + jndiLookupName = TCKQUEUECONNECTIONFACTORY; + } + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + TestUtil.printStackTrace(e); + throw e; + } + } + + if ((ftype == TOPIC_FACTORY) || (ftype == FACTORIES_ONLY)) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting TopicConnectionFactory " + TOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); + jndiLookupName = TOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting TopicConnectionFactory " + TCKTOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); + jndiLookupName = TCKTOPICCONNECTIONFACTORY; + } + + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + TestUtil.printStackTrace(e); + throw e; + } + } + + if (ftype == DURABLE_TOPIC_FACTORY) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Durable TopicConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jndiContext.lookup(DURABLETOPICCONNECTIONFACTORY); + jndiLookupName = DURABLETOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting Durable TopicConnectionFactory " + TCKDURABLETOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); + jndiLookupName = TCKDURABLETOPICCONNECTIONFACTORY; + } + + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + TestUtil.printStackTrace(e); + throw e; + } + } + + if (ftype == COMMON_FACTORY) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting ConnectionFactory " + CONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(CONNECTIONFACTORY); + jndiLookupName = CONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting ConnectionFactory " + TCKCONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getConnectionFactory(TCKCONNECTIONFACTORY); + jndiLookupName = TCKCONNECTIONFACTORY; + } + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + throw e; + } + } + + if ((ftype == FACTORY_T) || (ftype == FACTORIES_ONLY)) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting TopicConnectionFactory as a ConnectionFactory " + TOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); + jndiLookupName = TOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting TopicConnectionFactory as a ConnectionFactory " + TCKTOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); + jndiLookupName = TCKTOPICCONNECTIONFACTORY; + } + + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + throw e; + } + } + + if (ftype == FACTORY_DT) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Durable TopicConnectionFactory as a ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(DURABLETOPICCONNECTIONFACTORY); + jndiLookupName = DURABLETOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting Durable TopicConnectionFactory as a ConnectionFactory " + TCKDURABLETOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); + jndiLookupName = TCKDURABLETOPICCONNECTIONFACTORY; + } + + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + throw e; + } + } + + if ((ftype == FACTORY_Q) || (ftype == FACTORIES_ONLY)) { + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting QueueConnectionFactory as a ConnectionFactory " + QUEUECONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); + jndiLookupName = QUEUECONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting QueueConnectionFactory as a ConnectionFactory " + TCKQUEUECONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); + jndiLookupName = TCKQUEUECONNECTIONFACTORY; + } + qcf = (QueueConnectionFactory) cf; + } catch (Exception e) { + TestUtil.logErr("Failed to lookup connection factory using name " + jndiLookupName + " because: ", e); + throw e; + } + } + + } + + /************************************************************************ + * Queue setup using Queue specific classes/interfaces + ************************************************************************/ + private void createQueueSetup() throws Exception { + + String eMsg = ""; // error Message if exception thrown + + try { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting QueueConnectionFactory " + QUEUECONNECTIONFACTORY); + qcf = (QueueConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); + eMsg = "Failed to lookup QueueConnectionFactory using name " + QUEUECONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting QueueConnectionFactory " + TCKQUEUECONNECTIONFACTORY); + qcf = (QueueConnectionFactory) jmsObjects.getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); + eMsg = "Failed to lookup QueueConnectionFactory using name " + TCKQUEUECONNECTIONFACTORY; + } + + // now lookup the queue + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Queue " + TESTQUEUENAME); + testQueue = (Queue) jndiContext.lookup(TESTQUEUENAME); + eMsg = "Failed to lookup Queue " + TESTQUEUENAME; + } else { + TestUtil.logTrace("Getting Queue " + TCKTESTQUEUENAME); + testQueue = (Queue) jmsObjects.getQueue(TCKTESTQUEUENAME); + eMsg = "Failed to lookup Queue " + TCKTESTQUEUENAME; + } + + // create default connection + TestUtil.logTrace("Creating QueueConnection"); + eMsg = "Failed to create queue connection using username, " + username + " password, " + password; + qConnection = (QueueConnection) createNewConnection(ttype, username, password); + + // create default QueueSession and Queue reference + TestUtil.logTrace("Creating QueueSession"); + eMsg = "Failed to create queue session"; + + qSession = qConnection.createQueueSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating receiver"); + eMsg = "Failed to create receiver for queue " + testQueue; + qReceiver = qSession.createReceiver(testQueue); + + TestUtil.logTrace("Creating sender"); + eMsg = "Failed to create sender for queue " + testQueue; + qSender = qSession.createSender(testQueue); + TestUtil.logTrace("Success - Queue Setup done"); + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + TestUtil.printStackTrace(e); + throw e; + } + } + + /************************************************************************ + * Topic setup using Topic specific classes/interfaces + ************************************************************************/ + private void createTopicSetup() throws Exception { + String eMsg = ""; + + try { + + if (durableTopic) { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Durable TopicConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jndiContext.lookup(DURABLETOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup TopicConnectionFactory using name " + DURABLETOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting Durable TopicConnectionFactory " + TCKDURABLETOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKDURABLETOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup TopicConnectionFactory using name " + TCKDURABLETOPICCONNECTIONFACTORY; + } + } else { + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting TopicConnectionFactory " + TOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup TopicConnectionFactory using name " + TOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting TopicConnectionFactory " + TCKTOPICCONNECTIONFACTORY); + tcf = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup TopicConnectionFactory using name " + TCKTOPICCONNECTIONFACTORY; + } + } + + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); + testTopic = (Topic) jndiContext.lookup(TESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TESTTOPICNAME; + } else { + TestUtil.logTrace("Getting Topic " + TCKTESTTOPICNAME); + testTopic = (Topic) jmsObjects.getTopic(TCKTESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; + } + + // create default connection + TestUtil.logTrace("Creating TopicConnection"); + eMsg = "Failed to create topic connection using username, " + username + " password, " + password; + tConnection = (TopicConnection) createNewConnection(ttype, username, password); + + // create default TopicSession + TestUtil.logTrace("Creating TopicSession"); + eMsg = "Failed to create topic session"; + tSession = tConnection.createTopicSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating subscriber"); + eMsg = "Failed to create subscriber for topic " + testTopic; + tSubscriber = tSession.createSubscriber(testTopic); + + TestUtil.logTrace("Creating publisher"); + eMsg = "Failed to create publisher for topic " + testTopic; + tPublisher = tSession.createPublisher(testTopic); + + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + throw e; + } + } + + /************************************************************************ + * Topic setup using Topic specific classes/interfaces + ************************************************************************/ + private void createTopicSetup(String lookup) throws Exception { + String eMsg = ""; + + try { + + TestUtil.logTrace("Getting TopicConnectionFactory " + lookup); + if (mode.equals("jakartaEE")) { + tcf = (TopicConnectionFactory) jndiContext.lookup("java:comp/env/jms/" + lookup); + eMsg = "Failed to lookup TopicConnectionFactory using name java:comp/env/jms/" + lookup; + } else { + tcf = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(lookup); + eMsg = "Failed to lookup TopicConnectionFactory using name " + lookup; + } + + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); + testTopic = (Topic) jndiContext.lookup(TESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TESTTOPICNAME; + } else { + TestUtil.logTrace("Getting Topic " + TCKTESTTOPICNAME); + testTopic = (Topic) jmsObjects.getTopic(TCKTESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; + } + + // create default connection + TestUtil.logTrace("Creating TopicConnection"); + eMsg = "Failed to create topic connection using username, " + username + " password, " + password; + tConnection = (TopicConnection) createNewConnection(ttype, username, password); + + // create default TopicSession + TestUtil.logTrace("Creating TopicSession"); + eMsg = "Failed to create topic session"; + tSession = tConnection.createTopicSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating subscriber"); + eMsg = "Failed to create subscriber for topic " + testTopic; + tSubscriber = tSession.createSubscriber(testTopic); + + TestUtil.logTrace("Creating publisher"); + eMsg = "Failed to create publisher for topic " + testTopic; + tPublisher = tSession.createPublisher(testTopic); + + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + throw e; + } + } + + /************************************************************************ + * Queue setup using common classes/interfaces + ************************************************************************/ + private void createCommonQSetup() throws Exception { + String eMsg = ""; + + try { + + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(QUEUECONNECTIONFACTORY); + eMsg = "Failed to lookup ConnectionFactory using name " + QUEUECONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting ConnectionFactory " + TCKQUEUECONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getQueueConnectionFactory(TCKQUEUECONNECTIONFACTORY); + eMsg = "Failed to lookup ConnectionFactory using name " + TCKQUEUECONNECTIONFACTORY; + } + qcf = (QueueConnectionFactory) cf; + + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting Queue " + TESTQUEUENAME); + testDestination = (Destination) jndiContext.lookup(TESTQUEUENAME); + eMsg = "Failed to lookup Queue " + TESTQUEUENAME; + } else { + TestUtil.logTrace("Getting Queue " + TCKTESTQUEUENAME); + testDestination = (Destination) jmsObjects.getQueue(TCKTESTQUEUENAME); + eMsg = "Failed to lookup Queue " + TCKTESTQUEUENAME; + } + + // create default connection + TestUtil.logTrace("Creating Connection"); + eMsg = "Failed to create connection using username, " + username + " password, " + password; + conn = cf.createConnection(username, password); + + // create default Session + TestUtil.logTrace("Creating Session"); + eMsg = "Failed to create session"; + sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + eMsg = "Failed to create producer for destination " + testDestination; + sender = sess.createProducer(testDestination); + + TestUtil.logTrace("Creating MessageConsumer"); + eMsg = "Failed to create consumer for destination " + testDestination; + receiver = sess.createConsumer(testDestination); + + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + throw e; + } + } + + /************************************************************************ + * Topic setup using common classes/interfaces + ************************************************************************/ + private void createCommonTSetup() throws Exception { + String eMsg = ""; + + try { + + if (mode.equals("jakartaEE")) { + TestUtil.logTrace("Getting ConnectionFactory " + TOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jndiContext.lookup(TOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup ConnectionFactory using name " + TOPICCONNECTIONFACTORY; + } else { + TestUtil.logTrace("Getting ConnectionFactory " + TCKTOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) jmsObjects.getTopicConnectionFactory(TCKTOPICCONNECTIONFACTORY); + eMsg = "Failed to lookup ConnectionFactory using name " + TCKTOPICCONNECTIONFACTORY; + } + + TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); + if (mode.equals("jakartaEE")) { + testDestination = (Destination) jndiContext.lookup(TESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TESTTOPICNAME; + } else { + testDestination = (Destination) jmsObjects.getTopic(TCKTESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; + } + + // create default connection + TestUtil.logTrace("Creating Connection"); + eMsg = "Failed to create connection using username, " + username + " password, " + password; + conn = cf.createConnection(username, password); + + // create default Session + TestUtil.logTrace("Creating Session"); + eMsg = "Failed to create session"; + sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + eMsg = "Failed to create producer for destination " + testDestination; + sender = sess.createProducer(testDestination); + + TestUtil.logTrace("Creating MessageConsumer"); + eMsg = "Failed to create consumer for destination " + testDestination; + receiver = sess.createConsumer(testDestination); + + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + throw e; + } + } + + /************************************************************************ + * Topic setup using common classes/interfaces + ************************************************************************/ + private void createCommonTSetup(String lookup) throws Exception { + String eMsg = ""; + + try { + + TestUtil.logTrace("Getting ConnectionFactory " + lookup); + if (mode.equals("jakartaEE")) { + cf = (ConnectionFactory) jndiContext.lookup("java:comp/env/jms/" + lookup); + eMsg = "Failed to lookup ConnectionFactory using name java:comp/env/jms/" + lookup; + } else { + cf = (ConnectionFactory) jmsObjects.getTopicConnectionFactory(lookup); + eMsg = "Failed to lookup ConnectionFactory using name " + lookup; + } + + TestUtil.logTrace("Getting Topic " + TESTTOPICNAME); + if (mode.equals("jakartaEE")) { + testDestination = (Destination) jndiContext.lookup(TESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TESTTOPICNAME; + } else { + testDestination = (Destination) jmsObjects.getTopic(TCKTESTTOPICNAME); + eMsg = "Failed to lookup Topic " + TCKTESTTOPICNAME; + } + + // create default connection + TestUtil.logTrace("Creating Connection"); + eMsg = "Failed to create connection using username, " + username + " password, " + password; + conn = cf.createConnection(username, password); + + // create default Session + TestUtil.logTrace("Creating Session"); + eMsg = "Failed to create session"; + sess = conn.createSession(transacted, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + eMsg = "Failed to create producer for destination " + testDestination; + sender = sess.createProducer(testDestination); + + TestUtil.logTrace("Creating MessageConsumer"); + eMsg = "Failed to create consumer for destination " + testDestination; + receiver = sess.createConsumer(testDestination); + + } catch (Exception e) { + TestUtil.logErr(eMsg + "due to ", e); + throw e; + } + } + + /*********************************************************************** + * Default getter's for COMMON QUEUE or COMMON TOPIC created objects + ***********************************************************************/ + public ConnectionFactory getConnectionFactory() throws Exception { + return cf; + } + + public Connection getDefaultConnection() throws Exception { + return conn; + } + + public Session getDefaultSession() throws Exception { + return sess; + } + + public MessageProducer getDefaultProducer() throws Exception { + return sender; + } + + public MessageConsumer getDefaultConsumer() throws Exception { + return receiver; + } + + public Destination getDefaultDestination() throws Exception { + return testDestination; + } + + /********************************************************************************** + * Creates a new Topic for tests that require more than the Topic. The topic should be setup by the administrator + * + * @param String the topic name + **********************************************************************************/ + public Topic createNewTopic(String topicName) throws Exception { + Topic testT = null; + if (mode.equals("jakartaEE")) + testT = (Topic) jndiContext.lookup("java:comp/env/jms/" + topicName); + else + testT = (Topic) jmsObjects.getTopic(topicName); + + return testT; + } + + /********************************************************************************** + * Creates a new Queue for tests that require more than the Queue. The queue should already be setup by the + * administrator + * + * @param String the queue name + **********************************************************************************/ + public Queue createNewQueue(String queueName) throws Exception { + Queue testQ = null; + if (mode.equals("jakartaEE")) + testQ = (Queue) jndiContext.lookup("java:comp/env/jms/" + queueName); + else + testQ = (Queue) jmsObjects.getQueue(queueName); + return testQ; + } + + /********************************************************************************** + * Close all resources created by JmsTool except connection resource which gets closed in the closeAllConnections() or + * closeDefaultConnections() methods. + * + * @exception Exception + * + **********************************************************************************/ + public void closeAllResources() throws Exception { + // Close QUEUE resource objects + try { + if (qSession != null) + qSession.close(); + } catch (JMSException e) { + } + + try { + if (qSender != null) + qSender.close(); + } catch (JMSException e) { + } + + try { + if (qReceiver != null) + qReceiver.close(); + } catch (JMSException e) { + } + + qSession = null; + qReceiver = null; + qSender = null; + + // Close TOPIC resource objects + try { + if (tSession != null) + tSession.close(); + } catch (JMSException e) { + } + + try { + if (tPublisher != null) + tPublisher.close(); + } catch (JMSException e) { + } + + try { + if (tSubscriber != null) + tSubscriber.close(); + } catch (JMSException e) { + } + + tSession = null; + tSubscriber = null; + tPublisher = null; + + // Close COMMON resource objects + try { + if (sess != null) + sess.close(); + } catch (JMSException e) { + } + try { + if (sender != null) + sender.close(); + } catch (JMSException e) { + } + try { + if (receiver != null) + receiver.close(); + } catch (JMSException e) { + } + + sess = null; + receiver = null; + sender = null; + } + + /********************************************************************************** + * Close any connections opened by the tests + * + * @exception Exception + * + * @see It is allowable to do a second call to close connection per the JMS Specification + **********************************************************************************/ + public void closeAllConnections(ArrayList connections) throws Exception { + try { + closeDefaultConnections(); + if (connections != null) { + if (!connections.isEmpty()) { + for (int i = 0; i < connections.size(); i++) { + ((Connection) connections.get(i)).close(); + TestUtil.logTrace("Closing non default connection"); + } + } + } + } catch (JMSException e) { + TestUtil.logErr("Problem closing connections", e); + } + } + + /********************************************************************************** + * Close default connections + * + * @see It is allowable to do a second call to close connection per the JMS Specification + **********************************************************************************/ + public void closeDefaultConnections() throws Exception { + try { + if (conn != null) { + TestUtil.logTrace("JmstTool: Closing default Connection"); + conn.close(); + } + + if (qConnection != null) { + TestUtil.logTrace("JmstTool: Closing default QueueConnection"); + qConnection.close(); + } + + if (tConnection != null) { + TestUtil.logTrace("JmsTool: Closing default TopicConnection"); + tConnection.close(); + } + } catch (JMSException e) { + + /* + * Connection may already be closed by test method. If it is another type of excption, pass it up to the calling method. + * Should only catch JMSException if there is a regression in the RI. + */ + TestUtil.logErr("Problem closing connections", e); + } + } + + /*********************************************************************** + * Default getter's for QUEUE created objects + ***********************************************************************/ + public QueueConnectionFactory getQueueConnectionFactory() { + return qcf; + } + + public QueueConnection getDefaultQueueConnection() { + return qConnection; + } + + public QueueSession getDefaultQueueSession() { + return qSession; + } + + public QueueReceiver getDefaultQueueReceiver() { + return qReceiver; + } + + public QueueSender getDefaultQueueSender() { + return qSender; + } + + public Queue getDefaultQueue() { + return testQueue; + } + + public Destination getQueueDestination(String lookup) throws Exception { + Destination dest = null; + if (mode.equals("jakartaEE")) + dest = (Destination) jndiContext.lookup("java:comp/env/jms/" + lookup); + else + dest = (Destination) jmsObjects.getQueue(lookup); + return dest; + } + + /*********************************************************************** + * Default getter's for TOPIC created objects + ***********************************************************************/ + public TopicConnectionFactory getTopicConnectionFactory() { + return tcf; + } + + public TopicConnection getDefaultTopicConnection() { + return tConnection; + } + + public TopicSession getDefaultTopicSession() { + return tSession; + } + + public TopicSubscriber getDefaultTopicSubscriber() { + return tSubscriber; + } + + public TopicPublisher getDefaultTopicPublisher() { + return tPublisher; + } + + public Topic getDefaultTopic() { + return testTopic; + } + + public Destination getTopicDestination(String lookup) throws Exception { + Destination dest = null; + if (mode.equals("jakartaEE")) + dest = (Destination) jndiContext.lookup("java:comp/env/jms/" + lookup); + else + dest = (Destination) jmsObjects.getTopic(lookup); + return dest; + } + + /********************************************************************************** + * Use this method at cleanup time to remove any connections and messages that have remained on the queue. + * + * @param ArrayList connections list of open connections + * @param ArrayList queues list of queues to flush + **********************************************************************************/ + public void doClientQueueTestCleanup(ArrayList connections, ArrayList queues) { + try { + closeAllConnections(connections); + flushQueue(queues); + if (queues != null) { + queues.clear(); + } + + if (connections != null) { + connections.clear(); + } + } catch (Exception e) { + TestUtil.logErr("Cleanup error: " + e.toString()); + TestUtil.printStackTrace(e); + } + } + + /********************************************************************************** + * Use this method at cleanup time to remove any messages that have remained on the queue. + **********************************************************************************/ + public void flushDestination() throws Exception { + Connection cC = null; + MessageConsumer receiver = null; + MessageProducer sender = null; + Session sess = null; + ObjectMessage msg = null; + int priority = 0; // lowest priority + int numMsgsFlushed = 0; + + try { + if (conn != null) { + TestUtil.logTrace("Closing default connection in flushDestination()"); + try { + conn.close(); + } catch (Exception ex) { + TestUtil.logErr("Error closing default connection", ex); + } + } + + TestUtil.logTrace("Create new Connection,Session,MessageProducer,MessageConsumer to flush Destination"); + cC = createNewConnection(ttype, username, password); + sess = cC.createSession(false, Session.AUTO_ACKNOWLEDGE); + cC.start(); // start the connections so that messages may be received. + sender = sess.createProducer(testDestination); + receiver = sess.createConsumer(testDestination); + + // create and send a low priority message + // any other messages on the queue should be received first + // and low priority message should signal the end + msg = sess.createObjectMessage(); + msg.setObject("Flush Destination"); + msg.setStringProperty("COM_SUN_JMS_TESTNAME", "flushDestination"); + TestUtil.logTrace("Send low priority message to Destination to signal the last message"); + sender.send(msg, jakarta.jms.Message.DEFAULT_DELIVERY_MODE, priority, jakarta.jms.Message.DEFAULT_TIME_TO_LIVE); + + // flush the Destination + TestUtil.logTrace("Now flush the Destination"); + Message rmsg = receiver.receive(5000); + while (rmsg != null) { + String tname = rmsg.getStringProperty("COM_SUN_JMS_TESTNAME"); + if (tname != null && tname.equals("flushDestination")) { + // Should be last message (try receiveNoWait() one more time to make + // sure it is) + rmsg = receiver.receiveNoWait(); + if (rmsg != null) + numMsgsFlushed++; + } else { + numMsgsFlushed++; + } + rmsg = receiver.receive(1000); + } + + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } else { + TestUtil.logTrace("No messages to flush"); + } + + } catch (Exception e) { + TestUtil.logErr("Cleanup error attempting to flush Destination: " + e.toString()); + } finally { + try { + cC.close(); + } catch (Exception e) { + TestUtil.logErr("Error closing Connection in flushDestination()" + e.toString()); + } + } + } + + /********************************************************************************** + * Use this method at cleanup time to remove any messages that have remained on the queue. + * + * @param Queue qToFlush[] QUEUE + **********************************************************************************/ + public void flushQueue(ArrayList qToFlush) throws Exception { + QueueConnection qc = null; + QueueReceiver qr = null; + QueueSession qs = null; + QueueSender qsndr = null; + ObjectMessage msg = null; + Enumeration msgs = null; + int priority = 0; // lowest priority + int numMsgsFlushed = 0; + int numMsgs = 0; + + try { + + if (getDefaultQueue() != null) { + qToFlush.add(getDefaultQueue()); + } + TestUtil.logTrace("Create new QueueConnection,QueueSession to flush Queue"); + qc = (QueueConnection) createNewConnection(QUEUE, username, password); + qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + qc.start(); // start the connections so that messages may be received. + + for (int i = 0; i < qToFlush.size(); i++) { + TestUtil.logTrace("Create QueueBrowser to count number of messages left on Queue"); + QueueBrowser qBrowser = qs.createBrowser((Queue) qToFlush.get(i)); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + + if (numMsgs == 0) { + TestUtil.logTrace("No Messages left on Queue " + ((Queue) qToFlush.get(i)).getQueueName()); + } else { + TestUtil.logTrace(numMsgs + " Messages left on Queue " + ((Queue) qToFlush.get(i)).getQueueName()); + + TestUtil.logTrace("Create new QueueReceiver to flush messages in Queue"); + qr = qs.createReceiver((Queue) qToFlush.get(i)); + + // flush the queue + TestUtil.logTrace("Now flush the Queue"); + Message rmsg = qr.receive(5000); + while (rmsg != null) { + numMsgsFlushed++; + rmsg = qr.receiveNoWait(); + if (rmsg == null) { + // Should be last message (try receive(1000) one more time to make + // sure it is) + rmsg = qr.receive(1000); + } + } + + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } + } + } + } catch (Exception e) { + TestUtil.logErr("Cleanup error attempting to flush Queue: " + e.toString()); + } finally { + try { + qc.close(); + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection in flushQueue(Array)" + e.toString()); + } + } + } + + public void flushQueue() throws Exception { + int numMsgsFlushed = 0; + int numMsgs = 0; + Enumeration msgs = null; + + try { + TestUtil.logTrace("Create QueueBrowser to count number of messages left on Queue"); + QueueBrowser qBrowser = getDefaultQueueSession().createBrowser(getDefaultQueue()); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + + if (numMsgs == 0) { + TestUtil.logTrace("No Messages left on Queue " + getDefaultQueue().getQueueName()); + } else { + TestUtil.logTrace(numMsgs + " Messages left on Queue " + getDefaultQueue().getQueueName()); + if (getDefaultQueueReceiver() != null) { + // flush the queue + Message msg = getDefaultQueueReceiver().receive(5000); + while (msg != null) { + numMsgsFlushed++; + msg = getDefaultQueueReceiver().receiveNoWait(); + if (msg == null) { + // Should be last message (try receive(1000) one more time to make + // sure it is) + msg = getDefaultQueueReceiver().receive(1000); + } + } + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } + + // if default QueueSession is transacted, + // be sure to commit consumed messages. + if (numMsgsFlushed > 0 && getDefaultQueueSession().getTransacted()) { + getDefaultQueueSession().commit(); + } + } + } + } catch (Exception e) { + } + } + + /********************************************************************************** + * Returns a the default Connection. The returned Connection object must be explicitly cast into a QueueConnection or + * TopicConnection. + * + * @param int type (QUEUE type or TOPIC type) + * @return Connection from the default Queue or Topic or Common ConnectionFactory + **********************************************************************************/ + private Connection createNewConnection(int type, String username, String password) throws Exception { + QueueConnection qC = null; + TopicConnection tC = null; + + if ((type == QUEUE) || (type == TX_QUEUE)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + qC = qcf.createQueueConnection(); + return qC; + } else { + qC = qcf.createQueueConnection(username, password); + return qC; + } + } else if ((type == TOPIC) || (type == TX_TOPIC)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + tC = tcf.createTopicConnection(); + return tC; + } else { + tC = tcf.createTopicConnection(username, password); + return tC; + } + } else if ((type == DURABLE_TOPIC) || (type == DURABLE_TX_TOPIC)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + tC = tcf.createTopicConnection(); + return tC; + } else { + tC = tcf.createTopicConnection(username, password); + return tC; + } + } else if ((type == COMMON_Q) || (type == COMMON_T) || (type == COMMON_QTX) || (type == COMMON_TTX)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + conn = cf.createConnection(); + return conn; + } else { + conn = cf.createConnection(username, password); + return conn; + } + + } else { + throw new Exception("Failed to create new Connection"); + } + } + + /********************************************************************************** + * Returns a new Queue Connection for tests that require more than the default connection. The returned Connection + * object must be explicitly cast into a QueueConnection. + * + * @param int type (QUEUE type) + * @return Connection from the default ConnectionFactory + **********************************************************************************/ + public Connection getNewConnection(int type, String username, String password) throws Exception { + QueueConnection qC = null; + Connection cC = null; + + if ((type == QUEUE) || (type == TX_QUEUE)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + qC = qcf.createQueueConnection(); + return qC; + } else { + qC = qcf.createQueueConnection(username, password); + return qC; + } + } else if (type == COMMON_Q) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + cC = cf.createConnection(); + return cC; + } else { + cC = cf.createConnection(username, password); + return cC; + } + } else { + throw new Exception("Failed to get new Connection"); + } + } + + /********************************************************************************** + * Returns a new Topic Connection for tests that require more than the default connection. The returned Connection + * object must be explicitly cast into a TopicConnection. + * + * @param int type (TOPIC type) + * @return Connection from the default ConnectionFactory + **********************************************************************************/ + public Connection getNewConnection(int type, String username, String password, String lookup) throws Exception { + TopicConnection tC = null; + Connection cC = null; + + if ((type == TOPIC) || (type == TX_TOPIC)) { + if (mode.equals("jakartaEE")) + tcf2 = (TopicConnectionFactory) jndiContext.lookup("java:comp/env/jms/" + lookup); + else + tcf2 = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(lookup); + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + tC = tcf2.createTopicConnection(); + return tC; + } else { + tC = tcf2.createTopicConnection(username, password); + return tC; + } + } else if ((type == DURABLE_TOPIC) || (type == DURABLE_TX_TOPIC)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + tC = tcf.createTopicConnection(); + return tC; + } else { + tC = tcf.createTopicConnection(username, password); + return tC; + } + } else if ((type == COMMON_T) || (type == COMMON_TTX)) { + if (mode.equals("jakartaEE")) + cf2 = (TopicConnectionFactory) jndiContext.lookup("java:comp/env/jms/" + lookup); + else + cf2 = (TopicConnectionFactory) jmsObjects.getTopicConnectionFactory(lookup); + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + cC = cf2.createConnection(); + return cC; + } else { + cC = cf2.createConnection(username, password); + return cC; + } + } else { + throw new Exception("Failed to get new Connection"); + } + } + + /********************************************************************************** + * Returns a new Connection for tests that require more than the default connection. The returned Connection object must + * be explicitly cast into a QueueConnection or TopicConnection. + * + * @param int type (QUEUE type or TOPIC type) + * @return Connection from the default Queue or Topic ConnectionFactory + **********************************************************************************/ + public Connection getNewConnection(int type) throws Exception { + return getNewConnection(type, JMSDEFAULT, JMSDEFAULT); + } + + /*************************************************************** + * Return connection type (QUEUE or TOPIC) + **************************************************************/ + public int getType() { + return ttype; + } + + /********************************************************************************** + * flushDestinationJMSContext Flush destination Queue using JMSContext + * + * Use this method at cleanup time to remove any messages that have remained on the queue. + **********************************************************************************/ + public void flushDestinationJMSContext() throws Exception { + JMSConsumer consumer = null; + JMSContext context = null; + int numMsgsFlushed = 0; + + try { + if (getDefaultConnection() != null) { + TestUtil.logTrace("Closing default connection in flushDestinationJMSContext()"); + try { + getDefaultConnection().close(); + } catch (Exception ex) { + TestUtil.logErr("Error closing default connection", ex); + } + } + + TestUtil.logTrace("Create new JMSContext and JMSConsumer to flush Destination"); + context = createNewJMSContext(ttype, username, password); + consumer = context.createConsumer(testDestination); + + TestUtil.logTrace("Now flush the Destination"); + Message rmsg = consumer.receive(5000); + while (rmsg != null) { + numMsgsFlushed++; + rmsg = consumer.receiveNoWait(); + if (rmsg == null) { + // Should be last message (try receive(1000) one more time to make + // sure it is) + rmsg = consumer.receive(1000); + } + } + + if (numMsgsFlushed > 0) { + TestUtil.logTrace("Flushed " + numMsgsFlushed + " messages"); + } else { + TestUtil.logTrace("No messages to flush"); + } + } catch (Exception e) { + TestUtil.logErr("Cleanup error attempting to flush Destination: " + e.toString()); + } finally { + try { + consumer.close(); + context.close(); + } catch (Exception e) { + } + } + } + + /********************************************************************************** + * createNewJMSContext Return a new JMSContext. + * + * @param int type (QUEUE type or TOPIC type) + * @param String (username) + * @param String (password) + * @return JMSContext + **********************************************************************************/ + private JMSContext createNewJMSContext(int type, String username, String password) throws Exception { + JMSContext context = null; + if ((type == QUEUE) || (type == TX_QUEUE)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + context = qcf.createContext(); + } else { + context = qcf.createContext(username, password); + } + } else if ((type == TOPIC) || (type == TX_TOPIC) || (type == DURABLE_TOPIC) || (type == DURABLE_TX_TOPIC)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + context = tcf.createContext(); + } else { + context = tcf.createContext(username, password); + } + } else if ((type == COMMON_Q) || (type == COMMON_T) || (type == COMMON_QTX) || (type == COMMON_TTX)) { + if (username.equals(JMSDEFAULT) || password.equals(JMSDEFAULT)) { + context = cf.createContext(); + } else { + context = cf.createContext(username, password); + } + } else { + throw new Exception("Failed to create new JMSContext"); + } + return context; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java new file mode 100644 index 0000000000..0c3f65a4ea --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/JmsUtil.java @@ -0,0 +1,247 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.jms.common; + +import java.util.Enumeration; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.TextMessage; + +/** + * JmsUtil is a final tool class that will provide support for common code for jms tests. + * + * @author Irene Caruso + * + */ +public final class JmsUtil { + public static boolean test1SecondTime = false; + + public static boolean test2SecondTime = false; + + public static boolean test2Results = false; + + public static boolean test7SecondTime = false; + + // used by initHarnessProps() to cache last value + private static String cHost = null; + + private static String cTrace = null; + + private static String cPort = null; + + // used by addPropsToMessage() to cache last value + private static String hHost = null; + + private static String hTrace = null; + + private static String hPort = null; + + /** + * used by jms tests to pass cts properties object to mdb to initialize cts logging mechanism + * + * @param p the Properties object + * @param msg the JMS Message object + * + */ + + public static void addPropsToMessage(Message msg, java.util.Properties p) { + String hostname = null; + String traceFlag = null; + String logPort = null; + Enumeration e = null; + String key = null; + String notValid = "."; + + try { + + // get the properties that have "." in them + // can't put "." in JMS message, rename them. + + // cache last value for these props - + // sometimes they are null when passed + // ??Harness issue?? + + hostname = TestUtil.getProperty(p, "harness.host"); + TestUtil.logTrace("Hostname " + hostname); + if (hostname == null) { + if (hHost != null) + msg.setStringProperty("harnesshost", hHost); + else { + TestUtil.logTrace("addPropsToMsg: Hostname is null"); + throw new Exception("Error getting hostname"); + } + } else { + msg.setStringProperty("harnesshost", hostname); + hHost = hostname; + } + + traceFlag = TestUtil.getProperty(p, "harness.log.traceflag"); + TestUtil.logTrace("testFlag " + traceFlag); + if (traceFlag == null) { + if (hTrace != null) + msg.setStringProperty("harnesslogtraceflag", hTrace); + else { + TestUtil.logTrace("addProps:traceflag is null"); + throw new Exception("Error getting traceflag"); + } + } else { + msg.setStringProperty("harnesslogtraceflag", traceFlag); + hTrace = traceFlag; + } + + logPort = TestUtil.getProperty(p, "harness.log.port"); + TestUtil.logTrace("logPort " + logPort); + if (logPort == null) { + if (hPort != null) + msg.setStringProperty("harnesslogport", hPort); + else { + TestUtil.logTrace("addProps: logport is null"); + throw new Exception("Error getting port"); + } + } else { + msg.setStringProperty("harnesslogport", logPort); + hPort = logPort; + } + + // get the rest of the props to put in JMS message. + // Sql queries are currently passed as props, may need + // them in the message for testing w/ DB's + + e = p.propertyNames(); + key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + TestUtil.logTrace("addProps: " + key); + if ((key.indexOf(notValid) == -1) && (key.indexOf("***") == -1) && !(key.startsWith("JMS"))) { + TestUtil.logTrace("addProps: add property " + key); + msg.setStringProperty(key, TestUtil.getProperty(p, key)); + } + } + } catch (Exception ex) { + TestUtil.printStackTrace(ex); + TestUtil.logMsg("Error setting harness Properties in jms msg"); + } + } + + /** + * used by MDB onMessage() to extract cts properties from JMS Message to initialize cts logging mechanism + * + * @param p the Properties object + * @param msg the JMS Message object + * + */ + public static void initHarnessProps(Message msg, java.util.Properties p) { + + String hostname = null; + String traceflag = null; + String logport = null; + + try { + hostname = msg.getStringProperty("harnesshost"); + TestUtil.logTrace("initHarn: Hostname " + hostname); + if (hostname == null) { + TestUtil.logTrace("intiHarn:Hostname is null"); + if (cHost != null) + p.put("harness.host", cHost); + else + throw new Exception("Error getting hostname"); + } else { + p.put("harness.host", hostname); + cHost = hostname; + } + + traceflag = msg.getStringProperty("harnesslogtraceflag"); + TestUtil.logTrace("initHarn:traceflag " + traceflag); + if (traceflag == null) { + TestUtil.logTrace("initHarn: is null"); + if (cTrace != null) + p.put("harness.log.traceflag", cTrace); + else + throw new Exception("Error getting traceflag"); + } else { + p.put("harness.log.traceflag", traceflag); + cTrace = traceflag; + } + + logport = msg.getStringProperty("harnesslogport"); + TestUtil.logTrace("initHarn:logport " + logport); + if (logport == null) { + TestUtil.logTrace("initHarn:logport is null"); + if (cPort != null) + p.put("harness.log.port", cPort); + else + throw new Exception("Error getting port"); + } else { + p.put("harness.log.port", logport); + cPort = logport; + } + + // now pull out the rest of the properties from the message + Enumeration e = msg.getPropertyNames(); + String key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + if (!key.startsWith("JMS")) + p.put(key, msg.getStringProperty(key)); + } + + // now initialize the props + TestUtil.init(p); + + } catch (Exception e) { + TestUtil.printStackTrace(e); + } + } + + public static void sendTestResults(String testCase, boolean results, QueueSession qSession, jakarta.jms.Queue queueR) { + TextMessage msg = null; + QueueSender mSender = null; + + TestUtil.logTrace("*@$#)@(@#$ --- - - sendTestResults "); + + try { + // create a msg sender for the response queue + mSender = qSession.createSender(queueR); + // and we'll send a text msg + msg = qSession.createTextMessage(); + msg.setStringProperty("TestCase", testCase); + msg.setText(testCase); + if (results) + msg.setStringProperty("Status", "Pass"); + else + msg.setStringProperty("Status", "Fail"); + TestUtil.logTrace("*@$#)@(@$#@($----Sending response message "); + TestUtil.logTrace("*@$#)@(@ ----- status: " + msg.getStringProperty("Status")); + TestUtil.logTrace("*@$#)@(@# -----test: " + msg.getStringProperty("TestCase")); + mSender.send(msg); + + } catch (JMSException je) { + TestUtil.printStackTrace(je); + } catch (Exception ee) { + TestUtil.printStackTrace(ee); + } + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java new file mode 100644 index 0000000000..97d391ab4a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/MapMessageTestImpl.java @@ -0,0 +1,614 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)MapMessageTestImpl.java 1.5 03/05/16 + */ + +package com.sun.ts.tests.jms.common; + +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Vector; + +import jakarta.jms.JMSException; +import jakarta.jms.MapMessage; +import jakarta.jms.MessageFormatException; +import jakarta.jms.MessageNotWriteableException; + +/** + * Class Declaration. + * + * + * @see + * + * @author + * @version 1.2, 09/26/00 + */ +public class MapMessageTestImpl extends MessageTestImpl implements MapMessage { + private HashMap htable; + + /** + * Class Constructor. + * + * + * @see + */ + public MapMessageTestImpl() { + super(); + init(); + } // MapMessageTestImpl() + + /** + * Initializes the object during construction. Put things that are common to all constructors here + */ + private void init() { + htable = new HashMap(); + } + + /** + * Return the boolean value with the given name. + * + * @param name the name of the boolean + * + * @return the boolean value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public boolean getBoolean(String name) throws JMSException { + boolean ret = false; + Object value = htable.get(name); + + if (value instanceof Boolean) { + ret = ((Boolean) value).booleanValue(); + } else if (value instanceof String) { + ret = Boolean.valueOf((String) value).booleanValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getBoolean() + + /** + * Return the byte value with the given name. + * + * @param name the name of the byte + * + * @return the byte value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public byte getByte(String name) throws JMSException { + byte ret = 0; + Object value = htable.get(name); + + if (value instanceof Byte) { + ret = ((Byte) value).byteValue(); + } else if (value instanceof String) { + ret = Byte.valueOf((String) value).byteValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getByte() + + /** + * Return the short value with the given name. + * + * @param name the name of the short + * + * @return the short value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public short getShort(String name) throws JMSException { + short ret = 0; + Object value = htable.get(name); + + if (value instanceof Byte) { + ret = ((Byte) value).byteValue(); + } else if (value instanceof Short) { + ret = ((Short) value).shortValue(); + } else if (value instanceof String) { + ret = Short.valueOf((String) value).shortValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getShort() + + /** + * Return the Unicode character value with the given name. + * + * @param name the name of the Unicode character + * + * @return the Unicode character value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public char getChar(String name) throws JMSException { + char ret = 0; + Object value = htable.get(name); + + if (value instanceof Character) { + ret = ((Character) value).charValue(); + } else if (value instanceof String) { + ret = ((String) value).charAt(0); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getChar() + + /** + * Return the integer value with the given name. + * + * @param name the name of the integer + * + * @return the integer value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public int getInt(String name) throws JMSException { + int ret = 0; + Object value = htable.get(name); + + if (value instanceof Byte) { + ret = ((Byte) value).byteValue(); + } else if (value instanceof Short) { + ret = ((Short) value).shortValue(); + } else if (value instanceof Integer) { + ret = ((Integer) value).intValue(); + } else if (value instanceof String) { + ret = Integer.valueOf((String) value).intValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getInt() + + /** + * Return the long value with the given name. + * + * @param name the name of the long + * + * @return the long value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public long getLong(String name) throws JMSException { + long ret = 0; + Object value = htable.get(name); + + if (value instanceof Byte) { + ret = ((Byte) value).byteValue(); + } else if (value instanceof Short) { + ret = ((Short) value).shortValue(); + } else if (value instanceof Integer) { + ret = ((Integer) value).intValue(); + } else if (value instanceof Long) { + ret = ((Long) value).longValue(); + } else if (value instanceof String) { + ret = Long.valueOf((String) value).longValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getLong() + + /** + * Return the float value with the given name. + * + * @param name the name of the float + * + * @return the float value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public float getFloat(String name) throws JMSException { + float ret = 0; + Object value = htable.get(name); + + if (value instanceof Float) { + ret = ((Float) value).floatValue(); + } else if (value instanceof String) { + ret = Float.valueOf((String) value).floatValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getFloat() + + /** + * Return the double value with the given name. + * + * @param name the name of the double + * + * @return the double value with the given name. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public double getDouble(String name) throws JMSException { + double ret = 0; + Object value = htable.get(name); + + if (value instanceof Float) { + ret = ((Float) value).floatValue(); + } else if (value instanceof Double) { + ret = ((Double) value).doubleValue(); + } else if (value instanceof String) { + ret = Double.valueOf((String) value).doubleValue(); + } else { + throw new MessageFormatException("type conversion is invalid"); + } // if .. else + return ret; + } // getDouble() + + /** + * Return the String value with the given name. + * + * @param name the name of the String + * + * @return the String value with the given name. If there is no item by this name, a null value is returned. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public String getString(String name) throws JMSException { + String ret = null; + Object value = htable.get(name); + + if ((value instanceof Boolean) || (value instanceof Byte) || (value instanceof Short) || (value instanceof Character) + || (value instanceof Integer) || (value instanceof Long) || (value instanceof Float) || (value instanceof Double) + || (value instanceof String)) { + ret = String.valueOf(value); + } else { + throw new MessageFormatException("invalid type"); + } // if .. else + return ret; + } // getString() + + /** + * Return the byte array value with the given name. + * + * @param name the name of the byte array + * + * @return the byte array value with the given name. If there is no item by this name, a null value is returned. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public byte[] getBytes(String name) throws JMSException { + byte[] ret = null; + Object value = htable.get(name); + + if (value instanceof byte[]) { + ret = (byte[]) value; + } else { + throw new MessageFormatException("invalid type"); + } // if .. else + return ret; + } // getBytes() + + /** + * Return the Java object value with the given name. + * + *

+ * Note that this method can be used to return in objectified format, an object that had been stored in the Map with the + * equivalent setObject method call, or it's equivalent primitive set method. + * + * @param name the name of the Java object + * + * @return the Java object value with the given name, in objectified format (ie. if it set as an int, then a Integer is + * returned). If there is no item by this name, a null value is returned. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public Object getObject(String name) throws JMSException { + return htable.get(name); + } // getObject() + + /** + * Return an Enumeration of all the Map message's names. + * + * @return an enumeration of all the names in this Map message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + */ + public Enumeration getMapNames() throws JMSException { + Vector v = new Vector(htable.keySet()); + + return v.elements(); + } // getMapNames() + + /** + * Set a boolean value with the given name, into the Map. + * + * @param name the name of the boolean + * @param value the boolean value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setBoolean(String name, boolean value) throws JMSException { + try { + htable.put(name, Boolean.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setBoolean() + + /** + * Set a byte value with the given name, into the Map. + * + * @param name the name of the byte + * @param value the byte value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setByte(String name, byte value) throws JMSException { + try { + htable.put(name, Byte.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setByte() + + /** + * Set a short value with the given name, into the Map. + * + * @param name the name of the short + * @param value the short value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setShort(String name, short value) throws JMSException { + try { + htable.put(name, Short.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setShort() + + /** + * Set a Unicode character value with the given name, into the Map. + * + * @param name the name of the Unicode character + * @param value the Unicode character value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setChar(String name, char value) throws JMSException { + try { + htable.put(name, Character.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setChar() + + /** + * Set an integer value with the given name, into the Map. + * + * @param name the name of the integer + * @param value the integer value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setInt(String name, int value) throws JMSException { + try { + htable.put(name, Integer.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setInt() + + /** + * Set a long value with the given name, into the Map. + * + * @param name the name of the long + * @param value the long value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setLong(String name, long value) throws JMSException { + try { + htable.put(name, Long.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setLong() + + /** + * Set a float value with the given name, into the Map. + * + * @param name the name of the float + * @param value the float value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setFloat(String name, float value) throws JMSException { + try { + htable.put(name, Float.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setFloat() + + /** + * Set a double value with the given name, into the Map. + * + * @param name the name of the double + * @param value the double value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setDouble(String name, double value) throws JMSException { + try { + htable.put(name, Double.valueOf(value)); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setDouble() + + /** + * Set a String value with the given name, into the Map. + * + * @param name the name of the String + * @param value the String value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setString(String name, String value) throws JMSException { + try { + htable.put(name, value); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setString() + + /** + * Set a byte array value with the given name, into the Map. + * + * @param name the name of the byte array + * @param value the byte array value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setBytes(String name, byte[] value) throws JMSException { + try { + htable.put(name, value); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setBytes() + + /** + * Set a portion of the byte array value with the given name, into the Map. + * + * @param name the name of the byte array + * @param value the byte array value to set in the Map. + * @param offset the initial offset within the byte array. + * @param length the number of bytes to use. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setBytes(String name, byte[] value, int offset, int length) throws JMSException { + try { + byte[] newValue = (byte[]) htable.get(name); + + System.arraycopy(value, 0, newValue, offset, length); + htable.put(name, newValue); + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setBytes() + + /** + * Set a Java object value with the given name, into the Map. + * + *

+ * Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and + * byte arrays. + * + * @param name the name of the Java object + * @param value the Java object value to set in the Map. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageFormatException if object is invalid + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void setObject(String name, Object value) throws JMSException { + try { + if ((value instanceof Boolean) || (value instanceof Byte) || (value instanceof Short) || (value instanceof Character) + || (value instanceof Integer) || (value instanceof Long) || (value instanceof Float) || (value instanceof Double) + || (value instanceof String) || (value instanceof byte[])) { + htable.put(name, value); + } else { + throw new MessageFormatException("invalid type"); + } // if .. else + } catch (NullPointerException e) { + JMSException jmsEx = new JMSException("NullPointerException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // setObject() + + /** + * Check if an item exists in this MapMessage. + * + * @param name the name of the item to test + * + * @return true if the item does exist. + * + * @exception JMSException if a JMS error occurs. + */ + public boolean itemExists(String name) throws JMSException { + return htable.containsKey(name); + } // itemExists() + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java new file mode 100644 index 0000000000..1d5bfa7d0f --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/MessageTestImpl.java @@ -0,0 +1,830 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.jms.common; + +import java.util.Enumeration; +import java.util.Hashtable; + +import jakarta.jms.Destination; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageFormatException; +import jakarta.jms.MessageNotReadableException; + +/** + * Class Declaration. + * + * + * @see + * + * @author + * @version 1.2, 09/26/00 + */ +public class MessageTestImpl implements Message { + public boolean dummy = false; + + private String JMSMessageID; + + private long JMSTimestamp; + + private byte[] JMSCorrelationIDAsBytes; + + private String JMSCorrelationID; + + private Destination JMSReplyTo; + + private Destination JMSDestination; + + private int JMSDeliveryMode; + + private boolean JMSRedelivered; + + private String JMSType; + + private long JMSExpiration; + + private long JMSDeliveryTime; + + private long JMSDeliveryDelay; + + private int JMSPriority; + + private Hashtable properties; + + protected boolean bufferIsDirty = false; + + protected boolean readMode = false; + + /** + * Constructor + */ + public MessageTestImpl() { + properties = new Hashtable(); + this.JMSPriority = jakarta.jms.Message.DEFAULT_PRIORITY; + this.JMSDeliveryMode = jakarta.jms.Message.DEFAULT_DELIVERY_MODE; + this.JMSDeliveryDelay = 0L; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public String getJMSMessageID() throws JMSException { + return JMSMessageID; + } + + /** + * Method Declaration. + * + * + * @param id + * + * @exception JMSException + * + * @see + */ + public void setJMSMessageID(String id) throws JMSException { + JMSMessageID = id; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public long getJMSTimestamp() throws JMSException { + return JMSTimestamp; + } + + /** + * Method Declaration. + * + * + * @param timestamp + * + * @exception JMSException + * + * @see + */ + public void setJMSTimestamp(long timestamp) throws JMSException { + JMSTimestamp = timestamp; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public byte[] getJMSCorrelationIDAsBytes() throws JMSException { + return JMSCorrelationIDAsBytes; + } + + /** + * Method Declaration. + * + * + * @param correlationID + * + * @exception JMSException + * + * @see + */ + public void setJMSCorrelationIDAsBytes(byte[] correlationID) throws JMSException { + JMSCorrelationIDAsBytes = correlationID; + } + + /** + * Method Declaration. + * + * + * @param correlationID + * + * @exception JMSException + * + * @see + */ + public void setJMSCorrelationID(String correlationID) throws JMSException { + JMSCorrelationID = correlationID; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public String getJMSCorrelationID() throws JMSException { + return JMSCorrelationID; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public Destination getJMSReplyTo() throws JMSException { + return JMSReplyTo; + } + + /** + * Method Declaration. + * + * + * @param replyTo + * + * @exception JMSException + * + * @see + */ + public void setJMSReplyTo(Destination replyTo) throws JMSException { + JMSReplyTo = replyTo; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public Destination getJMSDestination() throws JMSException { + return JMSDestination; + } + + /** + * Method Declaration. + * + * + * @param destination + * + * @exception JMSException + * + * @see + */ + public void setJMSDestination(Destination destination) throws JMSException { + JMSDestination = destination; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public int getJMSDeliveryMode() throws JMSException { + return JMSDeliveryMode; + } + + /** + * Method Declaration. + * + * + * @param deliveryTime + * + * @exception JMSException + * + * @see + */ + public void setJMSDeliveryTime(long deliveryTime) throws JMSException { + JMSDeliveryTime = deliveryTime; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public long getJMSDeliveryTime() throws JMSException { + return JMSDeliveryTime; + } + + /** + * Method Declaration. + * + * + * @param deliveryMode + * + * @exception JMSException + * + * @see + */ + public void setJMSDeliveryMode(int deliveryMode) throws JMSException { + JMSDeliveryMode = deliveryMode; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public boolean getJMSRedelivered() throws JMSException { + return JMSRedelivered; + } + + /** + * Method Declaration. + * + * + * @param redelivered + * + * @exception JMSException + * + * @see + */ + public void setJMSRedelivered(boolean redelivered) throws JMSException { + JMSRedelivered = redelivered; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public String getJMSType() throws JMSException { + return JMSType; + } + + /** + * Method Declaration. + * + * + * @param type + * + * @exception JMSException + * + * @see + */ + public void setJMSType(String type) throws JMSException { + JMSType = type; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public long getJMSExpiration() throws JMSException { + return JMSExpiration; + } + + /** + * Method Declaration. + * + * + * @param expiration + * + * @exception JMSException + * + * @see + */ + public void setJMSExpiration(long expiration) throws JMSException { + JMSExpiration = expiration; + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public int getJMSPriority() throws JMSException { + return JMSPriority; + } + + /** + * Method Declaration. + * + * + * @param priority + * + * @exception JMSException + * + * @see + */ + public void setJMSPriority(int priority) throws JMSException { + JMSPriority = priority; + } + + /** + * Method Declaration. + * + * + * @exception JMSException + * + * @see + */ + public void clearProperties() throws JMSException { + properties.clear(); + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public boolean propertyExists(String name) throws JMSException { + return properties.containsKey(name); + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public boolean getBooleanProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Boolean) properties.get(name)).booleanValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public byte getByteProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Byte) properties.get(name)).byteValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public short getShortProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Short) properties.get(name)).shortValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public int getIntProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Integer) properties.get(name)).intValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public long getLongProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Long) properties.get(name)).longValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public float getFloatProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Float) properties.get(name)).floatValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public double getDoubleProperty(String name) throws JMSException { + if (propertyExists(name)) { + return ((Double) properties.get(name)).doubleValue(); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public String getStringProperty(String name) throws JMSException { + if (propertyExists(name)) { + return (String) properties.get(name); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @param name + * + * @return + * + * @exception JMSException + * + * @see + */ + public Object getObjectProperty(String name) throws JMSException { + if (propertyExists(name)) { + return properties.get(name); + } else { + throw new JMSException("property does not exist: " + name); + } + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public Enumeration getPropertyNames() throws JMSException { + return properties.keys(); + + // Vector v = new Vector(); + // return v.elements(); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setBooleanProperty(String name, boolean value) throws JMSException { + properties.put(name, Boolean.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setByteProperty(String name, byte value) throws JMSException { + properties.put(name, Byte.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setShortProperty(String name, short value) throws JMSException { + properties.put(name, Short.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setIntProperty(String name, int value) throws JMSException { + properties.put(name, Integer.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setLongProperty(String name, long value) throws JMSException { + properties.put(name, Long.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setFloatProperty(String name, float value) throws JMSException { + properties.put(name, Float.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setDoubleProperty(String name, double value) throws JMSException { + properties.put(name, Double.valueOf(value)); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setStringProperty(String name, String value) throws JMSException { + properties.put(name, value); + } + + /** + * Method Declaration. + * + * + * @param name + * @param value + * + * @exception JMSException + * + * @see + */ + public void setObjectProperty(String name, Object value) throws JMSException { + properties.put(name, value); + } + + /** + * Dummy method for acknowledge + */ + public void acknowledge() throws JMSException { + } + + /** + * Dummy method for clear + */ + public void clearBody() throws JMSException { + } + + protected void setBufferIsDirty(boolean state) { + bufferIsDirty = state; + } + + protected void checkReadAccess() throws JMSException { + if (!readMode) { + throw new MessageNotReadableException("Message is not Readable"); + } + } + + /** + * Returns the message body as an object of the specified type. + * + * @param c - The type to which the message body will be assigned. + * + * @return the message body + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageFormatException if this type conversion is invalid. + */ + public T getBody(Class c) throws JMSException { + return (T) c; + } + + /** + * Returns whether the message body is capable of being assigned to the specified type. + * + * @param c - The specified type. + * + * @return whether the message body is capable of being assigned to the specified type + * + * @exception JMSException if a JMS error occurs. + */ + public boolean isBodyAssignableTo(Class c) throws JMSException { + return true; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java similarity index 57% rename from common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java index 86c04842be..3fec6808df 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/ObjectMessageTestImpl.java @@ -34,46 +34,45 @@ * @author * @version 1.2, 09/26/00 */ -public class ObjectMessageTestImpl extends MessageTestImpl - implements ObjectMessage { - private Serializable object; +public class ObjectMessageTestImpl extends MessageTestImpl implements ObjectMessage { + private Serializable object; - /** - * Class Constructor. - * - * - * @see - */ - public ObjectMessageTestImpl() { - super(); - } + /** + * Class Constructor. + * + * + * @see + */ + public ObjectMessageTestImpl() { + super(); + } - /** - * Method Declaration. - * - * - * @param object - * - * @exception JMSException - * - * @see - */ - public void setObject(Serializable object) throws JMSException { - this.object = object; - } + /** + * Method Declaration. + * + * + * @param object + * + * @exception JMSException + * + * @see + */ + public void setObject(Serializable object) throws JMSException { + this.object = object; + } - /** - * Method Declaration. - * - * - * @return - * - * @exception JMSException - * - * @see - */ - public Serializable getObject() throws JMSException { - return object; - } + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + public Serializable getObject() throws JMSException { + return object; + } } diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java new file mode 100644 index 0000000000..7a8cb40acb --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/SerialTestMessageListenerImpl.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)SerialTestMessageListenerImpl.java 1.10 03/05/16 + */ +package com.sun.ts.tests.jms.common; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.Message; + +public class SerialTestMessageListenerImpl implements jakarta.jms.MessageListener { + public boolean inUse = false; + + public boolean testFailed = false; + + public DoneLatch monitor = new DoneLatch(); + + public void onMessage(Message m) { + + // first check for concurrent usage + if (inUse == true) { + TestUtil.logMsg("Error -- concurrent use of MessageListener"); + testFailed = true; + } + + // set flag, then check for final message + inUse = true; + TestUtil.logMsg("*MessageListener: onMessage() called. " + "Forcing other message listeners to wait."); + try { + if (m.getBooleanProperty("COM_SUN_JMS_TEST_LASTMESSAGE") == true) { + TestUtil.logMsg("*MessageListener: Received final message"); + monitor.allDone(); + } else { + + // wait to force next onMessage() to wait + for (int i = 0; i < 10000; i++) { + } + } + } catch (Exception e) { + TestUtil.printStackTrace(e); + TestUtil.logErr("Failure in message listener: " + e.getMessage()); + testFailed = true; + } + + // unset flag + inUse = false; + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java new file mode 100644 index 0000000000..27dcd6d56d --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/SessionThread.java @@ -0,0 +1,341 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.tests.jms.common; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.Destination; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageProducer; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicSession; + +/** + * Class Declaration. + * + * + * @see + * + * @author + * @version 1.16, 09/27/00 + */ +public class SessionThread extends Thread { + private QueueConnection qConnection = null; + + private QueueSession qSession = null; + + private TopicConnection tConnection = null; + + private TopicSession tSession = null; + + // currently, only 1 producer and 1 consumer + MessageConsumer consumer = null; + + MessageProducer producer = null; + + private boolean replyToMessages = false; // reply when receiving? + + private boolean stayAlive = false; // receive indefinitely + + private int messagesReceivedCount = 0; // total messages received + + boolean stdebug = false; // debug output + + /** + * Default constructor creates Session Thread with connections specified. + * + * @param QueueConnection for creating QueueSessions + * @param TopicConnection for creating TopicSessions + */ + public SessionThread(QueueConnection qC, TopicConnection tC) throws JMSException { + + if (qC != null && tC != null) { + throw new JMSException("Both QueueConnection and TopicConnection are assigned, this is an error, it must be one or the other"); + } + if (qC == null && tC == null) { + throw new JMSException("Both QueueConnection and TopicConnection are null, this is an error, it must be one or the other"); + } + if (qC != null) { + this.qConnection = qC; + setQueueSession(false, Session.AUTO_ACKNOWLEDGE); + } else { + this.tConnection = tC; + setTopicSession(false, Session.AUTO_ACKNOWLEDGE); + } + } + + /** + * Method for specifying the QueueSession attributes. + * + * @param boolean transacted + * @param int acknowledgement mode + */ + public void setQueueSession(boolean transacted, int mode) throws JMSException { + if (qConnection != null) { + qSession = qConnection.createQueueSession(transacted, mode); + } + } + + /** + * Method for specifying the TopicSession attributes.. + * + * @param boolean transacted + * @param int acknowledgement mode + */ + public void setTopicSession(boolean transacted, int mode) throws JMSException { + if (tConnection != null) { + tSession = tConnection.createTopicSession(transacted, mode); + } + } + + /** + * Return the current QueueSession + * + * @return QueueSession the current QueueSession for this client + */ + public QueueSession getQueueSession() { + return qSession; + } + + /** + * Return the current TopicSession + * + * @return TopicSession the current TopicSession for this client + */ + public TopicSession getTopicSession() { + return tSession; + } + + /** + * Used to start the Queue and Topic Connections when they are not the default Connections. May also be used in place of + * someConnection.start() within the main testing method. + */ + public void startConnection() throws JMSException { + if (qConnection != null) { + if (stdebug) { + TestUtil.logMsg("*ST: starting QueueConnection"); + } + qConnection.start(); + } + if (tConnection != null) { + if (stdebug) { + TestUtil.logMsg("*ST: starting TopicConnection"); + } + tConnection.start(); + } + } + + /** + * Used to start only the specified Connection. Useful when it is not the default Connection. + */ + public void startQueueConnection() throws Exception { + if (stdebug) { + TestUtil.logMsg("*ST: starting specified connection -- Queue"); + } + qConnection.start(); + } + + /** + * Used to start only the specified Connection. Useful when it is not the default Connection. + */ + public void startTopicConnection() throws Exception { + if (stdebug) { + TestUtil.logMsg("*ST: starting specified connection -- Topic"); + } + tConnection.start(); + } + + /** + * Create message producers + * + * @param Destination Queue or Topic + */ + public void createProducer(Destination dest) throws Exception { + if (qSession != null) { + if (stdebug) { + TestUtil.logMsg("*ST: creating QueueSender"); + } + producer = qSession.createSender((Queue) dest); + } else if (tSession != null) { + if (stdebug) { + TestUtil.logMsg("*ST: creating TopicPublisher"); + } + producer = tSession.createPublisher((Topic) dest); + } else { + throw new Exception("Neither Queue or Topic were set"); + } + TestUtil.logMsg("producer=" + producer); + } + + /** + * Create message consumers + * + * @param Destination Queue or Topic + */ + public void createConsumer(Destination dest) throws Exception { + if (qSession != null) { + if (stdebug) { + TestUtil.logMsg("*ST: creating QueueReceiver"); + } + consumer = qSession.createReceiver((Queue) dest); + } else if (tSession != null) { + if (stdebug) { + TestUtil.logMsg("*ST: creating TopicSubscriber"); + } + consumer = tSession.createSubscriber((Topic) dest); + } else { + throw new Exception("Neither Queue or Topic were configured"); + } + TestUtil.logMsg("consumer=" + consumer); + } + + /** + * Set to true to have SessionThread reply automatically to messages. + * + * @param boolean true for automatic request/reply + */ + public void setReplyToMessages(boolean boo) { + replyToMessages = boo; + if (stdebug) { + TestUtil.logMsg("*ST: will reply to messages -- " + replyToMessages); + } + } + + /** + * Set to true to have SessionThread keep receiving messages indefinitely. + * + * @param boolean true for indefinite receive() + */ + public void setStayAlive(boolean boo) { + stayAlive = boo; + if (stdebug) { + TestUtil.logMsg("*ST: will keep receiving after 1st message -- " + stayAlive); + } + } + + /** + * Get the number of messages that have been received by this thread. + * + * @return int number of messages received + */ + public int getMessagesReceivedCount() { + return messagesReceivedCount; + } + + /** + * Reset the number of messages that have been received by this thread. Useful once "steady-state" has been reached. + */ + public void resetMessagesReceivedCount() { + messagesReceivedCount = 0; + if (stdebug) { + TestUtil.logMsg("*ST: message count is now " + messagesReceivedCount); + } + } + + /** + * Receive messages + */ + private void receiveMessages() throws Exception { + if (consumer == null) { + throw new Exception("No message consumer ready"); + } else { + if (replyToMessages) { + do { + + // get Message + TestUtil.logMsg("*ST: waiting to receive (reply mode)"); + Message msg = consumer.receive(); + + if (msg == null) { // just being safe + throw new Exception("Cannot respond to null message!"); + } + messagesReceivedCount++; + TestUtil.logMsg("*ST: received message -- creating reply"); + + // get return Destination + Destination dest = msg.getJMSReplyTo(); + + if (stdebug) { + TestUtil.logMsg("*ST: replying to " + dest); + } + + // create Producer and reply with new Message + if (qSession != null) { + TestUtil.logMsg("Replying to TemporaryQueue"); + qSession.createSender((Queue) dest).send(qSession.createMessage()); + } else if (tSession != null) { + TestUtil.logMsg("Replying to TemporaryTopic"); + tSession.createPublisher((Topic) dest).publish(tSession.createMessage()); + } else { + + // this would be a strange case indeed + throw new Exception("Neither Queue or Topic were configured"); + } + if (stdebug) { + TestUtil.logMsg("*ST: keep receiving -- " + stayAlive); + } + } while (stayAlive); + } else { // non reply mode + do { + TestUtil.logMsg("*ST: waiting to receive. Will continue after receiving: " + stayAlive); + Message msg = consumer.receive(); + + if (msg == null) { // safety first + throw new Exception("Received null message"); + } + messagesReceivedCount++; + if (stdebug) { + TestUtil.logMsg("*ST: messages received: " + messagesReceivedCount); + } + TestUtil.logMsg("*ST: received " + msg.toString()); + } while (stayAlive); + } + } + } // receiveMessages() + + /** + * Stop it + */ + public void stopWaiting() throws JMSException { + TestUtil.logMsg("Attempting to stop MessageConsumer(s)"); + consumer.close(); + } + + /** + * Run method + */ + public void run() { + TestUtil.logMsg("*ST: thread running"); + try { + receiveMessages(); + } catch (Exception e) { + TestUtil.logMsg("Session thread: could not receive message"); + TestUtil.logMsg("Reason being: " + e.getMessage()); + } + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java new file mode 100644 index 0000000000..5c4416a211 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/StreamMessageTestImpl.java @@ -0,0 +1,1036 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.jms.common; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.ObjectOutputStream; +import java.io.ObjectStreamField; + +import jakarta.jms.JMSException; +import jakarta.jms.MessageEOFException; +import jakarta.jms.MessageFormatException; +import jakarta.jms.MessageNotReadableException; +import jakarta.jms.MessageNotWriteableException; +import jakarta.jms.StreamMessage; + +/** + * Class Declaration. + * + * + * @see + * + * @author + * @version 1.2, 09/26/00 + */ +public class StreamMessageTestImpl extends MessageTestImpl implements StreamMessage { + static final private ObjectStreamField[] serialPersistentFields = { new ObjectStreamField("buf", byte[].class) }; + + // every write method will first write the type byte, + // and then the data with that type. + public static final byte BOOLEAN_TYPE = 1; + + public static final byte BYTE_TYPE = 2; + + public static final byte CHAR_TYPE = 3; + + public static final byte DOUBLE_TYPE = 4; + + public static final byte FLOAT_TYPE = 5; + + public static final byte INT_TYPE = 6; + + public static final byte LONG_TYPE = 7; + + public static final byte SHORT_TYPE = 8; + + public static final byte STRING_TYPE = 9; + + public static final byte BYTES_TYPE = 10; + + byte[] buf = new byte[0]; + + transient ByteArrayInputStream bais; + + transient ByteArrayOutputStream baos; + + transient DataInputStream dis; + + transient DataOutputStream dos; + + // for read/writeBytes + private boolean first_time_readBytes = true; + + private int available_bytes = 0; + + /** + * Class Constructor. + * + * + * @see + */ + public StreamMessageTestImpl() { + super(); + init(); + } // StreamMessageTestImpl() + + /** + * Method Declaration. + * + * + * @see + */ + private void init() { + baos = new ByteArrayOutputStream(); + dos = new DataOutputStream(baos); + } + + /** + * Method Declaration. + * + * + * @param oos + * + * @exception IOException + * + * @see + */ + private void writeObject(ObjectOutputStream oos) throws IOException { + dos.flush(); + buf = baos.toByteArray(); + oos.defaultWriteObject(); + } + + /** + * Method Declaration. + * + * + * @param ois + * + * @exception ClassNotFoundException + * @exception IOException + * + * @see + */ + private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { + ois.defaultReadObject(); + baos = new ByteArrayOutputStream(); + dos = new DataOutputStream(baos); + if (buf != null) { + dos.write(buf); + buf = null; + } + } + + /** + * Method Declaration. + * + * + * @return + * + * @exception JMSException + * + * @see + */ + private byte getType() throws IOException { + return dis.readByte(); + } // getType() + + /** + * Method Declaration. + * + * + * @return + * + * @exception IOException + * + * @see + */ + private int getBytesLength() throws IOException { + return dis.readInt(); + } // getType() + + /** + * Read a boolean from the stream message. + * + * @return the boolean value read. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public boolean readBoolean() throws JMSException { + boolean ret = false; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BOOLEAN_TYPE: + ret = dis.readBoolean(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Boolean.valueOf(s).booleanValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readBoolean() + + /** + * Read a byte value from the stream message. + * + * @return the next byte from the stream message as a 8-bit byte. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public byte readByte() throws JMSException { + byte ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BYTE_TYPE: + ret = dis.readByte(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Byte.valueOf(s).byteValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readByte() + + /** + * Read a 16-bit number from the stream message. + * + * @return a 16-bit number from the stream message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public short readShort() throws JMSException { + short ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BYTE_TYPE: + ret = dis.readByte(); + break; + case SHORT_TYPE: + ret = dis.readShort(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Short.valueOf(s).shortValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readShort() + + /** + * Read a Unicode character value from the stream message. + * + * @return a Unicode character from the stream message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public char readChar() throws JMSException { + char ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case CHAR_TYPE: + ret = dis.readChar(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = s.charAt(0); // ??? + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readChar() + + /** + * Read a 32-bit integer from the stream message. + * + * @return a 32-bit integer value from the stream message, interpreted as a int. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public int readInt() throws JMSException { + int ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BYTE_TYPE: + ret = dis.readByte(); + break; + case SHORT_TYPE: + ret = dis.readShort(); + break; + case INT_TYPE: + ret = dis.readInt(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Integer.valueOf(s).intValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readInt() + + /** + * Read a 64-bit integer from the stream message. + * + * @return a 64-bit integer value from the stream message, interpreted as a long. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public long readLong() throws JMSException { + long ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BYTE_TYPE: + ret = dis.readByte(); + break; + case SHORT_TYPE: + ret = dis.readShort(); + break; + case INT_TYPE: + ret = dis.readInt(); + break; + case LONG_TYPE: + ret = dis.readLong(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Long.valueOf(s).longValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readLong() + + /** + * Read a float from the stream message. + * + * @return a float value from the stream message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public float readFloat() throws JMSException { + float ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case FLOAT_TYPE: + ret = dis.readFloat(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Float.valueOf(s).floatValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readFloat() + + /** + * Read a double from the stream message. + * + * @return a double value from the stream message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public double readDouble() throws JMSException { + double ret = 0; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case FLOAT_TYPE: + ret = dis.readFloat(); + break; + case DOUBLE_TYPE: + ret = dis.readDouble(); + break; + case STRING_TYPE: + String s = dis.readUTF(); + + ret = Double.valueOf(s).doubleValue(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readDouble() + + /** + * Read in a string from the stream message. + * + * @return a Unicode string from the stream message. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public String readString() throws JMSException { + String ret = null; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BOOLEAN_TYPE: + ret = String.valueOf(dis.readBoolean()); + break; + case BYTE_TYPE: + ret = String.valueOf(dis.readByte()); + break; + case SHORT_TYPE: + ret = String.valueOf(dis.readShort()); + break; + case CHAR_TYPE: + ret = String.valueOf(dis.readChar()); + break; + case INT_TYPE: + ret = String.valueOf(dis.readInt()); + break; + case LONG_TYPE: + ret = String.valueOf(dis.readLong()); + break; + case FLOAT_TYPE: + ret = String.valueOf(dis.readFloat()); + break; + case DOUBLE_TYPE: + ret = String.valueOf(dis.readDouble()); + break; + case STRING_TYPE: + ret = dis.readUTF(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readString() + + /** + * Read a byte array from the stream message. + * + * @param value the buffer into which the data is read. + * + * @return the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream + * has been reached. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageFormatException if this type conversion is invalid + * @exception MessageNotReadableException if message in write-only mode. + */ + public int readBytes(byte[] value) throws JMSException { + int ret = -1; + checkReadAccess(); + + try { + byte type = BYTES_TYPE; + + // get the type and the length of this bytes array field + // if this is the first time read this bytes array field + if (first_time_readBytes) { + type = getType(); + available_bytes = getBytesLength(); + } + switch (type) { + case BYTES_TYPE: + + // bytes array field is empty + if (first_time_readBytes && available_bytes == 0) { + return 0; + } else if (!first_time_readBytes && available_bytes == 0) { + + /* + * this is the case that last time readBytes() read exactly same bytes left in the bytes array field, spec requires an + * extra readBytes(), and return -1 ;-( + */ + return -1; + } + if (value.length > available_bytes) { + + // read all! (available_bytes won't be zero.) + ret = dis.read(value, 0, available_bytes); + available_bytes = 0; + + // initiate first_time_readBytes to true for next field + first_time_readBytes = true; + } else if (value.length <= available_bytes) { + + // read all, but needs readBytes again + ret = dis.read(value, 0, value.length); + available_bytes = available_bytes - value.length; + first_time_readBytes = false; + } + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readBytes() + + /** + * Read a Java object from the stream message. + * + *

+ * Note that this method can be used to return in objectified format, an object that had been written to the Stream with + * the equivalent writeObject method call, or it's equivalent primitive write method. + * + * @return a Java object from the stream message, in objectified format (ie. if it set as an int, then a Integer is + * returned). + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageEOFException if an end of message stream + * @exception MessageNotReadableException if message in write-only mode. + */ + public Object readObject() throws JMSException { + Object ret = null; + checkReadAccess(); + + try { + byte type = getType(); + + switch (type) { + case BOOLEAN_TYPE: + ret = Boolean.valueOf(dis.readBoolean()); + break; + case BYTE_TYPE: + ret = Byte.valueOf(dis.readByte()); + break; + case SHORT_TYPE: + ret = Short.valueOf(dis.readShort()); + break; + case CHAR_TYPE: + ret = Character.valueOf(dis.readChar()); + break; + case INT_TYPE: + ret = Integer.valueOf(dis.readInt()); + break; + case LONG_TYPE: + ret = Long.valueOf(dis.readLong()); + break; + case FLOAT_TYPE: + ret = Float.valueOf(dis.readFloat()); + break; + case DOUBLE_TYPE: + ret = Double.valueOf(dis.readDouble()); + break; + case STRING_TYPE: + ret = dis.readUTF(); + break; + default: + throw new MessageFormatException("type conversion is invalid"); + } // switch + } catch (EOFException e1) { + throw new MessageEOFException("at end of message"); // I18N + } catch (IOException e2) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e2); + throw jmsEx; + } // try .. catch + return ret; + } // readObject() + + /** + * Write a boolean to the stream message. The value true is written out as the value + * (byte)1; the value false is written out as the value (byte)0. + * + * @param value the boolean value to be written. + * + * @exception JMSException if JMS fails to read message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeBoolean(boolean value) throws JMSException { + try { + dos.writeByte((int) BOOLEAN_TYPE); + dos.writeBoolean(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeBoolean() + + /** + * Write out a byte to the stream message. + * + * @param value the byte value to be written. + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeByte(byte value) throws JMSException { + try { + dos.writeByte((int) BYTE_TYPE); + dos.writeByte((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeByte() + + /** + * Write a short to the stream message. + * + * @param value the short to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeShort(short value) throws JMSException { + try { + dos.writeByte((int) SHORT_TYPE); + dos.writeShort((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeShort() + + /** + * Write a char to the stream message. + * + * @param value the char value to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeChar(char value) throws JMSException { + try { + dos.writeByte((int) CHAR_TYPE); + dos.writeChar((int) value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeChar() + + /** + * Write an int to the stream message. + * + * @param value the int to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeInt(int value) throws JMSException { + try { + dos.writeByte((int) INT_TYPE); + dos.writeInt(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeInt() + + /** + * Write a long to the stream message. + * + * @param value the long to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeLong(long value) throws JMSException { + try { + dos.writeByte((int) LONG_TYPE); + dos.writeLong(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeLong() + + /** + * Write a float to the stream message. + * + * @param value the float value to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeFloat(float value) throws JMSException { + try { + dos.writeByte((int) FLOAT_TYPE); + dos.writeFloat(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeFloat() + + /** + * Write a double to the stream message. + * + * @param value the double value to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeDouble(double value) throws JMSException { + try { + dos.writeByte((int) DOUBLE_TYPE); + dos.writeDouble(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeDouble() + + /** + * Write a string to the stream message. + * + * @param value the String value to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeString(String value) throws JMSException { + try { + dos.writeByte((int) STRING_TYPE); + dos.writeUTF(value); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeString() + + /** + * Write a byte array to the stream message. + * + * @param value the byte array to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeBytes(byte[] value) throws JMSException { + writeBytes(value, 0, value.length); + } // writeBytes() + + /** + * Write a portion of a byte array to the stream message. + * + * @param value the byte array value to be written. + * @param offset the initial offset within the byte array. + * @param length the number of bytes to use. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + */ + public void writeBytes(byte[] value, int offset, int length) throws JMSException { + + /* + * bytes array field format as following: TYPE LENGTH DATA + */ + try { + dos.writeByte((int) BYTES_TYPE); + dos.writeInt(length); + dos.write(value, offset, length); + setBufferIsDirty(true); + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + } // writeBytes() + + /** + * Write a Java object to the stream message. + * + *

+ * Note that this method only works for the objectified primitive object types (Integer, Double, Long ...), String's and + * byte arrays. + * + * @param value the Java object to be written. + * + * @exception JMSException if JMS fails to write message due to some internal JMS error. + * @exception MessageNotWriteableException if message in read-only mode. + * @exception MessageFormatException if the object is invalid + */ + public void writeObject(Object value) throws JMSException { + if (value instanceof Boolean) { + writeBoolean(((Boolean) value).booleanValue()); + } else if (value instanceof Byte) { + writeByte(((Byte) value).byteValue()); + } else if (value instanceof Character) { + writeChar(((Character) value).charValue()); + } else if (value instanceof Double) { + writeDouble(((Double) value).doubleValue()); + } else if (value instanceof Float) { + writeFloat(((Float) value).floatValue()); + } else if (value instanceof Integer) { + writeInt(((Integer) value).intValue()); + } else if (value instanceof Long) { + writeLong(((Long) value).longValue()); + } else if (value instanceof Short) { + writeShort(((Short) value).shortValue()); + } else if (value instanceof String) { + writeString((String) value); + } else if (value instanceof byte[]) { + writeBytes((byte[]) value); + } else { + throw new MessageFormatException("Invalid type"); // I18N + } // if .. else + } // writeObject() + + /** + * Put the message in read-only mode, and reposition the stream to the beginning. + * + * @exception JMSException if JMS fails to reset the message due to some internal JMS error. + * @exception MessageFormatException if message has an invalid format + */ + public void reset() throws JMSException { + + // forces any buffered output bytes to be written out to the stream + // not really needed in this case, because the underlying output stream + // is a ByteArrayOutputStream + try { + if (bufferIsDirty) { + dos.flush(); + dos.close(); + baos.close(); + } + } catch (IOException e) { + JMSException jmsEx = new JMSException("IOException"); // I18N + + jmsEx.setLinkedException(e); + throw jmsEx; + } // try .. catch + if (baos != null) { + + // copy the content of DataOutputStream dos to buf + buf = baos.toByteArray(); + + } else { + if (buf == null) { + buf = new byte[0]; + } + } + bais = new ByteArrayInputStream(buf); + dis = new DataInputStream(bais); + + // initiate first_time_readBytes to true for readBytes() + first_time_readBytes = true; + setBufferIsDirty(false); + readMode = true; + } // reset() + + // overwrite methods in MessageImpl + + /** + * Method Declaration. + * + * + * @exception JMSException + * + * @see + */ + public void clearBody() throws JMSException { + buf = null; + bais = null; + dis = null; + readMode = false; + } // clearBody() + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java new file mode 100644 index 0000000000..000f188bb2 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/TestMessageListener.java @@ -0,0 +1,91 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)TestMessageListener.java 1.11 03/05/16 + */ +package com.sun.ts.tests.jms.common; + +import java.util.ArrayList; + +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.TextMessage; + +/** + * Message Listener implementation for JMS testing + */ +public class TestMessageListener implements jakarta.jms.MessageListener { + public MessageConsumer mConsumer; + + public DoneLatch monitor; + + public ArrayList messageArray = new ArrayList(); + + /** + * Constructor takes a MessageConsumer argument + * + * @param MessageConsumer + */ + public TestMessageListener(MessageConsumer mc, DoneLatch dl) { + mConsumer = mc; + monitor = dl; + } + + /** + * Returns the list of messages received. + * + * @return ArrayList the list of Messages that have been received + */ + public ArrayList getMessageArray() { + return messageArray; + } + + /** + * Clears the list of messages received. + * + */ + public DoneLatch getLatch() { + return monitor; + } + + /** + * Clears the list of messages received. + * + */ + public void clearMessageArray() { + messageArray.clear(); + } + + /** + * Responds to incoming Messages. A TextMessage is the end of stream signal. + * + * @param Message the message passed to the listener + */ + public void onMessage(Message message) { + try { + TestUtil.logTrace("MessageListener for " + mConsumer.toString() + " received message: " + message.toString()); + messageArray.add(message); + } catch (Exception e) { + TestUtil.logErr("Error in MessageListener: " + e.toString(), e); + } + if (message instanceof TextMessage) { + monitor.allDone(); + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java b/tools/common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java similarity index 71% rename from common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java index 6389cb90a1..2c2ff16019 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/common/TextMessageTestImpl.java @@ -23,20 +23,19 @@ import jakarta.jms.JMSException; import jakarta.jms.TextMessage; -public class TextMessageTestImpl extends MessageTestImpl - implements TextMessage { - private String text; +public class TextMessageTestImpl extends MessageTestImpl implements TextMessage { + private String text; - public TextMessageTestImpl() { - super(); - } + public TextMessageTestImpl() { + super(); + } - public void setText(String string) throws JMSException { - text = string; - } + public void setText(String string) throws JMSException { + text = string; + } - public String getText() throws JMSException { - return text; - } + public String getText() throws JMSException { + return text; + } } diff --git a/common/src/main/java/com/sun/ts/tests/jms/common/build.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/common/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/common/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/common/build.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java new file mode 100644 index 0000000000..adadb76cfe --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Client.java @@ -0,0 +1,337 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: Client.java 59995 2009-10-14 12:05:29Z af70133 $ + */ + +package com.sun.ts.tests.jms.commonee; + +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.harness.EETest; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TSNamingContextInterface; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.jms.BytesMessage; +import jakarta.jms.JMSException; +import jakarta.jms.MapMessage; +import jakarta.jms.Message; +import jakarta.jms.ObjectMessage; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueReceiver; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.StreamMessage; +import jakarta.jms.TextMessage; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; +import jakarta.jms.TopicPublisher; +import jakarta.jms.TopicSession; + +public class Client extends EETest { + + // Naming specific member variables + protected TSNamingContextInterface context = null; + + protected Properties props = null; + + protected Queue rcvrQueue; + + protected QueueConnection qConnect; + + protected QueueSession session; + + protected QueueConnectionFactory qFactory; + + protected QueueSender qSender; + + protected TopicConnection tConnect; + + protected TopicSession tSession; + + protected TopicConnectionFactory tFactory; + + protected TopicPublisher tPub; + + protected String jmsUser = null; + + protected String jmsPassword = null; + + protected String hostname = null; + + protected String traceFlag = null; + + protected String logPort = null; + + protected TextMessage msg = null; + + // get this from ts.jte + protected long timeout = 0; + + /* + * @class.setup_props: + * + * jms_timeout; user; password; harness.log.traceflag; harness.log.port; generateSQL; + * + * @class.testArgs: -ap tssql.stmt + * + * + */ + public void setup(String[] args, Properties p) throws Exception { + props = p; + + try { + jmsUser = TestUtil.getProperty(p, "user"); + if (jmsUser == null) { + TestUtil.logTrace("user is null"); + throw new Exception("Error getting user"); + } + + jmsPassword = TestUtil.getProperty(p, "password"); + if (jmsPassword == null) { + TestUtil.logTrace("password is null"); + throw new Exception("Error getting password"); + } + + String time = TestUtil.getProperty(p, "jms_timeout"); + if (time == null) { + TestUtil.logTrace("jms_timeout is null"); + throw new Exception("Error getting jms_timeout"); + } + + hostname = TestUtil.getProperty(p, "harness.host"); + if (hostname == null) { + TestUtil.logTrace("harness.host is null"); + throw new Exception("Error getting harness.host"); + } + traceFlag = TestUtil.getProperty(p, "harness.log.traceflag"); + if (traceFlag == null) { + TestUtil.logTrace("harness.log.traceflag is null"); + throw new Exception("Error getting harness.log.traceflag"); + } + logPort = TestUtil.getProperty(p, "harness.log.port"); + if (logPort == null) { + TestUtil.logTrace("harness.log.port is null"); + throw new Exception("Error getting harness.log.port"); + } + + timeout = Long.parseLong(time); + + TestUtil.logTrace("in client setup"); + + context = new TSNamingContext(); + TestUtil.logTrace("Client: Do lookups!"); + + rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); + + qFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + session = qConnect.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + qConnect.start(); + + tFactory = (TopicConnectionFactory) context.lookup("java:comp/env/jms/MyTopicConnectionFactory"); + tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); + tSession = tConnect.createTopicSession(false, Session.AUTO_ACKNOWLEDGE); + tConnect.start(); + + TestUtil.logTrace("get the connection and starter up"); + TestUtil.logTrace("Client: connection started, now send initialization msg!"); + + } catch (Exception e) { + throw new Exception("Setup Failed!", e); + } + } + + protected void createTestMessage(String TestCase, int num) { + String myMessage = "MDB deploy tests"; + Enumeration e; + String key = null; + String notValid = "."; + try { + msg = session.createTextMessage(); + e = props.propertyNames(); + // we need to extract the properties passed from the harness + // and set them in the message properties + // This is so we can send them to the mdb + msg.setStringProperty("user", jmsUser); + msg.setStringProperty("password", jmsPassword); + msg.setStringProperty("harnesshost", hostname); + msg.setStringProperty("harnesslogtraceflag", traceFlag); + msg.setStringProperty("harnesslogport", logPort); + e = props.propertyNames(); + key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + if ((key.indexOf(notValid) == -1) && (key.indexOf("***") == -1)) { + String value = TestUtil.getProperty(props, key); + msg.setStringProperty(key, value); + } + } + + msg.setText(myMessage); + msg.setIntProperty("TestCaseNum", num); + msg.setStringProperty("COM_SUN_JMS_TESTNAME", TestCase); + + } catch (Exception ee) { + TestUtil.printStackTrace(ee); + TestUtil.logMsg("key was: " + key); + TestUtil.logMsg("props was: " + props.getProperty(key)); + TestUtil.logMsg("Error setting properties"); + } + } + + public boolean checkOnResponse(String TestCase) { + boolean status = false; + try { + TestUtil.logMsg("@checkOnResponse"); + status = recvMessageInternal(session, TestCase); + TestUtil.logMsg("Close the session"); + } catch (Exception e) { + TestUtil.printStackTrace(e); + } + return status; + } + + protected boolean recvMessageInternal(QueueSession session, String TestCase) throws JMSException { + boolean retcode = false; + TestUtil.logMsg("@recvMessageInternal"); + // Create a message consumer. + QueueReceiver rcvr = session.createReceiver(rcvrQueue); + // dequeue the response from the mdb + Message msgRec = null; + + for (int i = 0; i < 10; ++i) { + TestUtil.logMsg("@recvMessageInternal trying to receive the message: " + i); + msgRec = rcvr.receive(timeout); + if (msgRec != null) { + break; + } + } // end for loop + if (msgRec != null) { + if (msgRec instanceof TextMessage) { + TestUtil.logMsg("**** Received msg text = " + ((TextMessage) msgRec).getText() + " ****"); + } + TestUtil.logMsg("**** Received msg getStringProperty('TestCase') = " + msgRec.getStringProperty("TestCase")); + TestUtil.logMsg("**** Received msg getStringProperty('Status') = " + msgRec.getStringProperty("Status")); + if (msgRec.getStringProperty("TestCase") == null || msgRec.getStringProperty("Status") == null) { + TestUtil.logMsg("Fail: unexpected message received from MDB_QUEUE_REPLY msgRec=" + msgRec); + } else if (msgRec.getStringProperty("TestCase").equals(TestCase) && msgRec.getStringProperty("Status").equals("Pass")) { + TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logMsg("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logMsg("Pass: we got the expected msg back! "); + retcode = true; + } else if (msgRec.getStringProperty("Status").equals("Fail")) { + TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logMsg("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logMsg("Fail: Error(s) occurred! "); + } else { + TestUtil.logMsg("Fail: we didnt get the expected msg back! "); + TestUtil.logMsg("TestCase: " + msgRec.getStringProperty("TestCase")); + } + } else if (msgRec == null) { + TestUtil.logMsg("Fail: we didnt get any msg back! "); + } + return retcode; + } + + public void cleanup() throws Exception { + try { + closeDefaultConnections(); + flushQueue(); + } catch (Exception e) { + TestUtil.logErr("Cleanup error: " + e.toString()); + TestUtil.printStackTrace(e); + } + } + + /** + * Use this method at cleanup time to remove any messages that have remained on the queue. + * + */ + + public void flushQueue() throws Exception { + QueueConnection qc = null; + QueueReceiver qr = null; + QueueSession qs = null; + int numMsgsFlushed = 0; + try { + qc = qFactory.createQueueConnection(jmsUser, jmsPassword); + qs = qc.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + qc.start(); // start the connections so that messages may be received. + + qr = qs.createReceiver(rcvrQueue); + // flush the queue + Message msg = qr.receive(timeout); + while (msg != null) { + if (msg instanceof TextMessage) { + TestUtil.logMsg("**** Flushed TextMessage =" + ((TextMessage) msg).getText() + " ****"); + } else { + String msgType = "Message"; + if (msg instanceof BytesMessage) + msgType = "BytesMessage"; + else if (msg instanceof MapMessage) + msgType = "MapMessage"; + else if (msg instanceof ObjectMessage) + msgType = "ObjectMessage"; + else if (msg instanceof StreamMessage) + msgType = "StreamMessage"; + TestUtil.logMsg("**** Flushed Message of type " + msgType + " ****"); + } + numMsgsFlushed++; + msg = qr.receiveNoWait(); + } + if (numMsgsFlushed > 0) { + TestUtil.logMsg("flushed " + numMsgsFlushed + " messages"); + } + + } catch (Exception e) { + TestUtil.logErr("Cleanup error attempting to flush Queue: " + e.toString()); + TestUtil.printStackTrace(e); + } finally { + qc.close(); + } + } + + /** + * Close default connections if open + * + * @exception Exception + * + * @see + */ + public void closeDefaultConnections() throws Exception { + try { + if (qConnect != null) { + TestUtil.logMsg("Client: Closing QueueConnection"); + qConnect.close(); + } + if (tConnect != null) { + TestUtil.logMsg("Client: Closing TopicConnection"); + tConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Cleanup error: " + e.toString()); + TestUtil.printStackTrace(e); + + } + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java similarity index 77% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java index 72c12ce6b4..fc82d5c6d9 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_Test.java @@ -25,18 +25,18 @@ @Remote public interface MDB_Q_Test { - boolean askMDBToRunATest(String typeOfTest); + boolean askMDBToRunATest(String typeOfTest); - boolean askMDBToSendAMessage(String messageType); + boolean askMDBToSendAMessage(String messageType); - boolean checkOnResponse(String prop); + boolean checkOnResponse(String prop); - boolean isThereSomethingInTheQueue(); + boolean isThereSomethingInTheQueue(); - void setup(Properties p); + void setup(Properties p); - void cleanTheQueue(); + void cleanTheQueue(); - void remove(); + void remove(); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java new file mode 100644 index 0000000000..13fe09381a --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_Q_TestEJB.java @@ -0,0 +1,374 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: MDB_Q_TestEJB.java 59995 2009-10-14 12:05:29Z af70133 $ + */ +package com.sun.ts.tests.jms.commonee; + +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import com.sun.ts.tests.jms.common.JmsUtil; +import jakarta.annotation.Resource; +import jakarta.ejb.EJBException; +import jakarta.ejb.PostActivate; +import jakarta.ejb.PrePassivate; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.Queue; +import jakarta.jms.QueueBrowser; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueReceiver; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.TextMessage; + +@Stateful +@Remote(MDB_Q_Test.class) +public class MDB_Q_TestEJB implements MDB_Q_Test { + + @Resource + private SessionContext sessionContext; + + private Properties p = null; + + @Resource(name = "jms/MDB_QUEUE_REPLY") + private transient Queue rcvrQueue; + + @Resource(name = "jms/MDB_QUEUE") + private transient Queue q; + + @Resource(name = "jms/MyQueueConnectionFactory") + private transient QueueConnectionFactory qFactory; + + private transient QueueConnection qConnect; + + private String jmsUser; + + private String jmsPassword; + + private long timeout; + + public MDB_Q_TestEJB() { + } + + public void setup(Properties props) { + TestUtil.logTrace("MDB_Q_TestEJB.setup()"); + p = props; + try { + TestUtil.init(props); + // get props + timeout = Long.parseLong(TestUtil.getProperty(props, "jms_timeout")); + jmsUser = TestUtil.getProperty(props, "user"); + jmsPassword = TestUtil.getProperty(props, "password"); + // check props for errors + if (timeout < 1) { + throw new Exception("'jms_timeout' (milliseconds) in ts.jte must be > 0"); + } + if (jmsUser == null) { + throw new Exception("'user' in ts.jte must be null"); + } + if (jmsPassword == null) { + throw new Exception("'password' in ts.jte must be null"); + } + if (qFactory == null || q == null | rcvrQueue == null || sessionContext == null) { + throw new Exception("@Resource injection failed"); + } + } catch (Exception e) { + throw new EJBException("@setup failed: ", e); + } + } + + public boolean askMDBToRunATest(String typeOfTest) { + TestUtil.logTrace("MDB_Q_TestEJB.askMDBToRunATest()"); + boolean ok = true; + String myMessage = "Sending a message to mdb"; + + try { + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + QueueSender qSender = session.createSender(q); + + // create a text message + TextMessage msg = session.createTextMessage(); + JmsUtil.addPropsToMessage(msg, p); + msg.setText(myMessage); + msg.setStringProperty("TestCase", typeOfTest); + + qSender.send(msg); + + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("askMDBToRunATest: Error!", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + return ok; + } + + public boolean askMDBToSendAMessage(String typeOfMessage) { + TestUtil.logTrace("MDB_Q_TestEJB.askMDBToSendAMessage()"); + boolean ok = true; + String myMessage = "I want you to send a message"; + + try { + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + + QueueSender qSender = session.createSender(q); + TestUtil.logTrace("got a q sender for: " + qSender.getQueue().getQueueName()); + + // create a text message + TextMessage msg = session.createTextMessage(); + JmsUtil.addPropsToMessage(msg, p); + msg.setText(myMessage); + msg.setStringProperty("MessageType", typeOfMessage); + + qSender.send(msg); + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("@askMDBToSendAMessage: Error!", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing connection in askMDBToSendAMessage", e); + } + } + return ok; + } + + // Validate that a given message was sent by mdb + // prop = validate string + // + public boolean checkOnResponse(String prop) { + + boolean status = false; + try { + TestUtil.logTrace("MDB_Q_TestEJB.checkOnResponse()"); + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + status = recvMessageInternal(session, prop); + TestUtil.logTrace("Close the session"); + session.close(); + } catch (Exception e) { + TestUtil.logErr("Error in checkOnResponse", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + return status; + } + + private boolean recvMessageInternal(QueueSession session, String prop) throws JMSException { + boolean retcode = false; + TestUtil.logTrace("MDB_Q_TestEJB.recvMessageInternal()"); + // Create a message producer. + QueueReceiver rcvr = session.createReceiver(rcvrQueue); + // dequeue the response from the mdb + Message msgRec = null; + + for (int i = 0; i < 10; ++i) { + TestUtil.logTrace("@recvMessageInternal trying to receive the message: " + i); + msgRec = rcvr.receive(timeout); + if (msgRec != null) { + break; + } + } // end for loop + + if (msgRec != null) { + if ((msgRec.getStringProperty("TestCase") != null) || (msgRec.getStringProperty("Status") != null)) { + if (msgRec.getStringProperty("TestCase").equals(prop) && msgRec.getStringProperty("Status").equals("Pass")) { + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logTrace("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logTrace("Pass: we got the expected msg back! "); + retcode = true; + + } else if (msgRec.getStringProperty("Status").equals("Fail")) { + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logTrace("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logTrace("Fail: Error(s) occurred! "); + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + } + } else if (msgRec.getStringProperty("MessageType") != null) { + if (msgRec.getStringProperty("MessageType").equals(prop)) { + TestUtil.logTrace("Success: received Msg from Q! " + msgRec.getStringProperty("MessageType")); + TestUtil.logTrace("Pass: we got the expected msg back! "); + retcode = true; + + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + TestUtil.logTrace("MessageType: " + msgRec.getStringProperty("MessageType")); + } + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + } + } else { + TestUtil.logTrace("Fail: we didnt get any msg back! "); + } + return retcode; + } + + public boolean isThereSomethingInTheQueue() { + TestUtil.logTrace("MDB_Q_TestEJB.isThereSomethingInTheQueue()"); + QueueBrowser qBrowser = null; + Enumeration msgs = null; + boolean ret = false; + + try { + // Hopefully nothing is left in the queue + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + qBrowser = session.createBrowser(rcvrQueue); + msgs = qBrowser.getEnumeration(); + if (msgs.hasMoreElements()) { + ret = true; + } + qBrowser.close(); + session.close(); + + } catch (Exception e) { + TestUtil.logErr("Error in isThereSomethingInTheQueue", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + return ret; + } + + public void cleanTheQueue() { + TestUtil.logTrace("MDB_Q_TestEJB.cleanTheQueue()"); + QueueBrowser qBrowser = null; + Enumeration msgs = null; + int numMsgs = 0; + + try { + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + TextMessage msgRec = null; + + // delete anything left in the queue + qBrowser = session.createBrowser(rcvrQueue); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + qBrowser.close(); + + // Read messages until Q is cleaned + QueueReceiver rcvr = session.createReceiver(rcvrQueue); + TestUtil.logTrace("Cleaning " + numMsgs + " messages from the Q: " + rcvrQueue.getQueueName()); + for (int n = 0; n < numMsgs; n++) { + // + TestUtil.logTrace("dequeuing msg: " + n + " from the Q: " + rcvrQueue.getQueueName()); + for (int i = 0; i < 10; ++i) { + msgRec = (TextMessage) rcvr.receive(timeout); + if (msgRec != null) { + TestUtil.logTrace("dequeued message: " + n); + break; + } + TestUtil.logTrace("Attempt no: " + i + " Trying to dequeue message: " + n); + } // end of internal for loop + } + session.close(); + } catch (Exception e) { + TestUtil.logErr("Error in cleanTheQueue", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + } + + @Remove + public void remove() { + TestUtil.logTrace("MDB_Q_TestEJB.remove()"); + } + + @PostActivate + public void activate() { + TestUtil.logTrace("MDB_Q_TestEJB.activate()"); + + try { + TSNamingContext context = new TSNamingContext(); + TestUtil.logTrace("got the context"); + + rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); + q = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE"); + qFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + } catch (Exception e) { + TestUtil.logErr("Error looking up Queue, QueueConnectionFactory objects", e); + throw new EJBException("@activate: Error!", e); + } + } + + @PrePassivate + public void passivate() { + TestUtil.logTrace("MDB_Q_TestEJB.passivate()"); + + if (qConnect != null) { + try { + qConnect.close(); + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + qConnect = null; + } + rcvrQueue = null; + q = null; + qFactory = null; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java similarity index 77% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java index ab785202ef..ae68d7d9f0 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_Test.java @@ -26,17 +26,17 @@ @Remote public interface MDB_T_Test { - boolean askMDBToRunATest(String typeOfTest); + boolean askMDBToRunATest(String typeOfTest); - boolean askMDBToSendAMessage(String messageType); + boolean askMDBToSendAMessage(String messageType); - boolean checkOnResponse(String prop); + boolean checkOnResponse(String prop); - boolean isThereSomethingInTheQueue(); + boolean isThereSomethingInTheQueue(); - void setup(Properties p); + void setup(Properties p); - void cleanTheQueue(); + void cleanTheQueue(); - void remove(); + void remove(); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java new file mode 100644 index 0000000000..1ce6bcd0bc --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/MDB_T_TestEJB.java @@ -0,0 +1,393 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: MDB_T_TestEJB.java 59995 2009-10-14 12:05:29Z af70133 $ + */ +package com.sun.ts.tests.jms.commonee; + +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; +import com.sun.ts.tests.jms.common.JmsUtil; +import jakarta.annotation.Resource; +import jakarta.ejb.EJBException; +import jakarta.ejb.PostActivate; +import jakarta.ejb.PrePassivate; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.jms.JMSException; +import jakarta.jms.Message; +import jakarta.jms.Queue; +import jakarta.jms.QueueBrowser; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueReceiver; +import jakarta.jms.QueueSession; +import jakarta.jms.TextMessage; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnection; +import jakarta.jms.TopicConnectionFactory; +import jakarta.jms.TopicPublisher; +import jakarta.jms.TopicSession; + +@Stateful +@Remote(MDB_T_Test.class) +public class MDB_T_TestEJB implements MDB_T_Test { + + @Resource + private SessionContext sessionContext; + + private Properties p = null; + + @Resource(name = "jms/MDB_QUEUE_REPLY") + private transient Queue rcvrQueue; + + @Resource(name = "jms/MyQueueConnectionFactory") + private transient QueueConnectionFactory qFactory; + + private transient QueueConnection qConnect; + + @Resource(name = "jms/MDB_TOPIC") + private transient Topic topic; + + @Resource(name = "jms/MyTopicConnectionFactory") + private transient TopicConnectionFactory tFactory; + + private transient TopicConnection tConnect; + + private String jmsUser; + + private String jmsPassword; + + private long timeout; + + public MDB_T_TestEJB() { + } + + public void setup(Properties props) { + TestUtil.logTrace("MDB_T_TestEJB.setup()"); + p = props; + try { + TestUtil.init(props); + // get props + timeout = Long.parseLong(TestUtil.getProperty(props, "jms_timeout")); + jmsUser = TestUtil.getProperty(props, "user"); + jmsPassword = TestUtil.getProperty(props, "password"); + // check props for errors + if (timeout < 1) { + throw new Exception("'jms_timeout' (milliseconds) in ts.jte must be > 0"); + } + if (jmsUser == null) { + throw new Exception("'user' in ts.jte must not be null"); + } + if (jmsPassword == null) { + throw new Exception("'password' in ts.jte must not be null"); + } + if (qFactory == null || tFactory == null | rcvrQueue == null || topic == null || sessionContext == null) { + throw new Exception("@Resource injection failed"); + } + } catch (Exception e) { + throw new EJBException("@setup failed: ", e); + } + } + + public boolean askMDBToRunATest(String typeOfTest) { + TestUtil.logTrace("MDB_T_TestEJB.askMDBToRunATest()"); + boolean ok = true; + String myMessage = "Sending a message to mdb"; + + try { + tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); + TopicSession tSession = tConnect.createTopicSession(true, 0); + tConnect.start(); + TopicPublisher tPublisher = tSession.createPublisher(topic); + // create a text message + TextMessage msg = tSession.createTextMessage(); + JmsUtil.addPropsToMessage(msg, p); + + msg.setText(myMessage); + msg.setStringProperty("TestCase", typeOfTest); + + // send the message + tPublisher.publish(msg); + + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("@askMDBToRunATest: Error!", e); + } finally { + try { + if (tConnect != null) { + tConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing TopicConnection", e); + } + } + return ok; + } + + public boolean askMDBToSendAMessage(String typeOfMessage) { + TestUtil.logTrace("MDB_T_TestEJB.askMDBToSendAMessage()"); + boolean ok = true; + String myMessage = "I want you to send a message"; + + try { + tConnect = tFactory.createTopicConnection(jmsUser, jmsPassword); + TopicSession session = tConnect.createTopicSession(true, 0); + TopicPublisher tPublisher = session.createPublisher(topic); + + tConnect.start(); + + // create a text message + TextMessage msg = session.createTextMessage(); + JmsUtil.addPropsToMessage(msg, p); + + msg.setText(myMessage); + msg.setStringProperty("MessageType", typeOfMessage); + TestUtil.logTrace("@TestEJB - about to publish a message"); + // send the message + tPublisher.publish(msg); + } catch (Exception e) { + TestUtil.logErr("Unexpected Exception in askMDBToSendAMessage:", e); + throw new EJBException("@askMDBToSendAMessage: Error!"); + } finally { + try { + if (tConnect != null) { + tConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error Closing TopicConnection!", e); + } + } + return ok; + } + + // Validate that a given message was sent by mdb + // prop = validate string + // + public boolean checkOnResponse(String prop) { + + boolean status = false; + try { + TestUtil.logTrace("MDB_T_TestEJB.checkOnResponse()"); + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + status = recvMessageInternal(session, prop); + TestUtil.logTrace("Close the session"); + session.close(); + } catch (Exception e) { + TestUtil.logErr("Error in checkOnResponse", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + return status; + } + + private boolean recvMessageInternal(QueueSession session, String prop) throws JMSException { + boolean retcode = false; + TestUtil.logTrace("MDB_T_TestEJB.recvMessageInternal()"); + // Create a message producer. + QueueReceiver rcvr = session.createReceiver(rcvrQueue); + // dequeue the response from the mdb + Message msgRec = null; + + for (int i = 0; i < 10; ++i) { + TestUtil.logTrace("@recvMessageInternal trying to receive the message: " + i); + msgRec = rcvr.receive(timeout); + if (msgRec != null) { + break; + } + } // end for loop + + if (msgRec != null) { + if ((msgRec.getStringProperty("TestCase") != null) || (msgRec.getStringProperty("Status") != null)) { + if (msgRec.getStringProperty("TestCase").equals(prop) && msgRec.getStringProperty("Status").equals("Pass")) { + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logTrace("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logTrace("Pass: we got the expected msg back! "); + retcode = true; + } else if (msgRec.getStringProperty("Status").equals("Fail")) { + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + TestUtil.logTrace("Status from msg: " + msgRec.getStringProperty("Status")); + TestUtil.logTrace("Fail: Error(s) occurred! "); + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + TestUtil.logTrace("TestCase: " + msgRec.getStringProperty("TestCase")); + } + } else if (msgRec.getStringProperty("MessageType") != null) { + if (msgRec.getStringProperty("MessageType").equals(prop)) { + TestUtil.logTrace("Success: received Msg"); + TestUtil.logTrace("Pass: we got the expected msg back! "); + retcode = true; + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + TestUtil.logTrace("MessageType: " + msgRec.getStringProperty("MessageType")); + } + } else { + TestUtil.logTrace("Fail: we didnt get the expected msg back! "); + } + } else { + TestUtil.logTrace("Fail: we didnt get any msg back! "); + } + return retcode; + } + + public boolean isThereSomethingInTheQueue() { + TestUtil.logTrace("MDB_T_TestEJB.isThereSomethingInTheQueue()"); + QueueBrowser qBrowser = null; + Enumeration msgs = null; + boolean ret = false; + + try { + // Hopefully nothing is left in the queue + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + qBrowser = session.createBrowser(rcvrQueue); + msgs = qBrowser.getEnumeration(); + if (msgs.hasMoreElements()) { + ret = true; + } + qBrowser.close(); + session.close(); + + } catch (Exception e) { + TestUtil.logErr("Error in isThereSomethingInTheQueue", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + return ret; + } + + public void cleanTheQueue() { + TestUtil.logTrace("MDB_T_TestEJB.cleanTheQueue()"); + QueueBrowser qBrowser = null; + Enumeration msgs = null; + int numMsgs = 0; + + try { + qConnect = qFactory.createQueueConnection(jmsUser, jmsPassword); + QueueSession session = qConnect.createQueueSession(true, 0); + qConnect.start(); + TextMessage msgRec = null; + + // delete anything left in the queue + qBrowser = session.createBrowser(rcvrQueue); + // count the number of messages + msgs = qBrowser.getEnumeration(); + while (msgs.hasMoreElements()) { + msgs.nextElement(); + numMsgs++; + } + qBrowser.close(); + + // Read messages until Q is cleaned + QueueReceiver rcvr = session.createReceiver(rcvrQueue); + TestUtil.logTrace("Cleaning " + numMsgs + " messages from the Q: " + rcvrQueue.getQueueName()); + for (int n = 0; n < numMsgs; n++) { + + TestUtil.logTrace("dequeuing msg: " + n + " from the Q: " + rcvrQueue.getQueueName()); + for (int i = 0; i < 10; ++i) { + msgRec = (TextMessage) rcvr.receive(timeout); + if (msgRec != null) { + TestUtil.logTrace("dequeued message: " + n); + break; + } + TestUtil.logTrace("Attempt no: " + i + " Trying to dequeue message: " + n); + } // end of internal for loop + } + session.close(); + } catch (Exception e) { + TestUtil.logErr("Error in cleanTheQueue", e); + } finally { + try { + if (qConnect != null) { + qConnect.close(); + } + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + } + } + + @Remove + public void remove() { + TestUtil.logTrace("MDB_T_TestEJB.remove()"); + } + + @PostActivate + public void activate() { + TestUtil.logTrace("MDB_T_TestEJB.activate()"); + try { + TSNamingContext context = new TSNamingContext(); + rcvrQueue = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); + qFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + tFactory = (TopicConnectionFactory) context.lookup("java:comp/env/jms/MyTopicConnectionFactory"); + topic = (Topic) context.lookup("java:comp/env/jms/MDB_TOPIC"); + } catch (Exception e) { + TestUtil.logErr("Error looking up Queue, Topic, ConnectionFactory objects", e); + throw new EJBException("@activate: Error!", e); + } + } + + @PrePassivate + public void passivate() { + TestUtil.logTrace("MDB_T_TestEJB.passivate()"); + + rcvrQueue = null; + + if (qConnect != null) { + try { + qConnect.close(); + } catch (Exception e) { + TestUtil.logErr("Error closing QueueConnection", e); + } + qConnect = null; + } + + qFactory = null; + + topic = null; + if (tConnect != null) { + try { + tConnect.close(); + } catch (Exception e) { + TestUtil.logErr("Error closing TopicConnection", e); + } + tConnect = null; + } + + tFactory = null; + } +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java new file mode 100644 index 0000000000..6b0b01e1be --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBean.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: ParentMsgBean.java 59995 2009-10-14 12:05:29Z af70133 $ + */ + +package com.sun.ts.tests.jms.commonee; + +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.EJBException; +import jakarta.ejb.MessageDrivenBean; +import jakarta.ejb.MessageDrivenContext; +import jakarta.jms.Message; +import jakarta.jms.MessageListener; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; + +public class ParentMsgBean implements MessageDrivenBean, MessageListener { + + // properties object needed for logging, + // get this from the message object passed into + // the onMessage method. + protected java.util.Properties p = null; + + protected TSNamingContext context = null; + + protected MessageDrivenContext mdc = null; + + // JMS PTP + protected QueueConnectionFactory qFactory; + + protected QueueConnection qConnection = null; + + protected Queue queueR = null; + + protected Queue queue = null; + + protected QueueSender mSender = null; + + protected boolean result = false; + + public ParentMsgBean() { + TestUtil.logTrace("@MsgBean()!"); + }; + + public void ejbCreate() { + TestUtil.logTrace("@EJBCreate()!"); + + try { + + context = new TSNamingContext(); + qFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + queueR = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("MDB ejbCreate Error", e); + } + } + + public void setMessageDrivenContext(MessageDrivenContext mdc) { + TestUtil.logTrace("@MsgBean:setMessageDrivenContext()!"); + this.mdc = mdc; + } + + public void ejbRemove() { + TestUtil.logTrace("@ejbRemove()"); + } + + public void onMessage(Message msg) { + QueueSession qSession = null; + TextMessage messageSent = null; + String testName = null; + String hostname = null; + String traceflag = null; + String logport = null; + + p = new Properties(); + try { + // because a jms property name cannot contain '.' the + // following properties are a special case + hostname = msg.getStringProperty("harnesshost"); + traceflag = msg.getStringProperty("harnesslogtraceflag"); + logport = msg.getStringProperty("harnesslogport"); + p.put("harness.host", hostname); + p.put("harness.log.traceflag", traceflag); + p.put("harness.log.port", logport); + + // now pull out the rest of the properties from the message + Enumeration e = msg.getPropertyNames(); + String key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + p.put(key, msg.getStringProperty(key)); + } + + testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); + qConnection = qFactory.createQueueConnection(); + if (qConnection == null) + throw new EJBException("MDB connection Error!"); + + qSession = qConnection.createQueueSession(true, Session.SESSION_TRANSACTED); + + // Diagnostic - pull out after testing + // for (Enumeration enum = p.propertyNames(); enum.hasMoreElements();){ + // System.out.println(enum.nextElement()); + // } + TestUtil.init(p); + TestUtil.logTrace("will run TestCase: " + testName); + runTests(msg, qSession, testName, p); + + } catch (Exception e) { + TestUtil.printStackTrace(e); + } finally { + if (qConnection != null) { + try { + qConnection.close(); + } catch (Exception e) { + TestUtil.printStackTrace(e); + } + } + } + + } + + protected void runTests(Message msg, QueueSession qSession, String testName, java.util.Properties p) { + TestUtil.logTrace("ParentMsgBean - runTests"); + + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java new file mode 100644 index 0000000000..305883ea88 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/ParentMsgBeanNoTx.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: ParentMsgBeanNoTx.java 59995 2009-10-14 12:05:29Z af70133 $ + */ + +package com.sun.ts.tests.jms.commonee; + +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.ejb.EJBException; +import jakarta.ejb.MessageDrivenBean; +import jakarta.ejb.MessageDrivenContext; +import jakarta.jms.Message; +import jakarta.jms.MessageListener; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; + +public class ParentMsgBeanNoTx implements MessageDrivenBean, MessageListener { + + // properties object needed for logging, + // get this from the message object passed into + // the onMessage method. + protected java.util.Properties p = null; + + protected TSNamingContext context = null; + + protected MessageDrivenContext mdc = null; + + // JMS PTP + protected QueueConnectionFactory qFactory; + + protected QueueConnection qConnection = null; + + protected Queue queueR = null; + + protected Queue queue = null; + + protected QueueSender mSender = null; + + protected boolean result = false; + + public ParentMsgBeanNoTx() { + TestUtil.logTrace("@MsgBean()!"); + }; + + public void ejbCreate() { + TestUtil.logTrace("@EJBCreate()!"); + + try { + + context = new TSNamingContext(); + qFactory = (QueueConnectionFactory) context.lookup("java:comp/env/jms/MyQueueConnectionFactory"); + queueR = (Queue) context.lookup("java:comp/env/jms/MDB_QUEUE_REPLY"); + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("MDB ejbCreate Error", e); + } + } + + public void setMessageDrivenContext(MessageDrivenContext mdc) { + TestUtil.logTrace("@MsgBean:setMessageDrivenContext()!"); + this.mdc = mdc; + } + + public void ejbRemove() { + TestUtil.logTrace("@ejbRemove()"); + } + + public void onMessage(Message msg) { + QueueSession qSession = null; + TextMessage messageSent = null; + String testName = null; + String hostname = null; + String traceflag = null; + String logport = null; + + p = new Properties(); + try { + // because a jms property name cannot contain '.' the + // following properties are a special case + hostname = msg.getStringProperty("harnesshost"); + traceflag = msg.getStringProperty("harnesslogtraceflag"); + logport = msg.getStringProperty("harnesslogport"); + p.put("harness.host", hostname); + p.put("harness.log.traceflag", traceflag); + p.put("harness.log.port", logport); + + // now pull out the rest of the properties from the message + Enumeration e = msg.getPropertyNames(); + String key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + p.put(key, msg.getStringProperty(key)); + } + + testName = msg.getStringProperty("COM_SUN_JMS_TESTNAME"); + qConnection = qFactory.createQueueConnection(); + if (qConnection == null) + throw new EJBException("MDB connection Error!"); + + qSession = qConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE); + + // Diagnostic - pull out after testing + // for (Enumeration enum = p.propertyNames(); enum.hasMoreElements();){ + // System.out.println(enum.nextElement()); + // } + TestUtil.init(p); + TestUtil.logTrace("will run TestCase: " + testName); + runTests(msg, qSession, testName, p); + + } catch (Exception e) { + TestUtil.printStackTrace(e); + } finally { + if (qConnection != null) { + try { + qConnection.close(); + } catch (Exception e) { + TestUtil.printStackTrace(e); + } + } + } + + } + + protected void runTests(Message msg, QueueSession qSession, String testName, java.util.Properties p) { + TestUtil.logTrace("ParentMsgBeanNoTx - runTests"); + + } + +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java new file mode 100644 index 0000000000..1e315973ef --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/Tests.java @@ -0,0 +1,121 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: Tests.java 59995 2009-10-14 12:05:29Z af70133 $ + */ +package com.sun.ts.tests.jms.commonee; + +import java.util.ArrayList; +import java.util.Properties; + +import jakarta.ejb.Remote; +import jakarta.jms.Queue; + +@Remote +public interface Tests { + public void initLogging(Properties p); + + public void remove(); + + public ArrayList sendTextMessage_CQ(String tesname, String text); + + public ArrayList sendMessageP_CQ(String tesname, String text, boolean val); + + public ArrayList sendMessagePP_CQ(String tesname, String text, boolean val, String props, String value); + + public String receiveTextMessage_CQ(); + + public String receiveMessageS_CQ(String selector); + + public int browseTextMessage_CQ(int num, String msg); + + public int browseMessageS_CQ(int num, String msg, String selector); + + public ArrayList sendTextMessage_CT(String tesname, String text); + + public String receiveTextMessage_CT(); + + public int getAck_CQ(); + + public int getAck_CT(); + + public boolean getQueue(); + + public boolean getSelector(String selector); + + public ArrayList sendTextMessage_Q(String tesname); + + public ArrayList sendTextMessage_Q(String tesname, boolean setDest); + + public ArrayList sendTextMessage_Q(String tesname, String text); + + public ArrayList sendTextMessage_Q(String tesname, String text, Queue testQueue); + + public ArrayList sendTextMessage_Q(String tesname, boolean setDest, int mode); + + public ArrayList sendFullBytesMessage_Q(String tesname); + + public ArrayList sendBytesMessage_Q(String tesname, boolean setDest); + + public ArrayList sendBytesMessage_Q(String tesname, boolean setDest, int mode); + + public boolean verifyFullBytesMessage(); + + public ArrayList sendFullMapMessage_Q(String tesname); + + public ArrayList sendMapMessage_Q(String tesname, boolean setDest); + + public ArrayList sendMapMessage_Q(String tesname, boolean setDest, int mode); + + public boolean verifyFullMapMessage(); + + public ArrayList sendFullStreamMessage_Q(String tesname); + + public ArrayList sendStreamMessage_Q(String tesname, boolean setDest); + + public ArrayList sendStreamMessage_Q(String tesname, boolean setDest, int mode); + + public boolean verifyFullStreamMessage(); + + public ArrayList sendObjectMessage_Q(String tesname); + + public ArrayList sendObjectMessage_Q(String tesname, boolean setDest); + + public ArrayList sendObjectMessage_Q(String tesname, boolean setDest, int mode); + + public String getMessageID(); + + public long getTimeStamp(); + + public String getCorrelationID(); + + public String getReplyTo(); + + public String getDestination_1(); + + public String getDestination(); + + public String getType(); + + public int getPriority(); + + public long getExpiration(); + + public int getDeliveryMode(); + + public String getText(); +} diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java new file mode 100644 index 0000000000..e5b494a989 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsEJB.java @@ -0,0 +1,1977 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: TestsEJB.java 59995 2009-10-14 12:05:29Z af70133 $ + */ +package com.sun.ts.tests.jms.commonee; + +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.Properties; + +import com.sun.ts.lib.util.RemoteLoggingInitException; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.EJBException; +import jakarta.ejb.PostActivate; +import jakarta.ejb.PrePassivate; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.jms.BytesMessage; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.DeliveryMode; +import jakarta.jms.Destination; +import jakarta.jms.MapMessage; +import jakarta.jms.Message; +import jakarta.jms.MessageConsumer; +import jakarta.jms.MessageProducer; +import jakarta.jms.ObjectMessage; +import jakarta.jms.Queue; +import jakarta.jms.QueueBrowser; +import jakarta.jms.QueueConnection; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.QueueReceiver; +import jakarta.jms.QueueSender; +import jakarta.jms.QueueSession; +import jakarta.jms.Session; +import jakarta.jms.StreamMessage; +import jakarta.jms.TextMessage; + +@Stateful +@Remote(Tests.class) +public class TestsEJB implements Tests { + + @Resource + private SessionContext sessionContext; + + private Properties harnessProps = null; + + private TSNamingContext nctx = null; + + private transient Destination testDestination = null; + + private transient ConnectionFactory cf = null; + + private transient Connection conn = null; + + private transient Queue queue = null; + + private transient QueueConnectionFactory qcf = null; + + private transient QueueConnection qconn = null; + + private static final String TESTQUEUENAME = "java:comp/env/jms/MY_QUEUE"; + + private static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; + + private static final String QUEUECONNECTIONFACTORY = "java:comp/env/jms/MyQueueConnectionFactory"; + + private static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/MyTopicConnectionFactory"; + + private TextMessage messageSent = null; + + private BytesMessage messageSentB = null; + + private String username = null; + + private String password = null; + + private long timeout; + + private boolean booleanValue = false; + + private byte byteValue = 127; + + private byte byteValue1 = -12; + + private int byteValue2 = 244; + + private byte[] bytesValue = { 127, -127, 1, 0 }; + + private byte[] bytesValueRecvd = { 0, 0, 0, 0 }; + + private byte[] byteValues = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; + + private byte[] byteValues2 = { 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 }; + + private byte[] byteValuesReturned = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + private byte[] byteValuesReturned2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + private char charValue = 'Z'; + + private double doubleValue = 6.02e23; + + private float floatValue = 6.02e23f; + + private int intValue = 2147483647; + + private long longValue = 9223372036854775807L; + + private Integer nInteger = Integer.valueOf(-2147483648); + + private short shortValue = -32768; + + private short shortValue1 = -28679; + + private int shortValue2 = 36857; + + private String utfValue = "what"; + + private String stringValue = "Map Message Test"; + + private String sTesting = "Testing StreamMessages"; + + private String type = "JMSTCKTESTMSG"; + + private String jmsCorrelationID = "JMSTCKCorrelationID"; + + private int priority = 2; + + private long forever = 0L; + + public TestsEJB() { + TestUtil.logTrace("TestsEJB => default constructor called"); + } + + @PostConstruct + public void postConstruct() { + TestUtil.logTrace("postConstruct"); + try { + TestUtil.logMsg("obtain naming context"); + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.logErr("Error obtaining naming context: ", e); + throw new EJBException("postConstruct: Failed!", e); + } + } + + @PostActivate + public void activate() { + TestUtil.logTrace("activate"); + try { + common_Q(); + setup_Q(); + } catch (Exception e) { + TestUtil.logErr("Error during common Queue setup: ", e); + throw new EJBException("activate: Failed!", e); + } + } + + @PrePassivate + public void passivate() { + TestUtil.logTrace("passivate"); + + testDestination = null; + cf = null; + conn = null; + queue = null; + qcf = null; + qconn = null; + } + + @Remove + public void remove() { + TestUtil.logTrace("remove"); + } + + public void initLogging(Properties p) { + TestUtil.logTrace("initLogging"); + harnessProps = p; + try { + TestUtil.logMsg("initialize remote logging"); + TestUtil.init(p); + timeout = Long.parseLong(TestUtil.getProperty(harnessProps, "jms_timeout")); + username = TestUtil.getProperty(harnessProps, "user"); + password = TestUtil.getProperty(harnessProps, "password"); + // check props for errors + if (timeout < 1) { + throw new EJBException("'jms_timeout' (milliseconds) in ts.jte must be > 0"); + } + if (username == null) { + throw new EJBException("'user' in ts.jte must be null"); + } + if (password == null) { + throw new EJBException("'password' in ts.jte must be null"); + } + if (sessionContext == null) { + throw new EJBException("@Resource injection failed"); + } + } catch (RemoteLoggingInitException e) { + TestUtil.printStackTrace(e); + throw new EJBException("initLogging: Failed!", e); + } + } + + private void common_Q() throws Exception { + + TestUtil.logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); + cf = (ConnectionFactory) nctx.lookup(QUEUECONNECTIONFACTORY); + + TestUtil.logTrace("Getting Destination " + TESTQUEUENAME); + testDestination = (Destination) nctx.lookup(TESTQUEUENAME); + + // create default connection + TestUtil.logTrace("Creating Connection with username, " + username + " password, " + password); + conn = cf.createConnection(username, password); + } + + private void setup_Q() throws Exception { + + TestUtil.logTrace("Getting ConnectionFactory " + QUEUECONNECTIONFACTORY); + qcf = (QueueConnectionFactory) nctx.lookup(QUEUECONNECTIONFACTORY); + + TestUtil.logTrace("Getting Queue" + TESTQUEUENAME); + queue = (Queue) nctx.lookup(TESTQUEUENAME); + + // create default QueueConnection + TestUtil.logTrace("Creating QueueConnection with username, " + username + " password, " + password); + qconn = qcf.createQueueConnection(username, password); + } + + private void common_T() throws Exception { + + TestUtil.logTrace("Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); + + TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); + testDestination = (Destination) nctx.lookup(TESTTOPICNAME); + + // create default connection + TestUtil.logTrace("Creating Connection with username, " + username + " password, " + password); + conn = cf.createConnection(username, password); + + } + + public ArrayList sendTextMessage_CQ(String TestName, String message) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + // get ConnectionFactory and Connection + common_Q(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + MessageProducer sender = sess.createProducer(testDestination); + + TestUtil.logMsg("Creating 1 TextMessage"); + messageSent = sess.createTextMessage(); + messageSent.setText(message); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + + TestUtil.logMsg("Sending a TextMessage"); + timeBeforeSend = System.currentTimeMillis(); + sender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendTextMessage_CQ"); + TestUtil.printStackTrace(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in sendTextMessage_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in sendTextMessage_CQ" + ce.getMessage(), ce); + } + } + } + return valueAtSend; + } + + private ArrayList logPropertyAtSend(Message messageSent, long timeBeforeSend, long timeAfterSend) throws Exception { + ArrayList valueAtSend = new ArrayList(9); + + valueAtSend.add(0, Long.valueOf(timeBeforeSend)); + TestUtil.logTrace("Time before send..." + valueAtSend.get(0)); + + valueAtSend.add(1, Long.valueOf(timeAfterSend)); + TestUtil.logTrace("Time after send...." + valueAtSend.get(1)); + + valueAtSend.add(2, Long.valueOf(messageSent.getJMSTimestamp())); + TestUtil.logTrace("JMSTimeStamp......." + valueAtSend.get(2)); + + valueAtSend.add(3, Long.valueOf(messageSent.getJMSExpiration())); + TestUtil.logTrace("JMSExpiration......" + valueAtSend.get(3)); + + valueAtSend.add(4, messageSent.getJMSDestination()); + TestUtil.logTrace("JMSDestination....." + valueAtSend.get(4)); + + valueAtSend.add(5, Long.valueOf(messageSent.getJMSPriority())); + TestUtil.logTrace("JMSPriority........" + valueAtSend.get(5)); + + valueAtSend.add(6, Long.valueOf(messageSent.getJMSDeliveryMode())); + TestUtil.logTrace("JMSDeliveryMode...." + valueAtSend.get(6)); + + valueAtSend.add(7, messageSent.getJMSMessageID()); + TestUtil.logTrace("JMSMessageID......." + valueAtSend.get(7)); + + valueAtSend.add(8, messageSent.getJMSCorrelationID()); + TestUtil.logTrace("JMSCorrelationID..." + valueAtSend.get(8)); + + return valueAtSend; + } + + public String receiveTextMessage_CQ() { + TextMessage receivedM = null; + String tmp = null; + try { + // get ConnectionFactory and Connection + common_Q(); + conn.start(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // create default consumer + TestUtil.logTrace("Creating MessageConsumer"); + MessageConsumer receiver = sess.createConsumer(testDestination); + + receivedM = (TextMessage) receiver.receive(timeout); + tmp = receivedM.getText(); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveTextMessage_CQ: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in receiveTextMessage_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveTextMessage_CQ" + ce.getMessage(), ce); + } + } + } + return tmp; + } + + public String receiveMessageS_CQ(String selector) { + TextMessage receivedM = null; + String tmp = null; + + try { + // get ConnectionFactory and Connection + common_Q(); + conn.start(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default consumer + TestUtil.logTrace("Creating MessageConsumer"); + MessageConsumer receiver = sess.createConsumer(testDestination, selector); + + receivedM = (TextMessage) receiver.receive(timeout); + tmp = receivedM.getText(); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveMessageS_CQ: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in receiveMessageS_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveMessageS_CQ" + ce.getMessage(), ce); + } + } + } + return tmp; + } + + public int browseTextMessage_CQ(int num, String message) { + QueueBrowser browseAll = null; + int msgCount = 0; + int totalMsg = 0; + TextMessage tempMsg = null; + try { + // get ConnectionFactory and Connection + common_Q(); + conn.start(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create browser + TestUtil.logTrace("Creating QueueBrowser"); + browseAll = sess.createBrowser((Queue) testDestination); + + // getting Emumeration that contains at least two test messages + // without getting into dead loop. + // Workaround for possible timing problem + Enumeration msgs = null; + int i = 0; + do { + i++; + msgCount = 0; + totalMsg = 0; + msgs = browseAll.getEnumeration(); + TestUtil.logTrace("getting Enumeration " + i); + while (msgs.hasMoreElements()) { + tempMsg = (TextMessage) msgs.nextElement(); + totalMsg++; + if (!(tempMsg.getText().indexOf(message) < 0)) + msgCount++; + } + TestUtil.logTrace("found " + msgCount + " messages total in browser"); + } while ((msgCount < num) && (i < 10)); + + } catch (Exception e) { + TestUtil.logErr("Failed to browse message in browseTextMessage_CQ: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in browseTextMessage_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in browseTextMessage_CQ" + ce.getMessage(), ce); + } + } + } + return totalMsg; + } + + public int browseMessageS_CQ(int num, String message, String selector) { + QueueBrowser selectiveBrowser = null; + int msgCount = 0; + int totalMsg = 0; + TextMessage tempMsg = null; + + try { + // get ConnectionFactory and Connection + common_Q(); + conn.start(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create browser + TestUtil.logTrace("Creating QueueBrowser"); + selectiveBrowser = sess.createBrowser((Queue) testDestination, selector); + + // getting Emumeration that contains at least two test messages + // without getting into dead loop. + // Workaround for possible timing problem + Enumeration msgs = null; + int i = 0; + do { + i++; + msgCount = 0; + totalMsg = 0; + msgs = selectiveBrowser.getEnumeration(); + TestUtil.logTrace("getting Enumeration " + i); + while (msgs.hasMoreElements()) { + tempMsg = (TextMessage) msgs.nextElement(); + totalMsg++; + if (!(tempMsg.getText().indexOf(message) < 0)) + msgCount++; + } + TestUtil.logTrace("found " + msgCount + " messages total in browser"); + } while ((msgCount < num) && (i < 10)); + + } catch (Exception e) { + TestUtil.logErr("Failed to browse message in browseMessageS_CQ: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in browseMessageS_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in browseMessageS_CQ" + ce.getMessage(), ce); + } + } + } + return totalMsg; + } + + public ArrayList sendMessageP_CQ(String TestName, String message, boolean val) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + // get ConnectionFactory and Connection + common_Q(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + MessageProducer sender = sess.createProducer(testDestination); + + TestUtil.logMsg("Creating 1 TextMessage"); + messageSent = sess.createTextMessage(); + messageSent.setText(message); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + messageSent.setBooleanProperty("lastMessage", val); + + TestUtil.logMsg("Sending a TextMessage"); + timeBeforeSend = System.currentTimeMillis(); + sender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendMessageP_CQ"); + TestUtil.printStackTrace(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in sendMessageP_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in sendMessageP_CQ" + ce.getMessage(), ce); + } + } + } + return valueAtSend; + } + + public ArrayList sendMessagePP_CQ(String TestName, String message, boolean val, String p, String value) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + // get ConnectionFactory and Connection + common_Q(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + MessageProducer sender = sess.createProducer(testDestination); + + TestUtil.logMsg("Creating 1 TextMessage"); + messageSent = sess.createTextMessage(); + messageSent.setText(message); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + messageSent.setStringProperty(p, value); + messageSent.setBooleanProperty("lastMessage", val); + + TestUtil.logMsg("Sending a TextMessage"); + timeBeforeSend = System.currentTimeMillis(); + sender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendMessagePP_CQ"); + TestUtil.printStackTrace(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in sendMessagePP_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in sendMessagePP_CQ" + ce.getMessage(), ce); + } + } + } + return valueAtSend; + } + + public ArrayList sendTextMessage_CT(String TestName, String message) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + // get ConnectionFactory and Connection + common_T(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + MessageProducer sender = sess.createProducer(testDestination); + + TestUtil.logMsg("Creating 1 TextMessage"); + messageSent = sess.createTextMessage(); + messageSent.setText(message); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + + TestUtil.logMsg("Sending a TextMessage"); + timeBeforeSend = System.currentTimeMillis(); + sender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendTextMessage_CT"); + TestUtil.printStackTrace(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in sendTextMessage_CT"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in sendTextMessage_CT" + ce.getMessage(), ce); + } + } + } + return valueAtSend; + } + + public String receiveTextMessage_CT() { + TextMessage receivedM = null; + String tmp = null; + + try { + // get ConnectionFactory and Connection + common_T(); + conn.start(); + + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default consumer + TestUtil.logTrace("Creating MessageConsumer"); + MessageConsumer receiver = sess.createConsumer(testDestination); + + receivedM = (TextMessage) receiver.receive(timeout); + tmp = receivedM.getText(); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveTextMessage_CT: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in receiveTextMessage_CT"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveTextMessage_CT" + ce.getMessage(), ce); + } + } + } + return tmp; + } + + public int getAck_CT() { + int mode = 0; + + try { + common_T(); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + mode = sess.getAcknowledgeMode(); + TestUtil.logTrace("AcknowledgeMode is set at " + Session.AUTO_ACKNOWLEDGE); + TestUtil.logTrace("AcknowledgeMode returned as " + mode); + } catch (Exception e) { + TestUtil.logErr("Failed to getAcknowledgeMode: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in getAck_CT"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in getAck_CT():" + ce.getMessage(), ce); + } + } + } + return mode; + } + + public int getAck_CQ() { + int mode = 0; + + try { + common_Q(); + Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); + mode = sess.getAcknowledgeMode(); + } catch (Exception e) { + TestUtil.logErr("Failed to getAcknowledgeMode: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in getAck_CQ"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in getAck_CQ():" + ce.getMessage(), ce); + } + } + } + return mode; + } + + public boolean getQueue() { + QueueBrowser browseAll = null; + boolean pass = true; + + try { + common_Q(); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create browser + TestUtil.logTrace("Creating QueueBrowser"); + browseAll = sess.createBrowser((Queue) testDestination); + + if (!browseAll.getQueue().toString().equals(testDestination.toString())) { + pass = false; + TestUtil.logErr("Error: QueueBrowser.getQueue test failed"); + TestUtil.logErr("QueueBrowser.getQueue=" + browseAll.getQueue().toString() + "."); + TestUtil.logErr("testDestination=" + testDestination.toString() + "."); + } + browseAll.close(); + + } catch (Exception e) { + TestUtil.logErr("Failed to getQueue: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in getQueue"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in getQueue():" + ce.getMessage(), ce); + } + } + } + return pass; + } + + public boolean getSelector(String selector) { + QueueBrowser selectiveBrowser = null; + boolean pass = true; + + try { + common_Q(); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create browser + TestUtil.logTrace("Creating QueueBrowser"); + selectiveBrowser = sess.createBrowser((Queue) testDestination, selector); + + String tmp = selectiveBrowser.getMessageSelector(); + if (tmp.indexOf("TEST") < 0 || tmp.indexOf("test") < 0) { + pass = false; + TestUtil.logErr("Error: QueueBrowser.getMessageSelector test failed"); + TestUtil.logErr("selectiveBrowser.getMessageSelector()=" + selectiveBrowser.getMessageSelector()); + } + + selectiveBrowser.close(); + } catch (Exception e) { + TestUtil.logErr("Failed to getMessageSelector: ", e); + throw new EJBException(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in getSelector"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in getSelector():" + ce.getMessage(), ce); + } + } + } + return pass; + } + + public ArrayList sendTextMessage_Q(String TestName) { + return sendTextMessage_Q(TestName, null, false, DeliveryMode.PERSISTENT, true); + } + + public ArrayList sendTextMessage_Q(String TestName, String text) { + return sendTextMessage_Q(TestName, text, false, DeliveryMode.PERSISTENT, true); + } + + public ArrayList sendTextMessage_Q(String TestName, boolean setDest) { + return sendTextMessage_Q(TestName, null, setDest, DeliveryMode.PERSISTENT, true); + } + + public ArrayList sendTextMessage_Q(String TestName, boolean setDest, int mode) { + return sendTextMessage_Q(TestName, null, setDest, mode, true); + } + + public ArrayList sendTextMessage_Q(String TestName, String text, boolean setDest, int mode) { + return sendTextMessage_Q(TestName, text, setDest, mode, true); + } + + public ArrayList sendTextMessage_Q(String TestName, String text, Queue testQueue) { + return sendTextMessage_Q(TestName, text, false, DeliveryMode.PERSISTENT, false); + } + + private ArrayList sendTextMessage_Q(String TestName, String text, boolean setDest, int mode, boolean setQueue) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + QueueSender qsender = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + + // create default QueueSession + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueSender + TestUtil.logTrace("Creating QueueSender"); + if (setQueue) + qsender = qsess.createSender(queue); + else + qsender = qsess.createSender((Queue) null); + qsender.setPriority(priority); + qsender.setTimeToLive(forever); + if (mode != DeliveryMode.PERSISTENT) + qsender.setDeliveryMode(mode); + + TestUtil.logMsg("Creating 1 TextMessage"); + messageSent = qsess.createTextMessage(); + + if (text != null) + messageSent.setText(text); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + messageSent.setJMSCorrelationID(jmsCorrelationID); + messageSent.setJMSType(type); + + if (setDest) + messageSent.setJMSReplyTo(queue); + + // ----------------------------------------------------------------------------- + TestUtil.logMsg("Sending a TextMessage"); + timeBeforeSend = System.currentTimeMillis(); + if (setQueue) + qsender.send(messageSent); + else + qsender.send(queue, messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendTextMessage_Q", e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing QueueConnection in sendTextMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing QueueConnection in sendTextMessage_Q", ce); + } + } + } + return valueAtSend; + } + + /* + * public String receiveTextMessage_Q() { TextMessage receivedM = null; String tmp = null; + * + * try { //get QueueConnectionFactory and QueueConnection setup_Q(); qconn.start(); + * + * // create default Session TestUtil.logTrace("Creating QueueSession"); QueueSession qsess = + * qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + * + * // create default QueueReceiver TestUtil.logTrace("Creating QueueReceiver"); QueueReceiver qreceiver = + * qsess.createReceiver(queue); + * + * receivedM = (TextMessage) qreceiver.receive(timeout); tmp = receivedM.getText(); } catch (Exception e ) { + * TestUtil.logErr("Failed to receive a message in receiveTextMessage_Q: ", e); throw new EJBException(e); } finally { + * if ( qconn != null) { try { TestUtil.logTrace("Closing Connection in receiveTextMessage_Q"); qconn.close(); } catch + * (Exception ce) { TestUtil.logErr("Error closing conn in receiveTextMessage_Q" + ce.getMessage(), ce); } } } return + * tmp; } + */ + + public ArrayList sendFullBytesMessage_Q(String TestName) { + return sendBytesMessage_Q(TestName, false, DeliveryMode.PERSISTENT); + } + + public ArrayList sendBytesMessage_Q(String TestName, boolean setDest) { + return sendBytesMessage_Q(TestName, setDest, DeliveryMode.PERSISTENT); + } + + public ArrayList sendBytesMessage_Q(String TestName, boolean setDest, int mode) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + + // create default QueueSession + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueSender + TestUtil.logTrace("Creating QueueSender"); + QueueSender qsender = qsess.createSender(queue); + qsender.setPriority(priority); + qsender.setTimeToLive(forever); + if (mode != DeliveryMode.PERSISTENT) + qsender.setDeliveryMode(mode); + + TestUtil.logMsg("Creating 1 BytesMessage"); + messageSentB = qsess.createBytesMessage(); + + messageSentB.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + messageSentB.setJMSCorrelationID(jmsCorrelationID); + messageSentB.setJMSType(type); + + if (setDest) + messageSentB.setJMSReplyTo(queue); + + // ----------------------------------------------------------------------------- + TestUtil.logMsg("Writing one of each primitive type to the message"); + + // ----------------------------------------------------------------------------- + messageSentB.writeBoolean(booleanValue); + messageSentB.writeByte(byteValue); + messageSentB.writeByte(byteValue1); + messageSentB.writeChar(charValue); + messageSentB.writeDouble(doubleValue); + messageSentB.writeFloat(floatValue); + messageSentB.writeInt(intValue); + messageSentB.writeLong(longValue); + messageSentB.writeObject(nInteger); + messageSentB.writeShort(shortValue); + messageSentB.writeShort(shortValue1); + messageSentB.writeUTF(utfValue); + messageSentB.writeBytes(bytesValue); + messageSentB.writeBytes(bytesValue, 0, 1); + + TestUtil.logMsg("Sending a BytesMessage"); + timeBeforeSend = System.currentTimeMillis(); + qsender.send(messageSentB); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSentB, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendFullBytesMessage_Q", e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing QueueConnection in sendFullBytesMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing QueueConnection in sendFullBytesMessage_Q", ce); + } + } + } + return valueAtSend; + } + + public boolean verifyFullBytesMessage() { + TestUtil.logTrace("In verifyFullBytesMessage ..."); + + BytesMessage messageReceived = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + qconn.start(); + + // create default Session + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueReceiver + TestUtil.logTrace("Creating QueueReceiver"); + QueueReceiver qreceiver = qsess.createReceiver(queue); + + messageReceived = (BytesMessage) qreceiver.receive(timeout); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in verifyFullBytesMessage: ", e); + throw new EJBException(e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing Connection in verifyFullBytesMessage"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in verifyFullBytesMessage", ce); + } + } + } + + boolean pass = true; + + try { + if (!messageReceived.readBoolean() == booleanValue) { + TestUtil.logErr("Error: boolean not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readByte() != byteValue) { + TestUtil.logErr("Error: Byte not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + int tmp = messageReceived.readUnsignedByte(); + + if (tmp != byteValue2) { + TestUtil.logErr("Fail: readUnsignedByte not returned expected value: " + tmp); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readChar() != charValue) { + TestUtil.logErr("Fail: char not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readDouble() != doubleValue) { + TestUtil.logErr("Fail: double not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readFloat() != floatValue) { + TestUtil.logErr("Fail: float not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readInt() != intValue) { + TestUtil.logErr("Fail: int not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readLong() != longValue) { + TestUtil.logErr("Fail: long not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readInt() != nInteger.intValue()) { + TestUtil.logErr("Fail: Integer not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (messageReceived.readShort() != shortValue) { + TestUtil.logErr("Fail: short not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + int tmps = messageReceived.readUnsignedShort(); + if (tmps != shortValue2) { + TestUtil.logErr("Fail: readUnsignedShort did not return expected value: " + tmps); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + if (!messageReceived.readUTF().equals(utfValue)) { + TestUtil.logErr("Fail: UTF not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + int nCount = messageReceived.readBytes(bytesValueRecvd); + + for (int i = 0; i < nCount; i++) { + if (bytesValueRecvd[i] != bytesValue[i]) { + TestUtil.logErr("Fail: bytes value incorrect"); + pass = false; + } + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + int nCount = messageReceived.readBytes(bytesValueRecvd); + + TestUtil.logTrace("count returned " + nCount); + if (bytesValueRecvd[0] != bytesValue[0]) { + TestUtil.logErr("Fail: bytes value incorrect"); + pass = false; + } + + if (nCount != 1) { + TestUtil.logErr("Error: count not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + + try { + long length = 37l; + long tmpl = messageReceived.getBodyLength(); + if (tmpl < length) { + TestUtil.logErr("getBodyLength test failed with incorrect length=" + tmpl); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: unexpected exception was thrown", e); + pass = false; + } + return pass; + } + + public ArrayList sendFullMapMessage_Q(String testName) { + return sendMapMessage_Q(testName, false, DeliveryMode.PERSISTENT); + } + + public ArrayList sendMapMessage_Q(String testName, boolean setDest) { + return sendMapMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); + } + + public ArrayList sendMapMessage_Q(String testName, boolean setDest, int mode) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + setup_Q(); + + MapMessage messageSent = null; + MapMessage msgReceivedM = null; + + // create default QueueSession + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueSender + TestUtil.logTrace("Creating QueueSender"); + QueueSender qsender = qsess.createSender(queue); + qsender.setPriority(priority); + qsender.setTimeToLive(forever); + if (mode != DeliveryMode.PERSISTENT) + qsender.setDeliveryMode(mode); + + TestUtil.logMsg("Creating 1 MapMessage"); + messageSent = qsess.createMapMessage(); + + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); + messageSent.setJMSCorrelationID(jmsCorrelationID); + messageSent.setJMSType(type); + + if (setDest) + messageSent.setJMSReplyTo(queue); + + messageSent.setBoolean("booleanValue", booleanValue); + messageSent.setByte("byteValue", byteValue); + messageSent.setBytes("bytesValue", bytesValue); + messageSent.setBytes("bytesValue2", bytesValue, 0, 1); + messageSent.setChar("charValue", charValue); + messageSent.setDouble("doubleValue", doubleValue); + messageSent.setFloat("floatValue", floatValue); + messageSent.setInt("intValue", intValue); + messageSent.setLong("longValue", longValue); + messageSent.setObject("nInteger", nInteger); + messageSent.setShort("shortValue", shortValue); + messageSent.setString("stringValue", stringValue); + messageSent.setString("nullTest", null); + + TestUtil.logTrace("Sending a MapMessage..."); + timeBeforeSend = System.currentTimeMillis(); + qsender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendFullMapMessage_Q", e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing QueueConnection in sendFullMapMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing QueueConnection in sendFullMapMessage_Q", ce); + } + } + } + return valueAtSend; + } + + public boolean verifyFullMapMessage() { + boolean pass = true; + MapMessage msgReceivedM = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + qconn.start(); + + // create default Session + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueReceiver + TestUtil.logTrace("Creating QueueReceiver"); + QueueReceiver qreceiver = qsess.createReceiver(queue); + + msgReceivedM = (MapMessage) qreceiver.receive(timeout); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in verifyFullMapMessage: ", e); + throw new EJBException(e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing Connection in verifyFullMapMessage"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in verifyFullMapMessage", ce); + } + } + } + + try { + if (msgReceivedM.getBoolean("booleanValue") != booleanValue) { + TestUtil.logErr("Fail: invalid boolean returned: " + msgReceivedM.getBoolean("booleanValue")); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getByte("byteValue") != byteValue) { + TestUtil.logErr("Fail: invalid byte returned: " + msgReceivedM.getByte("byteValue")); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + byte[] b = msgReceivedM.getBytes("bytesValue"); + + for (int i = 0; i < b.length; i++) { + if (b[i] != bytesValue[i]) { + TestUtil.logErr("Fail: byte array " + i + " not valid: " + b[i]); + pass = false; + } + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + byte[] b = msgReceivedM.getBytes("bytesValue2"); + + if (b[0] != bytesValue[0]) { + TestUtil.logErr("Fail: byte array not valid " + b[0]); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getChar("charValue") != charValue) { + TestUtil.logErr("Fail: invalid char returned: " + msgReceivedM.getChar("charValue")); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getDouble("doubleValue") != doubleValue) { + TestUtil.logErr("Fail: invalid double returned: " + msgReceivedM.getDouble("doubleValue")); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getFloat("floatValue") != floatValue) { + TestUtil.logErr("Fail: invalid float returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getInt("intValue") != intValue) { + TestUtil.logErr("Fail: invalid int returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getLong("longValue") != longValue) { + TestUtil.logErr("Fail: invalid long returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (!msgReceivedM.getObject("nInteger").toString().equals(nInteger.toString())) { + TestUtil.logErr("Fail: invalid object returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getShort("shortValue") != shortValue) { + TestUtil.logErr("Fail: invalid short returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (!msgReceivedM.getString("stringValue").equals(stringValue)) { + TestUtil.logErr("Fail: invalid string returned"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + + try { + if (msgReceivedM.getString("nullTest") != null) { + TestUtil.logErr("Fail: null not returned from getString: " + msgReceivedM.getString("nullTest")); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Fail: unexpected exception " + e.getClass().getName() + " was returned", e); + pass = false; + } + return pass; + } + + public ArrayList sendFullStreamMessage_Q(String testName) { + return sendStreamMessage_Q(testName, false, DeliveryMode.PERSISTENT); + } + + public ArrayList sendStreamMessage_Q(String testName, boolean setDest) { + return sendStreamMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); + } + + public ArrayList sendStreamMessage_Q(String testName, boolean setDest, int mode) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + setup_Q(); + + StreamMessage messageSent = null; + + // create default QueueSession + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueSender + TestUtil.logTrace("Creating QueueSender"); + QueueSender qsender = qsess.createSender(queue); + qsender.setPriority(priority); + qsender.setTimeToLive(forever); + if (mode != DeliveryMode.PERSISTENT) + qsender.setDeliveryMode(mode); + + TestUtil.logMsg("Creating 1 StreamMessage"); + messageSent = qsess.createStreamMessage(); + + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); + messageSent.setJMSCorrelationID(jmsCorrelationID); + messageSent.setJMSType(type); + + if (setDest) + messageSent.setJMSReplyTo(queue); + + messageSent.writeBytes(byteValues2, 0, byteValues.length); + messageSent.writeBoolean(booleanValue); + messageSent.writeByte(byteValue); + messageSent.writeBytes(byteValues); + messageSent.writeChar(charValue); + messageSent.writeDouble(doubleValue); + messageSent.writeFloat(floatValue); + messageSent.writeInt(intValue); + messageSent.writeLong(longValue); + messageSent.writeObject(sTesting); + messageSent.writeShort(shortValue); + messageSent.writeString(stringValue); + messageSent.writeObject(null); + + TestUtil.logTrace("Sending a StreamMessage ..."); + timeBeforeSend = System.currentTimeMillis(); + qsender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + + valueAtSend = logPropertyAtSend(messageSent, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendFullStreamMessage_Q", e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing QueueConnection in sendFullStreamMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing QueueConnection in sendFullStreamMessage_Q", ce); + } + } + } + return valueAtSend; + } + + public boolean verifyFullStreamMessage() { + TestUtil.logTrace("In verifyFullStreamMessage"); + + boolean pass = true; + StreamMessage messageReceived = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + qconn.start(); + + // create default Session + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueReceiver + TestUtil.logTrace("Creating QueueReceiver"); + QueueReceiver qreceiver = qsess.createReceiver(queue); + + messageReceived = (StreamMessage) qreceiver.receive(timeout); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in verifyFullStreamMessage: ", e); + throw new EJBException(e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing Connection in verifyFullStreamMessage"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in verifyFullStreamMessage", ce); + } + } + } + + try { + int nCount; + do { + nCount = messageReceived.readBytes(byteValuesReturned2); + TestUtil.logTrace("nCount is " + nCount); + if (nCount != -1) { + for (int i = 0; i < byteValuesReturned2.length; i++) { + if (byteValuesReturned2[i] != byteValues2[i]) { + TestUtil.logErr("Fail: byte[] " + i + " is not valid =" + byteValuesReturned2[i]); + pass = false; + } + } + } + } while (nCount >= byteValuesReturned2.length); + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readBoolean() != booleanValue) { + TestUtil.logErr("Fail: boolean not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readByte() != byteValue) { + TestUtil.logErr("Fail: Byte not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + int nCount; + do { + nCount = messageReceived.readBytes(byteValuesReturned); + TestUtil.logTrace("nCount is " + nCount); + if (nCount != -1) { + for (int i = 0; i < byteValuesReturned.length; i++) { + if (byteValuesReturned[i] != byteValues[i]) { + TestUtil.logErr("Fail: byte[] " + i + " is not valid"); + pass = false; + } + } + } + } while (nCount >= byteValuesReturned.length); + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readChar() != charValue) { + TestUtil.logErr("Fail: char not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readDouble() != doubleValue) { + TestUtil.logErr("Fail: double not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readFloat() != floatValue) { + TestUtil.logErr("Fail: float not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readInt() != intValue) { + TestUtil.logErr("Fail: int not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readLong() != longValue) { + TestUtil.logErr("Fail: long not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (!messageReceived.readObject().equals(sTesting)) { + TestUtil.logErr("Fail: object not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readShort() != shortValue) { + TestUtil.logErr("Fail: short not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (!messageReceived.readString().equals(stringValue)) { + TestUtil.logErr("Fail: string not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + try { + if (messageReceived.readObject() != null) { + TestUtil.logErr("Fail: object not returned as expected"); + pass = false; + } + } catch (Exception e) { + TestUtil.logErr("Error: exception was thrown in verifyFullStreamMessage: ", e); + pass = false; + } + + return pass; + } + + public ArrayList sendObjectMessage_Q(String testName) { + return sendObjectMessage_Q(testName, false, DeliveryMode.PERSISTENT); + } + + public ArrayList sendObjectMessage_Q(String testName, boolean setDest) { + return sendObjectMessage_Q(testName, setDest, DeliveryMode.PERSISTENT); + } + + public ArrayList sendObjectMessage_Q(String testName, boolean setDest, int mode) { + ArrayList valueAtSend = null; + long timeBeforeSend = 0L; + long timeAfterSend = 0L; + + try { + setup_Q(); + + ObjectMessage messageSent = null; + + // create default QueueSession + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueSender + TestUtil.logTrace("Creating QueueSender"); + QueueSender qsender = qsess.createSender(queue); + qsender.setPriority(priority); + qsender.setTimeToLive(forever); + if (mode != DeliveryMode.PERSISTENT) + qsender.setDeliveryMode(mode); + + TestUtil.logMsg("Creating 1 ObjectMessage"); + messageSent = qsess.createObjectMessage(); + + messageSent.setObject(String.valueOf("HeaderIDTest for ObjectMessage")); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", testName); + messageSent.setJMSCorrelationID(jmsCorrelationID); + messageSent.setJMSType(type); + + if (setDest) + messageSent.setJMSReplyTo(queue); + + TestUtil.logTrace("Sending an ObjectMessage..."); + timeBeforeSend = System.currentTimeMillis(); + qsender.send(messageSent); + timeAfterSend = System.currentTimeMillis(); + valueAtSend = logPropertyAtSend(messageSentB, timeBeforeSend, timeAfterSend); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendObjectMessage_Q", e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing QueueConnection in sendObjectMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing QueueConnection in sendObjectMessage_Q", ce); + } + } + } + return valueAtSend; + } + + public ObjectMessage receiveObjectMessage_Q() { + ObjectMessage receivedM = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + qconn.start(); + + // create default Session + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueReceiver + TestUtil.logTrace("Creating QueueReceiver"); + QueueReceiver qreceiver = qsess.createReceiver(queue); + + receivedM = (ObjectMessage) qreceiver.receive(timeout); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveObjectMessage_Q: ", e); + throw new EJBException(e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing Connection in receiveObjectMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveObjectMessage_Q" + ce.getMessage(), ce); + } + } + } + return receivedM; + } + + public Message receiveMessage_Q() { + Message receivedM = null; + + try { + // get QueueConnectionFactory and QueueConnection + setup_Q(); + qconn.start(); + + // create default Session + TestUtil.logTrace("Creating QueueSession"); + QueueSession qsess = qconn.createQueueSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default QueueReceiver + TestUtil.logTrace("Creating QueueReceiver"); + QueueReceiver qreceiver = qsess.createReceiver(queue); + + receivedM = (Message) qreceiver.receive(timeout); + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveMessage_Q: ", e); + throw new EJBException(e); + } finally { + if (qconn != null) { + try { + TestUtil.logTrace("Closing Connection in receiveMessage_Q"); + qconn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveMessage_Q" + ce.getMessage(), ce); + } + } + } + return receivedM; + } + + public String getMessageID() { + Message msg = receiveMessage_Q(); + + String id = null; + try { + id = msg.getJMSMessageID(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSMessageID in getMessageID: ", e); + } + return id; + } + + public long getTimeStamp() { + Message msg = receiveMessage_Q(); + long JMSTimestamp = 0L; + try { + JMSTimestamp = msg.getJMSTimestamp(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSTimestamp in getTimeStamp: ", e); + } + return JMSTimestamp; + } + + public String getCorrelationID() { + String jmsCorrelationID = null; + Message msg = receiveMessage_Q(); + + try { + jmsCorrelationID = msg.getJMSCorrelationID(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSCorrelationID in getCorrelationID: ", e); + } + return jmsCorrelationID; + } + + public String getReplyTo() { + Message msg = receiveMessage_Q(); + Destination replyto = null; + + try { + replyto = msg.getJMSReplyTo(); + if (replyto != null) + return ((Queue) replyto).getQueueName(); + else + return null; + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSReplyTo in getReplyTo: ", e); + return null; + } + } + + public String getType() { + Message msg = receiveMessage_Q(); + String jmsType = null; + + try { + jmsType = msg.getJMSType(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSType in getType: ", e); + } + return jmsType; + } + + public int getPriority() { + Message msg = receiveMessage_Q(); + int jmsPriority = 0; + + try { + jmsPriority = msg.getJMSPriority(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSPriority in getPriority: ", e); + } + return jmsPriority; + } + + public long getExpiration() { + Message msg = receiveMessage_Q(); + long jmsExpiration = 0L; + + try { + jmsExpiration = msg.getJMSExpiration(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSExpiration in getExpiration: ", e); + } + return jmsExpiration; + } + + public String getDestination_1() { + String tmp = null; + try { + TestUtil.logTrace("Getting Destination " + TESTQUEUENAME); + Destination dest = (Destination) nctx.lookup(TESTQUEUENAME); + tmp = ((Queue) dest).getQueueName(); + + } catch (Exception e) { + TestUtil.logErr("Exception in getDestination_1: ", e); + } + return tmp; + } + + public String getDestination() { + Message msg = receiveMessage_Q(); + String tmp = null; + + try { + tmp = ((Queue) msg.getJMSDestination()).getQueueName(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSDestination in getDestination: ", e); + } + return tmp; + } + + public int getDeliveryMode() { + Message msg = receiveMessage_Q(); + int jmsMode = 0; + + try { + jmsMode = msg.getJMSDeliveryMode(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getJMSDeliveryMode in getDeliveryMode: ", e); + } + return jmsMode; + } + + public String getText() { + Message msg = receiveMessage_Q(); + String text = null; + + try { + text = ((TextMessage) msg).getText(); + } catch (Exception e) { + TestUtil.logErr("Exception calling getText in getText: ", e); + } + return text; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java similarity index 81% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java index 2c4475be67..2a63d1bd24 100644 --- a/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsT.java @@ -25,13 +25,13 @@ @Remote public interface TestsT { - public void initLogging(Properties p); + public void initLogging(Properties p); - public void remove(); + public void remove(); - public void sendTextMessage_CT(String testname, String text); + public void sendTextMessage_CT(String testname, String text); - public String receiveTextMessage_CT(); + public String receiveTextMessage_CT(); - public void common_T_setup(); + public void common_T_setup(); } diff --git a/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java new file mode 100644 index 0000000000..9d05691519 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/TestsTEJB.java @@ -0,0 +1,254 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id: TestsTEJB.java 59995 2009-10-14 12:05:29Z af70133 $ + */ +package com.sun.ts.tests.jms.commonee; + +import java.util.Properties; + +import com.sun.ts.lib.util.RemoteLoggingInitException; +import com.sun.ts.lib.util.TSNamingContext; +import com.sun.ts.lib.util.TestUtil; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.Resource; +import jakarta.ejb.EJBException; +import jakarta.ejb.PostActivate; +import jakarta.ejb.PrePassivate; +import jakarta.ejb.Remote; +import jakarta.ejb.Remove; +import jakarta.ejb.SessionContext; +import jakarta.ejb.Stateful; +import jakarta.jms.Connection; +import jakarta.jms.ConnectionFactory; +import jakarta.jms.Destination; +import jakarta.jms.MessageProducer; +import jakarta.jms.Session; +import jakarta.jms.TextMessage; +import jakarta.jms.Topic; +import jakarta.jms.TopicSubscriber; + +@Stateful +@Remote(TestsT.class) +public class TestsTEJB implements TestsT { + + @Resource + private SessionContext sessionContext; + + private Properties harnessProps = null; + + private TSNamingContext nctx = null; + + private transient Destination testDestination = null; + + private transient ConnectionFactory cf = null; + + private transient Connection conn = null; + + private transient Connection connr = null; + + private static final String TESTTOPICNAME = "java:comp/env/jms/MY_TOPIC"; + + private static final String DURABLETOPICCONNECTIONFACTORY = "java:comp/env/jms/DURABLE_SUB_CONNECTION_FACTORY"; + + private String name = "ctssub"; + + private String username = null; + + private String password = null; + + private long timeout; + + public TestsTEJB() { + TestUtil.logTrace("TestsTEJB => default constructor called"); + } + + public void initLogging(Properties p) { + TestUtil.logTrace("initLogging"); + harnessProps = p; + try { + TestUtil.logMsg("initialize remote logging"); + TestUtil.init(p); + timeout = Long.parseLong(TestUtil.getProperty(harnessProps, "jms_timeout")); + username = TestUtil.getProperty(harnessProps, "user"); + password = TestUtil.getProperty(harnessProps, "password"); + // check props for errors + if (timeout < 1) { + throw new EJBException("'jms_timeout' (milliseconds) in ts.jte must be > 0"); + } + if (username == null) { + throw new EJBException("'user' in ts.jte must be null"); + } + if (password == null) { + throw new EJBException("'password' in ts.jte must be null"); + } + if (sessionContext == null) { + throw new EJBException("@Resource injection failed"); + } + } catch (RemoteLoggingInitException e) { + TestUtil.printStackTrace(e); + throw new EJBException("initLogging: Failed!", e); + } + } + + @PostConstruct + public void postConstruct() { + TestUtil.logTrace("postConstruct"); + try { + TestUtil.logMsg("obtain naming context"); + nctx = new TSNamingContext(); + } catch (Exception e) { + TestUtil.printStackTrace(e); + throw new EJBException("unable to obtain naming context"); + } + } + + @PostActivate + public void activate() { + TestUtil.logTrace("activate"); + try { + TestUtil.logTrace("Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); + + TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); + testDestination = (Destination) nctx.lookup(TESTTOPICNAME); + + } catch (Exception ex) { + TestUtil.logErr("Unexpected Exception in Activate: ", ex); + } + } + + @PrePassivate + public void passivate() { + TestUtil.logTrace("passivate"); + testDestination = null; + cf = null; + conn = null; + connr = null; + } + + @Remove + public void remove() { + TestUtil.logTrace("remove"); + } + + private void common_T() throws Exception { + + TestUtil.logTrace("Getting ConnectionFactory " + DURABLETOPICCONNECTIONFACTORY); + cf = (ConnectionFactory) nctx.lookup(DURABLETOPICCONNECTIONFACTORY); + + TestUtil.logTrace("Getting Destination " + TESTTOPICNAME); + testDestination = (Destination) nctx.lookup(TESTTOPICNAME); + + } + + public void common_T_setup() { + try { + common_T(); + + connr = cf.createConnection(username, password); + + Session sessr = connr.createSession(true, Session.AUTO_ACKNOWLEDGE); + TopicSubscriber recr = sessr.createDurableSubscriber((Topic) testDestination, name); + recr.close(); + } catch (Exception el) { + TestUtil.printStackTrace(el); + TestUtil.logErr("Failed to set up Consumer for Topic", el); + } finally { + try { + connr.close(); + } catch (Exception e) { + TestUtil.logErr("Exception closing receiving Connection:", e); + } + } + } + + public void sendTextMessage_CT(String TestName, String message) { + try { + // get ConnectionFactory and Connection + common_T(); + + // create default connection + TestUtil.logTrace("Creating Connection with username, " + username + " password, " + password); + conn = cf.createConnection(username, password); + // create default Session + TestUtil.logTrace("Creating Session"); + Session sess = conn.createSession(true, Session.AUTO_ACKNOWLEDGE); + + // create default consumer/producer + TestUtil.logTrace("Creating messageProducer"); + MessageProducer sender = sess.createProducer(testDestination); + + TestUtil.logMsg("Creating 1 message"); + TextMessage messageSent = sess.createTextMessage(); + messageSent.setText(message); + messageSent.setStringProperty("COM_SUN_JMS_TESTNAME", TestName); + TestUtil.logMsg("Sending message"); + sender.send(messageSent); + sender.close(); + + } catch (Exception e) { + TestUtil.logErr("Failed to send a Message in sendTextMessage_CQ"); + TestUtil.printStackTrace(e); + } finally { + if (conn != null) { + try { + TestUtil.logTrace("Closing Connection in sendTextMessage_CT"); + conn.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in sendTextMessage_CQ" + ce.getMessage(), ce); + } + } + } + } + + public String receiveTextMessage_CT() { + TextMessage receivedM = null; + String tmp = null; + + try { + // create default connection + TestUtil.logTrace("Creating Connection with username, " + username + " password, " + password); + connr = cf.createConnection(username, password); + + connr.start(); + Session sessr = connr.createSession(true, Session.AUTO_ACKNOWLEDGE); + TopicSubscriber recr = sessr.createDurableSubscriber((Topic) testDestination, name); + receivedM = (TextMessage) recr.receive(timeout); + recr.close(); + + if (receivedM != null) + tmp = receivedM.getText(); + else + return null; + } catch (Exception e) { + TestUtil.logErr("Failed to receive a message in receiveTextMessage_CT: ", e); + throw new EJBException(e); + } finally { + if (connr != null) { + try { + TestUtil.logTrace("Closing Connection in receiveTextMessage_CT"); + connr.close(); + } catch (Exception ce) { + TestUtil.logErr("Error closing conn in receiveTextMessage_CT" + ce.getMessage(), ce); + } + } + } + return tmp; + } +} diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/build.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/build.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/build.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/build.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/cditestsmdb_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/cditestsmdb_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/cditestsmdb_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/cditestsmdb_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_asynch_receives_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_asynch_receives_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_asynch_receives_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_asynch_receives_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptQ_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptQ_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptQ_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptQ_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptT_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptT_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptT_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_exceptT_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrQ_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrQ_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrQ_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrQ_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrT_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrT_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrT_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgHdrT_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsQ_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsQ_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsQ_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsQ_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsT_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsT_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsT_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgPropsT_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ1_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ1_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ1_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ2_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ2_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ2_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ3_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ3_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesQ3_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT1_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT1_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT1_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT1_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT2_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT2_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT2_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT2_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT3_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT3_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT3_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msgTypesT3_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msg_xa_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msg_xa_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msg_xa_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_msg_xa_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndQ_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndQ_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndQ_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndQ_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToQueue_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToQueue_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToQueue_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToQueue_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToTopic_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToTopic_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToTopic_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_sndToTopic_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_synchrec_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_synchrec_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_synchrec_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/mdb_synchrec_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_annotated_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_annotated_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_annotated_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_annotated_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_descriptor_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_descriptor_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_descriptor_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectorauto_descriptor_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_annotated_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_annotated_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_annotated_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_annotated_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_descriptor_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_descriptor_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_descriptor_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/queue_selectordups_descriptor_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_annotated_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_annotated_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_annotated_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_annotated_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_descriptor_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_descriptor_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_descriptor_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_noselnocidautodurable_descriptor_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_annotated_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_annotated_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_annotated_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_annotated_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_descriptor_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_descriptor_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_descriptor_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectorautociddurable_descriptor_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_annotated_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_annotated_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_annotated_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_annotated_ejb.jar.sun-ejb-jar.xml diff --git a/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_descriptor_ejb.jar.sun-ejb-jar.xml b/tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_descriptor_ejb.jar.sun-ejb-jar.xml similarity index 100% rename from common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_descriptor_ejb.jar.sun-ejb-jar.xml rename to tools/common/src/main/java/com/sun/ts/tests/jms/commonee/xml/descriptors/genericra/topic_selectordupsnondurable_descriptor_ejb.jar.sun-ejb-jar.xml diff --git a/tools/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java new file mode 100644 index 0000000000..13794fc655 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/client/AbstractUrlClient.java @@ -0,0 +1,244 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.servlet.common.client; + +import com.sun.ts.tests.common.webclient.BaseUrlClient; +import com.sun.ts.tests.common.webclient.http.HttpRequest; +import com.sun.ts.tests.common.webclient.WebTestCase; +import com.sun.ts.tests.servlet.common.util.Data; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.net.InetAddress; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.net.UnknownHostException; + +/** + * Base client for Servlet tests. + */ + +public abstract class AbstractUrlClient extends BaseUrlClient { + + protected final Logger logger = LoggerFactory.getLogger(getClass()); + + protected static final String APITEST = "apitest"; + + protected static final String DONOTUSEServletName = "NoServletName"; + + private InetAddress[] _addrs = null; + + private String _servlet = null; + + protected AbstractUrlClient() { + // Construct a default context root based on the class name of + // the concrete subclass of this class. + String cname = this.getClass().getName(); + String prefix = "com.sun.ts.tests."; + if (cname.startsWith(prefix)) + cname = cname.substring(prefix.length()); + String suffix = ".URLClient"; + if (cname.endsWith(suffix)) + cname = cname.substring(0, cname.length() - suffix.length()); + cname = cname.replace('.', '_'); + cname = "/" + cname + "_web"; + setContextRoot(cname); + } + + protected void setTestProperties(WebTestCase testCase) { + setStandardProperties(TEST_PROPS.getProperty(STANDARD), testCase); + setApiTestProperties(TEST_PROPS.getProperty(APITEST), testCase); + super.setTestProperties(testCase); + } + + /** + * Sets the request, testname, and a search string for test passed. A search is also added for test failure. If found, + * the test will fail. + * + * @param testValue - a logical test identifier + * @param testCase - the current test case + */ + private void setApiTestProperties(String testValue, WebTestCase testCase) { + if (testValue == null) { + return; + } + + // An API test consists of a request with a request parameter of + // testname, a search string of Test PASSED, and a logical test name. + + // set the testname + _testName = testValue; + + // set the request + StringBuilder sb = new StringBuilder(50); + if ((_servlet != null) && (TEST_PROPS.getProperty(DONOTUSEServletName) == null)) { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(_servlet).append("?testname=").append(testValue); + sb.append(HTTP11); + } else { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(testValue).append(HTTP10); + } + logger.debug("REQUEST LINE: {}", sb); + + HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + testCase.setRequest(req); + + if ((TEST_PROPS.getProperty(SEARCH_STRING) == null) || ((TEST_PROPS.getProperty(SEARCH_STRING)).equals(""))) { + testCase.setResponseSearchString(Data.PASSED); + testCase.setUnexpectedResponseSearchString(Data.FAILED); + } + + } + + /** + * Consists of a test name, a request, and a goldenfile. + * + * @param testValue - a logical test identifier + * @param testCase - the current test case + */ + private void setStandardProperties(String testValue, WebTestCase testCase) { + + if (testValue == null) { + return; + } + // A standard test sets consists of a testname + // a request, and a goldenfile. The URI is not used + // in this case since the JSP's are assumed to be located + // at the top of the contextRoot + StringBuffer sb = new StringBuffer(50); + + // set the testname + _testName = testValue; + + // set the request + // sb.append(GET).append(_contextRoot).append(SL); + // sb.append(testValue).append(JSP_SUFFIX).append(HTTP10); + // setRequest(sb.toString()); + // HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + // testCase.setRequest(req); + + if (_servlet != null) { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(_servlet).append("?testname=").append(testValue); + sb.append(HTTP11); + } else { + sb.append(GET).append(_contextRoot).append(SL); + sb.append(testValue).append(HTTP10); + } + logger.debug("REQUEST LINE: {}", sb); + HttpRequest req = new HttpRequest(sb.toString(), _hostname, _port); + testCase.setRequest(req); + } + + /** + * Sets the name of the servlet to use when building a request for a single servlet API test. + * + * @param servlet - the name of the servlet + */ + protected void setServletName(String servlet) { + _servlet = servlet; + } + + protected String getServletName() { + return _servlet; + } + + protected String getLocalInterfaceInfo(boolean returnAddresses) { + String result = null; + initInetAddress(); + if (_addrs.length != 0) { + StringBuilder sb = new StringBuilder(32); + if (!returnAddresses) { + // localhost might not show up if aliased + sb.append("localhost,"); + } else { + // add 127.0.0.1 + sb.append("127.0.0.1,"); + } + + for (int i = 0; i < _addrs.length; i++) { + if (returnAddresses) { + String ip = _addrs[i].getHostAddress(); + if (!ip.equals("127.0.0.1")) { + if (ip.contains("%")) { + int scope_id = ip.indexOf("%"); + ip = ip.substring(0, scope_id); + } + sb.append(ip); + } + } else { + String host = _addrs[i].getCanonicalHostName(); + if (!host.equals("localhost")) { + sb.append(host); + } + } + if (i + 1 != _addrs.length) { + sb.append(","); + } + } + result = sb.toString(); + logger.trace("[AbstractUrlClient] Interface info: {}", result); + } + return result; + } + + private void initInetAddress() { + if (_addrs == null) { + try { + _addrs = InetAddress.getAllByName(InetAddress.getLocalHost().getCanonicalHostName()); + } catch (UnknownHostException uhe) { + logger.info("[AbstractUrlClient][WARNING] Unable to obtain local host information."); + } + } + } + + protected String getRequest(String rq) { + return rq; + } + + protected String getURLString(String protocol, String hostname, int portnum, String sContext) { + return protocol + "://" + hostname + ":" + portnum + "/" + sContext; + } + + protected URL getURL(String protocol, String hostname, int portnum, String sContext) throws MalformedURLException { + return new URL(protocol + "://" + hostname + ":" + portnum + "/" + sContext); + } + + public URLConnection getHttpsURLConnection(URL newURL) throws IOException { + // open HttpsURLConnection using TSHttpsURLConnection + URLConnection httpsURLConn = null; + + httpsURLConn = newURL.openConnection(); + if (httpsURLConn != null) { + httpsURLConn.setDoInput(true); + httpsURLConn.setDoOutput(true); + httpsURLConn.setUseCaches(false); + + } else + throw new IOException("Error opening httsURLConnection"); + + return httpsURLConn; + } + +} diff --git a/common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java similarity index 96% rename from common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java rename to tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java index cac2be55c8..48ee56beb7 100644 --- a/common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java +++ b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/Data.java @@ -60,7 +60,7 @@ // TODO REMOVE public final class Data { - public static final String PASSED = "Test PASSED"; + public static final String PASSED = "Test PASSED"; - public static final String FAILED = "Test FAILED"; + public static final String FAILED = "Test FAILED"; } diff --git a/tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java new file mode 100644 index 0000000000..e3aab7c077 --- /dev/null +++ b/tools/common/src/main/java/com/sun/ts/tests/servlet/common/util/ServletTestUtil.java @@ -0,0 +1,341 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.tests.servlet.common.util; + +import jakarta.servlet.ServletOutputStream; +import jakarta.servlet.http.Cookie; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Enumeration; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.StringTokenizer; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +/** + * A set of useful utility methods to help perform test functions. + */ +public class ServletTestUtil { + + private static Logger LOGGER = LoggerFactory.getLogger(ServletTestUtil.class); + + /** + * Private as this class contains only public static methods. + */ + private ServletTestUtil() { + } + + /** + * Compares the String values in an Enumeration against the provides String array of values. The number of elements in + * the enumeration must be the same as the size of the array, or false will be returned. False will also be returned if + * the provided Enumeration or String array is null. + * + * If all values are found, true will be returned. + * + * Note: This method isn't concerned with the presence of duplicate values contained in the enumeration. + * + * The comparison is performed in a case sensitive manner. + * + * @param e - Enumeration to validate + * @param values - the values expected to be found in the Enumeration + * + * @return true if all the expected values are found, otherwise false. + */ + public static boolean checkEnumeration(Enumeration e, String[] values) { + return checkEnumeration(e, values, true, true); + } + + /** + * Compares the String values in an Enumeration against the provides String array of values. The number of elements in + * the enumeration must be the same as the size of the array, or false will be returned. False will also be returned if + * the provided Enumeration or String array is null. + * + * If all values are found, true will be returned. + * + * Note: This method isn't concerned with the presence of duplicate values contained in the enumeration. + * + * The comparison is performed in a case sensitive manner. + * + * @param e - Enumeration to validate + * @param values - the values expected to be found in the Enumeration + * @param enforceSizes - ensures that the number of elements in the Enumeration matches the number of elements in the + * array of values + * @param allowDuplicates - If true, the method will true if duplicate elements are found in the Enumeration, if false, + * then false will be return if duplicate elements have been found. + * + * @return true if all the expected values are found, otherwise false. + */ + public static boolean checkEnumeration(Enumeration e, String[] values, boolean enforceSizes, boolean allowDuplicates) { + List foundValues = null; + + if (e == null || !e.hasMoreElements() || values == null) { + return false; + } + + if (!allowDuplicates) { + foundValues = new ArrayList(); + } + + boolean valuesFound = true; + Arrays.sort(values); + int count = 0; + while (e.hasMoreElements()) { + Object val; + try { + val = e.nextElement(); + count++; + if (!allowDuplicates) { + if (foundValues.contains(val)) { + LOGGER.debug("[ServletTestUtil] Duplicate values found in " + "Enumeration when duplicates are not allowed." + + "Values found in the Enumeration: {}", getAsString(e)); + valuesFound = false; + break; + } + foundValues.add(val); + } + + } catch (NoSuchElementException nsee) { + LOGGER.info("[ServletTestUtil] There were less elements in the " + "Enumeration than expected"); + valuesFound = false; + break; + } + LOGGER.debug("[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); + if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { + LOGGER.info("[ServletTestUtil] Value '{}' not found.", val); + valuesFound = false; + continue; + } + } + + if (enforceSizes) { + if (e.hasMoreElements()) { + // more elements than should have been. + LOGGER.info("[ServletTestUtil] There were more elements in the Enumeration than expected."); + valuesFound = false; + } + if (count != values.length) { + LOGGER.info("[ServletTestUtil] There number of elements in the Enumeration did not match number of expected values." + + "Expected number of Values= {}, Actual number of Enumeration elements= {}", values.length, count); + + valuesFound = false; + } + } + return valuesFound; + } + + public static boolean checkArrayList(ArrayList al, String[] values, boolean enforceSizes, boolean allowDuplicates) { + List foundValues = null; + + if (al == null || al.isEmpty() || values == null) { + return false; + } + + if (!allowDuplicates) { + foundValues = new ArrayList(); + } + + al.trimToSize(); + boolean valuesFound = true; + Arrays.sort(values); + int len = al.size(); + for (int i = 0; i < len; i++) { + Object val = null; + val = (String) al.get(i); + LOGGER.debug("[ServletTestUtil] val= {}", val); + if (!allowDuplicates) { + if (foundValues.contains(val)) { + LOGGER.info("[ServletTestUtil] Duplicate values found in ArrayList when duplicates are not allowed." + + "Values found in the ArrayList: {}", getAsString(al)); + valuesFound = false; + break; + } + foundValues.add(val); + } + LOGGER.debug("[ServletTestUtil] Looking for '{}' in values: {}", val, getAsString(values)); + if ((Arrays.binarySearch(values, val) < 0) && (enforceSizes)) { + LOGGER.info("[ServletTestUtil] Value '{}' not found.", val); + valuesFound = false; + continue; + } + } + + if (enforceSizes) { + if (len != values.length) { + LOGGER.info("[ServletTestUtil] There number of elements in the ArrayList " + "did not match number of expected values." + + "Expected number of Values= {}, Actual number of ArrayList elements= {}", values.length, len); + + valuesFound = false; + } + } + return valuesFound; + } + + public static boolean compareString(String expected, String actual) { + String[] list_expected = expected.split("[|]"); + boolean found = true; + for (int i = 0, n = list_expected.length, startIdx = 0, bodyLength = actual.length(); i < n; i++) { + + String search = list_expected[i]; + if (startIdx >= bodyLength) { + startIdx = bodyLength; + } + + int searchIdx = actual.toLowerCase().indexOf(search.toLowerCase(), startIdx); + + LOGGER.debug("[ServletTestUtil] Scanning response for search string: '{}' starting at index " + "location: {}", search, + startIdx); + if (searchIdx < 0) { + found = false; + StringBuffer sb = new StringBuffer(255); + sb.append("[ServletTestUtil] Unable to find the following search string in the server's response: '").append(search) + .append("' at index: ").append(startIdx).append("\n[ServletTestUtil] Server's response:\n") + .append("-------------------------------------------\n").append(actual) + .append("\n-------------------------------------------\n"); + LOGGER.debug(sb.toString()); + break; + } + + LOGGER.debug("[ServletTestUtil] Found search string: '{}' at index '{}' in the server's response", search, searchIdx); + // the new searchIdx is the old index plus the lenght of the + // search string. + startIdx = searchIdx + search.length(); + } + return found; + } + + /** + * Returns the provided String array in the following format: [n1,n2,n...] + * + * @param sArray - an array of Objects + * @return - a String based off the values in the array + */ + public static String getAsString(Object[] sArray) { + return sArray == null ? null : Stream.of(sArray).map(Object::toString).collect(Collectors.joining(",", "[", "]")); + + } + + public static String getAsString(List al) { + return al == null ? null : al.stream().collect(Collectors.joining(",", "[", "]")); + + } + + /** + * Returns the provided Enumeration as a String in the following format: [n1,n2,n...] + * + * @param e - an Enumeration + * @return - a printable version of the contents of the Enumeration + */ + public static String getAsString(Enumeration e) { + return getAsString(getAsArray(e)); + } + + /** + * Returnes the provides Enumeration as an Array of String Arguments. + * + * @param e - an Enumeration + * @return - the elements of the Enumeration as an array of Objects + */ + public static Object[] getAsArray(Enumeration e) { + List list = new ArrayList<>(); + while (e.hasMoreElements()) { + list.add(e.nextElement()); + } + return list.toArray(new Object[0]); + } + + /** + * Returnes the provided string as an Array of Strings. + * + * @param value String + * @return - the elements of the String as an array of Strings + */ + public static String[] getAsArray(String value) { + StringTokenizer st = new StringTokenizer(value, ","); + String[] retValues = new String[st.countTokens()]; + for (int i = 0; st.hasMoreTokens(); i++) { + retValues[i] = st.nextToken(); + } + return retValues; + } + + public static void printResult(PrintWriter pw, String s) { + + // if string is null or empty, then it passed + if (s == null || s.equals("")) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED + ": " + s); + } + } + + public static void printResult(PrintWriter pw, boolean b) { + if (b) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED); + } + } + + public static void printResult(ServletOutputStream pw, boolean b) throws IOException { + if (b) { + pw.println(Data.PASSED); + } else { + pw.println(Data.FAILED); + } + } + + public static void printFailureData(PrintWriter pw, ArrayList result, Object[] expected) { + pw.println("Unable to find the expected values:\n " + " " + ServletTestUtil.getAsString(expected) + + "\nin the results returned by the test which were:\n" + " " + ServletTestUtil.getAsString(result)); + } + + public static void printFailureData(PrintWriter pw, Enumeration result, Object[] expected) { + pw.println("Unable to find the expected values:\n " + " " + ServletTestUtil.getAsString(expected) + + "\nin the results returned by the test which were:\n" + " " + ServletTestUtil.getAsString(result)); + } + + public static int findCookie(Cookie[] cookie, String name) { + boolean found = false; + int i = 0; + if (cookie != null) { + while ((!found) && (i < cookie.length)) { + if (cookie[i].getName().equals(name)) { + found = true; + } else { + i++; + } + } + } else { + found = false; + } + if (found) { + return i; + } else { + return -1; + } + } +} diff --git a/common/src/main/resources/HelloService.wsdl b/tools/common/src/main/resources/HelloService.wsdl similarity index 100% rename from common/src/main/resources/HelloService.wsdl rename to tools/common/src/main/resources/HelloService.wsdl diff --git a/common/src/main/resources/HelloService_schema1.xsd b/tools/common/src/main/resources/HelloService_schema1.xsd similarity index 100% rename from common/src/main/resources/HelloService_schema1.xsd rename to tools/common/src/main/resources/HelloService_schema1.xsd diff --git a/libutil/pom.xml b/tools/libutil/pom.xml similarity index 53% rename from libutil/pom.xml rename to tools/libutil/pom.xml index 665bf9b627..18ef7f0bec 100644 --- a/libutil/pom.xml +++ b/tools/libutil/pom.xml @@ -17,28 +17,40 @@ SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 --> - + 4.0.0 - jakarta.tck + org.eclipse.ee4j project - 11.0.0-SNAPSHOT + 1.0.9 + + jakarta.tck libutil + 11.0.0-SNAPSHOT jar lib util contains com.sun.ts.lib.util + https://github.com/jakartaee/platform-tck + + + UTF-8 + UTF-8 + + org.apache.ant ant + 1.10.11 org.jboss.spec.javax.rmi jboss-rmi-api_1.0_spec + 1.0.6.Final org.apache.derby @@ -47,4 +59,30 @@ + + + + + maven-compiler-plugin + 3.13.0 + + 17 + -Xlint:all + + + + + maven-source-plugin + + + attach-sources + + jar-no-fork + + verify + + + + + diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java new file mode 100644 index 0000000000..5861fe2379 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/AssertionMapper.java @@ -0,0 +1,513 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import java.io.*; +import java.util.*; +import javax.xml.parsers.*; +import org.xml.sax.helpers.*; +import org.xml.sax.*; +import org.apache.tools.ant.taskdefs.*; +import org.apache.tools.ant.types.*; +import org.apache.tools.ant.*; +import com.sun.ts.lib.util.*; + +public final class AssertionMapper { + private static final String NO_DESC = "See assertion html documents."; + + private static final String INVALID = "WARN: invalid assertion_id: "; + + public final static String NL = System.getProperty("line.separator"); + + public final static String NL2 = NL; + + private static boolean debug; + + private static boolean showRetrievedAssertions; + + protected static String assertionDir; + + private static String[] assertionFiles; + + private static Map fileName2Map = new HashMap(); + + private static Map aMap = new HashMap(); + + // xmlFileNames that parser has failed to load, and thus will not load it + // again. + private static Set unloadable = new HashSet(); + + static { + debug = Boolean.getBoolean("AssertionMapper.debug"); + showRetrievedAssertions = Boolean.getBoolean("show.retrieved.assertions"); + assertionDir = System.getProperty("assertion.dir"); + if (assertionDir == null) + assertionDir = System.getProperty("ts.home") + File.separator + "internal" + File.separator + "docs"; + + DirectoryScanner ds = new DirectoryScanner(); + ds.setBasedir(assertionDir); + ds.addDefaultExcludes(); + ds.setCaseSensitive(false); + ds.setIncludes(new String[] { "**/*Assertions.xml" }); + ds.scan(); + assertionFiles = ds.getIncludedFiles(); + System.out.println(assertionFiles.length + " assertion files under " + assertionDir); + for (int i = 0; i < assertionFiles.length; i++) { + System.out.println(assertionFiles[i]); + } + } + + private AssertionMapper() { + } + + /** + * main program to test AssertionComparator, the nested class. + */ + public static void main(String[] args) { + String[] s = { "JMS:SPEC:130.3", "EJB:JAVADOC:27", "JMS:SPEC:130.19", "JSP:SPEC:130", "JMS:SPEC:130.9.5", "JMS:SPEC:130.9" }; + Arrays.sort(s, AssertionComparator.getInstance()); + System.out.println("After sorting"); + for (int i = 0; i < s.length; i++) { + System.out.println(s[i]); + } + + } + + public static void log(String s) { + System.out.println(s); + } + + /* + * Retrieves assertion descriptions for assertion_ids. + * + * @param assertionIds separated by ; + * + * @param file test source file that contains the assertion ids. For debug purpose. + * + * @return a single string containing all assertion descriptions separated by new line. + * + */ + public static String getAssertionDescriptions(String assertionIds, File file) { + String filePath = file.getPath(); + if (assertionIds == null || assertionIds.length() == 0) { + System.out.println("WARN: no value for assertion_ids (" + filePath + ")"); + return NO_DESC; + } + StringTokenizer st = new StringTokenizer(assertionIds, ";,\n\r\f\t"); + int countId = st.countTokens(); + String[] idArray = new String[countId]; + for (int i = 0; i < idArray.length; i++) { + idArray[i] = st.nextToken().trim(); + } + Arrays.sort(idArray, AssertionComparator.getInstance()); + Set addedAssertions = new HashSet(); // avoid one assertion to be added + // multiple times + StringBuffer retval = new StringBuffer(); + for (int i = 0; i < idArray.length; i++) { + String aDescription = getDescription0(idArray[i], filePath, addedAssertions); + if (aDescription != null && aDescription.length() > 0) { + retval.append(aDescription).append(NL2); + } + } + return retval.toString().trim(); + }// getAssertionDescription + + /** + * @param token a token in assertion_ids. It has not beenn validated or split. + * @param filePath the full path to the test source code that contained the assertion ids. For example, + * /files/ts/src/com/sun/ts/tests/jsp/syntax/Client.java. + * @param addedAssertion set to keep track of assertions that have been added to the result. + * @return a complete description of this assertion id. If it's not a valid assertion, null or empty string is returned. + * A complete description includes description of all of its ancestors, its own description, and that of all of its + * descendents. + */ + private static String getDescription0(String token, String filePath, Set addedAssertions) { + String aDescription = null; // assertion description for token(id) + int pos1 = token.indexOf(":"); + if (pos1 == -1) { + System.out.println(INVALID + token + " (" + filePath + ")"); + return null; + } + String first = token.substring(0, pos1); + int pos2 = token.indexOf(":", pos1 + 1); + if (pos2 == -1) { + System.out.println(INVALID + token + " (" + filePath + ")"); + return null; + } + String second = token.substring(pos1 + 1, pos2); + String third = token.substring(pos2 + 1); // the number, e.g., 14 + + // for example, first=JMS, second=SPEC, third=14.1 + StringBuffer xmlFileName = new StringBuffer(); + xmlFileName.append(first); + xmlFileName.append(Character.toUpperCase(second.charAt(0))); + xmlFileName.append(second.substring(1).toLowerCase()); + xmlFileName.append("Assertions.xml"); + + // some old assertion doc use 8, instead of JMS:SPEC:8 + String fn = xmlFileName.toString(); + Map assertionMap = (Map) fileName2Map.get(fn); + if (assertionMap == null) { // has not been read, or has failed to load + if (!unloadable.contains(fn)) { + new HelpHandler().load(fn, first); + } + } + assertionMap = (Map) fileName2Map.get(fn); + StringBuffer resultBuffer = new StringBuffer(); + if (assertionMap == null) { // failed to read xml file + resultBuffer.append(token).append(" ").append(NO_DESC); + return resultBuffer.toString(); + } + + // get description of all ancestors. Assume ancestors and descendants are + // in the same map. + int dotPosition = token.indexOf(".", pos2); + while (dotPosition != -1) { + String upperId = token.substring(0, dotPosition); + if (!addedAssertions.contains(upperId)) { + String upperDesc = (String) assertionMap.get(upperId); + if (upperDesc == null || upperDesc.length() == 0) { + System.out.println("WARN: no description for " + upperId + " in " + filePath); + upperDesc = NO_DESC; + } + resultBuffer.append(upperId).append(" ").append(upperDesc).append(NL2); + addedAssertions.add(upperId); + } + dotPosition = token.indexOf(".", dotPosition + 1); + } + + // get description for itself and all descendants + if (!addedAssertions.contains(token)) { + String thisDescription = (String) assertionMap.get(token); + if (thisDescription == null) { + thisDescription = NO_DESC; + System.out.println("WARN: no description for " + token + " in " + filePath); + } + resultBuffer.append(token).append(" ").append(thisDescription).append(NL2); + addedAssertions.add(token); + } + + List keyList = new ArrayList(); + String tokenDot = token + '.'; + for (Iterator i = assertionMap.keySet().iterator(); i.hasNext();) { + String key = (String) i.next(); + if (key.startsWith(tokenDot) && !addedAssertions.contains(key)) { + keyList.add(key); + } + } + Collections.sort(keyList, AssertionComparator.getInstance()); + for (int i = 0, n = keyList.size(); i < n; i++) { + String k = (String) keyList.get(i); + resultBuffer.append(k).append(" ").append(assertionMap.get(k)).append(NL2); + addedAssertions.add(k); + } + return resultBuffer.toString().trim(); + // TODO: remove from assertion description + } + + // ------------------------ static nested class --------------------------- + public static class AssertionComparator implements Comparator { + private static AssertionComparator instance = new AssertionComparator(); + + private AssertionComparator() { + } + + public static AssertionComparator getInstance() { + return instance; + } + + public int compare(Object o1, Object o2) { + String s1 = (String) o1; + String s2 = (String) o2; + int pos1 = s1.lastIndexOf(":"); + int pos2 = s2.lastIndexOf(":"); + String word1 = null; + String word2 = null; + if (pos1 != -1) { + word1 = s1.substring(0, pos1); + } + if (pos2 != -1) { + word2 = s2.substring(0, pos2); + } + + String numPart1 = null; + String numPart2 = null; + // to handle invalid ids like 145, 234. + if (pos1 == -1 && pos2 == -1) { + numPart1 = s1; + numPart2 = s2; + } else { + // one is null, but not both + if (word1 == null || word2 == null) { + return -1; + } + // both have wordpart + int wordCompare = word1.compareTo(word2); + if (wordCompare != 0) { + return wordCompare; + } + // continue to compare number part. pos1 and pos2 are not -1 now. + numPart1 = s1.substring(pos1 + 1); + numPart2 = s2.substring(pos2 + 1); // for example, 1.1.4.5 + } + + StringTokenizer st1 = new StringTokenizer(numPart1, "."); + StringTokenizer st2 = new StringTokenizer(numPart2, "."); + int size1 = st1.countTokens(); + int size2 = st2.countTokens(); + int biggerSize = (size1 == size2) ? size1 : (size1 > size2) ? size1 : size2; + + int[] int1 = new int[biggerSize]; + int[] int2 = new int[biggerSize]; + fillIntArray(st1, int1); + fillIntArray(st2, int2); + + for (int i = 0; i < biggerSize; i++) { + int diff = int1[i] - int2[i]; + if (diff != 0) { + return diff; + } + // both are zero, or the same positive number + if (int1[i] == 0) { + return -1; + } + } + return -1; + } + + /** + * @param int1 bigger of the two. equal to bigger than number of tokens. + */ + private void fillIntArray(StringTokenizer st, int[] int1) { + for (int i = 0; i < int1.length && st.hasMoreTokens(); i++) { + try { + int1[i] = Integer.parseInt(st.nextToken()); + } catch (NumberFormatException exp) { + break; // stop once we hit a non-number. Unitializaed part will be 0. + } + } + } + } + + // ------------------------------------------------------------------------ + /** + * sax2 event handler is too slow. So stick to HandlerBase. + */ + public static class HelpHandler + // extends DefaultHandler { + extends HandlerBase { + private String xmlFileName; + + private boolean b_assertions; + + private boolean b_assertion; + + private boolean b_id; + + private boolean b_description; + + private boolean b_technology; + + private String currentId; + + private String currentDescription; + + private String techType; // JMS:SPEC, JSP:JAVADOC, etc + + private String specOrJavadoc; // spec, or javadoc + + private Map aFileMap; + + private boolean alreadyPut; + + private String parentDir; + + public HelpHandler() { + } + + public void load(String xmlFileName, String technologyName) { + String fn = null; + for (int i = 0; i < assertionFiles.length; i++) { + int index = assertionFiles[i].lastIndexOf(File.separator) + 1; + String fName = assertionFiles[i].substring(index); + if (fName.equalsIgnoreCase(xmlFileName)) { + fn = assertionFiles[i]; + break; + } + } + if (fn == null) { + System.out.println("WARN: failed to find file " + xmlFileName + " under " + assertionDir + ", verify the technology name [" + + technologyName + "] is spelled correcting in the test clients"); + return; + } + this.xmlFileName = xmlFileName; + try { + // Store the parent directory of this file for the resolver to use + System.err.println("%%%%%%%%%% Parsing file \"" + fn + "\" %%%%%%%%%"); + File fileFN = new File(fn); + parentDir = fileFN.getParent(); + System.err.println("%%%%%%%%%% parentDir set to (resolver uses this) \"" + parentDir + "\" %%%%%%%%%"); + + InputSource is = new InputSource(new FileInputStream(new File(assertionDir, fn))); + SAXParserFactory factory = SAXParserFactory.newInstance(); + factory.setValidating(false); + SAXParser saxParser = factory.newSAXParser(); + saxParser.parse(is, this); + } catch (SAXException se) { + se.printStackTrace(); + unloadable.add(xmlFileName); + System.out.println("Will skip all assertions in " + xmlFileName); + } catch (IOException fe) { + fe.printStackTrace(); + unloadable.add(xmlFileName); + System.out.println("Will skip all assertions in " + xmlFileName); + } catch (ParserConfigurationException pe) { + pe.printStackTrace(); + unloadable.add(xmlFileName); + System.out.println("Will skip all assertions in " + xmlFileName); + } + } + + /* + * Implementation of the entity resolver interface. This allows CTS developers to use entity declarations in their + * assertion docs provided the assertion doc (the referencing doc) and the referenced docs are in the same directory. + */ + public InputSource resolveEntity(String publicId, String systemId) { + System.err.println("publicId \"" + publicId + "\""); + System.err.println("systemId \"" + systemId + "\""); + String result = null; + String fileName = systemId.substring(systemId.lastIndexOf("/") + 1); + String possibleLocation = assertionDir + File.separator + parentDir + File.separator + fileName; + File possibleFile = new File(possibleLocation); + if (possibleFile.isFile()) { + result = possibleLocation; + } else { + System.err.println("%%%%%%% Error could not resolve file \"" + fileName + "\""); + result = systemId; + } + System.err.println("%%%%%%%% Entity Resolver returning \"" + result + "\""); + return new InputSource(result); + } + + public void startElement(String localName, AttributeList attrs) throws SAXException { + // public void startElement(String uri, + // String localName, + // String qName, + // Attributes attributes) + // throws SAXException { + if (localName.equalsIgnoreCase("assertions")) { + b_assertions = true; + aFileMap = new HashMap(); + } else if (localName.equalsIgnoreCase("assertion") && b_assertions) { + b_assertion = true; + } else if (localName.equalsIgnoreCase("id") && b_assertions && b_assertion) { + b_id = true; + } else if (localName.equalsIgnoreCase("description") && b_assertions && b_assertion) { + b_description = true; + } else if (localName.equalsIgnoreCase("sub-assertions") && b_assertions && b_assertion) { + putIdAndDescription(); + } else if (localName.equalsIgnoreCase("spec") || localName.equalsIgnoreCase("javadoc")) { + specOrJavadoc = localName; + } else if (localName.equalsIgnoreCase("technology")) { + b_technology = true; + } + } + + public void endElement(String localName) throws SAXException { + // public void endElement(String uri, + // String localName, + // String qName) + // throws SAXException { + if (localName.equalsIgnoreCase("assertions")) { + fileName2Map.put(this.xmlFileName, aFileMap); + b_assertions = false; + return; + } else if (localName.equalsIgnoreCase("assertion")) { + putIdAndDescription(); + b_assertion = false; + b_id = false; + b_description = false; + } else if (localName.equalsIgnoreCase("id") && b_assertions && b_assertion) { + b_id = false; + } else if (localName.equalsIgnoreCase("description") && b_assertions && b_assertion) { + b_description = false; + } else if (localName.equalsIgnoreCase("technology")) { + b_technology = false; + } + } + + public void characters(char[] ch, int start, int length) throws SAXException { + if (b_id && b_description) { + System.out.println("WARN: invalid state: in both id and description element."); + } + if (b_id) { + currentId = new String(ch, start, length); + alreadyPut = false; + } else if (b_description) { + String content = new String(ch, start, length); + if (currentDescription == null) { + currentDescription = content; + } else { // some descriptions have formatting elements , + // ,which + // may be treated as nested elements of description by the parser + currentDescription += " " + content; + } + alreadyPut = false; + } else if (b_technology) { + if (specOrJavadoc == null) { + System.out.println("Should have encountered javadoc or spec element!"); + } else { + String tech = new String(ch, start, length).trim(); + techType = (tech + ':' + specOrJavadoc).toUpperCase(); + } + } + } // characters + + /** + * need to put at end of assertion, or start of sub-assertion + */ + private void putIdAndDescription() { + if (alreadyPut) { + return; + } + if (currentId == null || currentId.length() == 0) { + System.out.println("WARN: null id in " + xmlFileName); + return; + } + currentId = currentId.trim(); + // some id may be like 14, while it really should be like JMS:SPEC:14 + if (techType != null && !currentId.startsWith(techType)) { + currentId = techType + ':' + currentId; + } + if (currentDescription == null || currentDescription.length() == 0) { + System.out.println("WARN: for id:[" + currentId + "] null description in " + xmlFileName); + currentDescription = NO_DESC; + } else { + currentDescription = currentDescription.trim(); + } + if (showRetrievedAssertions) { + System.out.println(currentId + " " + currentDescription); + } + aFileMap.put(currentId, currentDescription); + alreadyPut = true; + currentId = null; + currentDescription = null; + } + + } // nested class + +}// main class diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java new file mode 100644 index 0000000000..96d4ce2186 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Decoder.java @@ -0,0 +1,149 @@ +/* + * Copyright (c) 1995, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import java.io.OutputStream; +import java.io.PushbackInputStream; +import java.io.PrintStream; + +/** + * This class implements a BASE64 Character decoder as specified in RFC1521. + * + * This RFC is part of the MIME specification which is published by the Internet Engineering Task Force (IETF). Unlike + * some other encoding schemes there is nothing in this encoding that tells the decoder where a buffer starts or stops, + * so to use it you will need to isolate your encoded data into a single chunk and then feed them this decoder. The + * simplest way to do that is to read all of the encoded data into a string and then use: + * + *
+ * byte mydata[];
+ * BASE64Decoder base64 = new BASE64Decoder();
+ *
+ * mydata = base64.decodeBuffer(bufferString);
+ * 
+ * + * This will decode the String in bufferString and give you an array of bytes in the array myData. + * + * On errors, this class throws a CEFormatException with the following detail strings: + * + *
+ * "BASE64Decoder: Not enough bytes for an atom."
+ * 
+ * + * @author Chuck McManis + * @see CharacterEncoder + * @see BASE64Decoder + */ + +public class BASE64Decoder extends CharacterDecoder { + + /** This class has 4 bytes per atom */ + protected int bytesPerAtom() { + return (4); + } + + /** Any multiple of 4 will do, 72 might be common */ + protected int bytesPerLine() { + return (72); + } + + /** + * This character array provides the character to value map based on RFC1521. + */ + private final static char pem_array[] = { + // 0 1 2 3 4 5 6 7 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0 + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1 + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2 + 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3 + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4 + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5 + 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6 + '4', '5', '6', '7', '8', '9', '+', '/' // 7 + }; + + private final static byte pem_convert_array[] = new byte[256]; + + static { + for (int i = 0; i < 255; i++) { + pem_convert_array[i] = -1; + } + for (int i = 0; i < pem_array.length; i++) { + pem_convert_array[pem_array[i]] = (byte) i; + } + } + + byte decode_buffer[] = new byte[4]; + + /** + * Decode one BASE64 atom into 1, 2, or 3 bytes of data. + */ + protected void decodeAtom(PushbackInputStream inStream, OutputStream outStream, int rem) throws java.io.IOException { + int i; + byte a = -1, b = -1, c = -1, d = -1; + + if (rem < 2) { + throw new CEFormatException("BASE64Decoder: Not enough bytes for an atom."); + } + do { + i = inStream.read(); + if (i == -1) { + throw new CEStreamExhausted(); + } + } while (i == '\n' || i == '\r'); + decode_buffer[0] = (byte) i; + + i = readFully(inStream, decode_buffer, 1, rem - 1); + if (i == -1) { + throw new CEStreamExhausted(); + } + + if (rem > 3 && decode_buffer[3] == '=') { + rem = 3; + } + if (rem > 2 && decode_buffer[2] == '=') { + rem = 2; + } + switch (rem) { + case 4: + d = pem_convert_array[decode_buffer[3] & 0xff]; + // NOBREAK + case 3: + c = pem_convert_array[decode_buffer[2] & 0xff]; + // NOBREAK + case 2: + b = pem_convert_array[decode_buffer[1] & 0xff]; + a = pem_convert_array[decode_buffer[0] & 0xff]; + break; + } + + switch (rem) { + case 2: + outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); + break; + case 3: + outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); + outStream.write((byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf))); + break; + case 4: + outStream.write((byte) (((a << 2) & 0xfc) | ((b >>> 4) & 3))); + outStream.write((byte) (((b << 4) & 0xf0) | ((c >>> 2) & 0xf))); + outStream.write((byte) (((c << 6) & 0xc0) | (d & 0x3f))); + break; + } + return; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java new file mode 100644 index 0000000000..f304d75b09 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/BASE64Encoder.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import java.io.OutputStream; +import java.io.InputStream; +import java.io.PrintStream; +import java.io.IOException; + +/** + * This class implements a BASE64 Character encoder as specified in RFC1521. This RFC is part of the MIME specification + * as published by the Internet Engineering Task Force (IETF). Unlike some other encoding schemes there is nothing in + * this encoding that indicates where a buffer starts or ends. + * + * This means that the encoded text will simply start with the first line of encoded text and end with the last line of + * encoded text. + * + * @version 1.23, 11/17/05 + * @author Chuck McManis + * @see CharacterEncoder + * @see BASE64Decoder + */ + +public class BASE64Encoder extends CharacterEncoder { + + /** this class encodes three bytes per atom. */ + protected int bytesPerAtom() { + return (3); + } + + /** + * this class encodes 57 bytes per line. This results in a maximum of 57/3 * 4 or 76 characters per output line. Not + * counting the line termination. + */ + protected int bytesPerLine() { + return (57); + } + + /** This array maps the characters to their 6 bit values */ + private final static char pem_array[] = { + // 0 1 2 3 4 5 6 7 + 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0 + 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1 + 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2 + 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3 + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4 + 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5 + 'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6 + '4', '5', '6', '7', '8', '9', '+', '/' // 7 + }; + + /** + * encodeAtom - Take three bytes of input and encode it as 4 printable characters. Note that if the length in len is + * less than three is encodes either one or two '=' signs to indicate padding characters. + */ + protected void encodeAtom(OutputStream outStream, byte data[], int offset, int len) throws IOException { + byte a, b, c; + + if (len == 1) { + a = data[offset]; + b = 0; + c = 0; + outStream.write(pem_array[(a >>> 2) & 0x3F]); + outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); + outStream.write('='); + outStream.write('='); + } else if (len == 2) { + a = data[offset]; + b = data[offset + 1]; + c = 0; + outStream.write(pem_array[(a >>> 2) & 0x3F]); + outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); + outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]); + outStream.write('='); + } else { + a = data[offset]; + b = data[offset + 1]; + c = data[offset + 2]; + outStream.write(pem_array[(a >>> 2) & 0x3F]); + outStream.write(pem_array[((a << 4) & 0x30) + ((b >>> 4) & 0xf)]); + outStream.write(pem_array[((b << 2) & 0x3c) + ((c >>> 6) & 0x3)]); + outStream.write(pem_array[c & 0x3F]); + } + } +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java similarity index 92% rename from libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java index fab3c350fc..706f92a74f 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/CEFormatException.java @@ -19,7 +19,7 @@ import java.io.IOException; public class CEFormatException extends IOException { - public CEFormatException(String s) { - super(s); - } + public CEFormatException(String s) { + super(s); + } } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/CEStreamExhausted.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/CEStreamExhausted.java similarity index 100% rename from libutil/src/main/java/com/sun/ts/lib/util/CEStreamExhausted.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/CEStreamExhausted.java diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java new file mode 100644 index 0000000000..542ac4f7d7 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterDecoder.java @@ -0,0 +1,199 @@ +/* + * Copyright (c) 1995, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.io.InputStream; +import java.io.PushbackInputStream; +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.nio.ByteBuffer; + +/** + * This class defines the decoding half of character encoders. A character decoder is an algorithim for transforming 8 + * bit binary data that has been encoded into text by a character encoder, back into original binary form. + * + * The character encoders, in general, have been structured around a central theme that binary data can be encoded into + * text that has the form: + * + *
+ *      [Buffer Prefix]
+ *      [Line Prefix][encoded data atoms][Line Suffix]
+ *      [Buffer Suffix]
+ * 
+ * + * Of course in the simplest encoding schemes, the buffer has no distinct prefix of suffix, however all have some fixed + * relationship between the text in an 'atom' and the binary data itself. + * + * In the CharacterEncoder and CharacterDecoder classes, one complete chunk of data is referred to as a buffer. + * Encoded buffers are all text, and decoded buffers (sometimes just referred to as buffers) are binary octets. + * + * To create a custom decoder, you must, at a minimum, overide three abstract methods in this class. + *
+ *
bytesPerAtom which tells the decoder how many bytes to expect from decodeAtom + *
decodeAtom which decodes the bytes sent to it as text. + *
bytesPerLine which tells the encoder the maximum number of bytes per line. + *
+ * + * In general, the character decoders return error in the form of a CEFormatException. The syntax of the detail string + * is + * + *
+ *      DecoderClassName: Error message.
+ * 
+ * + * Several useful decoders have already been written and are referenced in the See Also list below. + * + * @author Chuck McManis + * @see CEFormatException + * @see CharacterEncoder + * @see UCDecoder + * @see UUDecoder + * @see BASE64Decoder + */ + +public abstract class CharacterDecoder { + + /** Return the number of bytes per atom of decoding */ + abstract protected int bytesPerAtom(); + + /** Return the maximum number of bytes that can be encoded per line */ + abstract protected int bytesPerLine(); + + /** decode the beginning of the buffer, by default this is a NOP. */ + protected void decodeBufferPrefix(PushbackInputStream aStream, OutputStream bStream) throws IOException { + } + + /** decode the buffer suffix, again by default it is a NOP. */ + protected void decodeBufferSuffix(PushbackInputStream aStream, OutputStream bStream) throws IOException { + } + + /** + * This method should return, if it knows, the number of bytes that will be decoded. Many formats such as uuencoding + * provide this information. By default we return the maximum bytes that could have been encoded on the line. + */ + protected int decodeLinePrefix(PushbackInputStream aStream, OutputStream bStream) throws IOException { + return (bytesPerLine()); + } + + /** + * This method post processes the line, if there are error detection or correction codes in a line, they are generally + * processed by this method. The simplest version of this method looks for the (newline) character. + */ + protected void decodeLineSuffix(PushbackInputStream aStream, OutputStream bStream) throws IOException { + } + + /** + * This method does an actual decode. It takes the decoded bytes and writes them to the OutputStream. The integer + * l tells the method how many bytes are required. This is always <= bytesPerAtom(). + */ + protected void decodeAtom(PushbackInputStream aStream, OutputStream bStream, int l) throws IOException { + throw new CEStreamExhausted(); + } + + /** + * This method works around the bizarre semantics of BufferedInputStream's read method. + */ + protected int readFully(InputStream in, byte buffer[], int offset, int len) throws java.io.IOException { + for (int i = 0; i < len; i++) { + int q = in.read(); + if (q == -1) + return ((i == 0) ? -1 : i); + buffer[i + offset] = (byte) q; + } + return len; + } + + /** + * Decode the text from the InputStream and write the decoded octets to the OutputStream. This method runs until the + * stream is exhausted. + * + * @exception CEFormatException An error has occured while decoding + * @exception CEStreamExhausted The input stream is unexpectedly out of data + */ + public void decodeBuffer(InputStream aStream, OutputStream bStream) throws IOException { + int i; + int totalBytes = 0; + + PushbackInputStream ps = new PushbackInputStream(aStream); + decodeBufferPrefix(ps, bStream); + while (true) { + int length; + + try { + length = decodeLinePrefix(ps, bStream); + for (i = 0; (i + bytesPerAtom()) < length; i += bytesPerAtom()) { + decodeAtom(ps, bStream, bytesPerAtom()); + totalBytes += bytesPerAtom(); + } + if ((i + bytesPerAtom()) == length) { + decodeAtom(ps, bStream, bytesPerAtom()); + totalBytes += bytesPerAtom(); + } else { + decodeAtom(ps, bStream, length - i); + totalBytes += (length - i); + } + decodeLineSuffix(ps, bStream); + } catch (CEStreamExhausted e) { + break; + } + } + decodeBufferSuffix(ps, bStream); + } + + /** + * Alternate decode interface that takes a String containing the encoded buffer and returns a byte array containing the + * data. + * + * @exception CEFormatException An error has occured while decoding + */ + public byte decodeBuffer(String inputString)[] throws IOException { + byte inputBuffer[] = new byte[inputString.length()]; + ByteArrayInputStream inStream; + ByteArrayOutputStream outStream; + + inputString.getBytes(0, inputString.length(), inputBuffer, 0); + inStream = new ByteArrayInputStream(inputBuffer); + outStream = new ByteArrayOutputStream(); + decodeBuffer(inStream, outStream); + return (outStream.toByteArray()); + } + + /** + * Decode the contents of the inputstream into a buffer. + */ + public byte decodeBuffer(InputStream in)[] throws IOException { + ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + decodeBuffer(in, outStream); + return (outStream.toByteArray()); + } + + /** + * Decode the contents of the String into a ByteBuffer. + */ + public ByteBuffer decodeBufferToByteBuffer(String inputString) throws IOException { + return ByteBuffer.wrap(decodeBuffer(inputString)); + } + + /** + * Decode the contents of the inputStream into a ByteBuffer. + */ + public ByteBuffer decodeBufferToByteBuffer(InputStream in) throws IOException { + return ByteBuffer.wrap(decodeBuffer(in)); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java new file mode 100644 index 0000000000..e7eea19ffe --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/CharacterEncoder.java @@ -0,0 +1,311 @@ +/* + * Copyright (c) 2006, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import java.io.InputStream; +import java.io.ByteArrayInputStream; +import java.io.OutputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.io.IOException; +import java.nio.ByteBuffer; + +/** + * This class defines the encoding half of character encoders. A character encoder is an algorithim for transforming 8 + * bit binary data into text (generally 7 bit ASCII or 8 bit ISO-Latin-1 text) for transmition over text channels such + * as e-mail and network news. + * + * The character encoders have been structured around a central theme that, in general, the encoded text has the form: + * + *
+ *	[Buffer Prefix]
+ *	[Line Prefix][encoded data atoms][Line Suffix]
+ *	[Buffer Suffix]
+ * 
+ * + * In the CharacterEncoder and CharacterDecoder classes, one complete chunk of data is referred to as a buffer. + * Encoded buffers are all text, and decoded buffers (sometimes just referred to as buffers) are binary octets. + * + * To create a custom encoder, you must, at a minimum, overide three abstract methods in this class. + *
+ *
bytesPerAtom which tells the encoder how many bytes to send to encodeAtom + *
encodeAtom which encodes the bytes sent to it as text. + *
bytesPerLine which tells the encoder the maximum number of bytes per line. + *
+ * + * Several useful encoders have already been written and are referenced in the See Also list below. + * + * @version 1.38, 11/17/05 + * @author Chuck McManis + * @see CharacterDecoder; + * @see UCEncoder + * @see UUEncoder + * @see BASE64Encoder + */ +public abstract class CharacterEncoder { + + /** Stream that understands "printing" */ + protected PrintStream pStream; + + /** Return the number of bytes per atom of encoding */ + abstract protected int bytesPerAtom(); + + /** Return the number of bytes that can be encoded per line */ + abstract protected int bytesPerLine(); + + /** + * Encode the prefix for the entire buffer. By default is simply opens the PrintStream for use by the other functions. + */ + protected void encodeBufferPrefix(OutputStream aStream) throws IOException { + pStream = new PrintStream(aStream); + } + + /** + * Encode the suffix for the entire buffer. + */ + protected void encodeBufferSuffix(OutputStream aStream) throws IOException { + } + + /** + * Encode the prefix that starts every output line. + */ + protected void encodeLinePrefix(OutputStream aStream, int aLength) throws IOException { + } + + /** + * Encode the suffix that ends every output line. By default this method just prints a into the output stream. + */ + protected void encodeLineSuffix(OutputStream aStream) throws IOException { + pStream.println(); + } + + /** Encode one "atom" of information into characters. */ + abstract protected void encodeAtom(OutputStream aStream, byte someBytes[], int anOffset, int aLength) throws IOException; + + /** + * This method works around the bizarre semantics of BufferedInputStream's read method. + */ + protected int readFully(InputStream in, byte buffer[]) throws java.io.IOException { + for (int i = 0; i < buffer.length; i++) { + int q = in.read(); + if (q == -1) + return i; + buffer[i] = (byte) q; + } + return buffer.length; + } + + /** + * Encode bytes from the input stream, and write them as text characters to the output stream. This method will run + * until it exhausts the input stream, but does not print the line suffix for a final line that is shorter than + * bytesPerLine(). + */ + public void encode(InputStream inStream, OutputStream outStream) throws IOException { + int j; + int numBytes; + byte tmpbuffer[] = new byte[bytesPerLine()]; + + encodeBufferPrefix(outStream); + + while (true) { + numBytes = readFully(inStream, tmpbuffer); + if (numBytes == 0) { + break; + } + encodeLinePrefix(outStream, numBytes); + for (j = 0; j < numBytes; j += bytesPerAtom()) { + + if ((j + bytesPerAtom()) <= numBytes) { + encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); + } else { + encodeAtom(outStream, tmpbuffer, j, (numBytes) - j); + } + } + if (numBytes < bytesPerLine()) { + break; + } else { + encodeLineSuffix(outStream); + } + } + encodeBufferSuffix(outStream); + } + + /** + * Encode the buffer in aBuffer and write the encoded result to the OutputStream aStream. + */ + public void encode(byte aBuffer[], OutputStream aStream) throws IOException { + ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); + encode(inStream, aStream); + } + + /** + * A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded + * buffer. + */ + public String encode(byte aBuffer[]) { + ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); + String retVal = null; + try { + encode(inStream, outStream); + // explicit ascii->unicode conversion + retVal = outStream.toString("8859_1"); + } catch (Exception IOException) { + // This should never happen. + throw new Error("CharacterEncoder.encode internal error"); + } + return (retVal); + } + + /** + * Return a byte array from the remaining bytes in this ByteBuffer. + *

+ * The ByteBuffer's position will be advanced to ByteBuffer's limit. + *

+ * To avoid an extra copy, the implementation will attempt to return the byte array backing the ByteBuffer. If this is + * not possible, a new byte array will be created. + */ + private byte[] getBytes(ByteBuffer bb) { + /* + * This should never return a BufferOverflowException, as we're careful to allocate just the right amount. + */ + byte[] buf = null; + + /* + * If it has a usable backing byte buffer, use it. Use only if the array exactly represents the current ByteBuffer. + */ + if (bb.hasArray()) { + byte[] tmp = bb.array(); + if ((tmp.length == bb.capacity()) && (tmp.length == bb.remaining())) { + buf = tmp; + bb.position(bb.limit()); + } + } + + if (buf == null) { + /* + * This class doesn't have a concept of encode(buf, len, off), so if we have a partial buffer, we must reallocate space. + */ + buf = new byte[bb.remaining()]; + + /* + * position() automatically updated + */ + bb.get(buf); + } + + return buf; + } + + /** + * Encode the aBuffer ByteBuffer and write the encoded result to the OutputStream aStream. + *

+ * The ByteBuffer's position will be advanced to ByteBuffer's limit. + */ + public void encode(ByteBuffer aBuffer, OutputStream aStream) throws IOException { + byte[] buf = getBytes(aBuffer); + encode(buf, aStream); + } + + /** + * A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. + *

+ * The ByteBuffer's position will be advanced to ByteBuffer's limit. + */ + public String encode(ByteBuffer aBuffer) { + byte[] buf = getBytes(aBuffer); + return encode(buf); + } + + /** + * Encode bytes from the input stream, and write them as text characters to the output stream. This method will run + * until it exhausts the input stream. It differs from encode in that it will add the line at the end of a final line + * that is shorter than bytesPerLine(). + */ + public void encodeBuffer(InputStream inStream, OutputStream outStream) throws IOException { + int j; + int numBytes; + byte tmpbuffer[] = new byte[bytesPerLine()]; + + encodeBufferPrefix(outStream); + + while (true) { + numBytes = readFully(inStream, tmpbuffer); + if (numBytes == 0) { + break; + } + encodeLinePrefix(outStream, numBytes); + for (j = 0; j < numBytes; j += bytesPerAtom()) { + if ((j + bytesPerAtom()) <= numBytes) { + encodeAtom(outStream, tmpbuffer, j, bytesPerAtom()); + } else { + encodeAtom(outStream, tmpbuffer, j, (numBytes) - j); + } + } + encodeLineSuffix(outStream); + if (numBytes < bytesPerLine()) { + break; + } + } + encodeBufferSuffix(outStream); + } + + /** + * Encode the buffer in aBuffer and write the encoded result to the OutputStream aStream. + */ + public void encodeBuffer(byte aBuffer[], OutputStream aStream) throws IOException { + ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); + encodeBuffer(inStream, aStream); + } + + /** + * A 'streamless' version of encode that simply takes a buffer of bytes and returns a string containing the encoded + * buffer. + */ + public String encodeBuffer(byte aBuffer[]) { + ByteArrayOutputStream outStream = new ByteArrayOutputStream(); + ByteArrayInputStream inStream = new ByteArrayInputStream(aBuffer); + try { + encodeBuffer(inStream, outStream); + } catch (Exception IOException) { + // This should never happen. + throw new Error("CharacterEncoder.encodeBuffer internal error"); + } + return (outStream.toString()); + } + + /** + * Encode the aBuffer ByteBuffer and write the encoded result to the OutputStream aStream. + *

+ * The ByteBuffer's position will be advanced to ByteBuffer's limit. + */ + public void encodeBuffer(ByteBuffer aBuffer, OutputStream aStream) throws IOException { + byte[] buf = getBytes(aBuffer); + encodeBuffer(buf, aStream); + } + + /** + * A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. + *

+ * The ByteBuffer's position will be advanced to ByteBuffer's limit. + */ + public String encodeBuffer(ByteBuffer aBuffer) { + byte[] buf = getBytes(aBuffer); + return encodeBuffer(buf); + } + +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java new file mode 100644 index 0000000000..c077ace86a --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/ConfigUtil.java @@ -0,0 +1,98 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.util; + +import java.util.*; +import java.io.*; + +public class ConfigUtil { + public final static File PROPS_DIR = new File(System.getProperty("TS_HOME", System.getProperty("ts.home")) + File.separator + "src" + + File.separator + "com" + File.separator + "sun" + File.separator + "ts" + File.separator + "lib", "harness"); + + public final static File SRC_DIR = new File(System.getProperty("TS_HOME", System.getProperty("ts.home")), "src"); + + public final static String INTEROP_DIRECTION_PROP_FILE_NAME = "interop-direction.properties"; + + public static String[] getMappingValue(Properties mapping, String[] keys, String relativePath) { + String forwardSlashRelativePath = relativePath.replace(File.separator, "/"); + + for (int i = keys.length - 1; i >= 0; i--) { // must traverse in reverse + // order. + if (forwardSlashRelativePath.startsWith(keys[i])) { + return stringToArray(mapping.getProperty(keys[i])); + } + } + return TestUtil.EMPTY_STRING_ARRAY; + } + + public static String[] loadKeysFrom(Properties mapping) { + String[] keys = null; + if (mapping != null) { + keys = new String[mapping.size()]; + int i = 0; + for (Enumeration enum1 = mapping.keys(); enum1.hasMoreElements(); i++) { + keys[i] = (String) enum1.nextElement(); + } + Arrays.sort(keys); + } + return keys; + } + + public static String[] stringToArray(String s) { + if (s == null) { + return TestUtil.EMPTY_STRING_ARRAY; + } + StringTokenizer st = new StringTokenizer(s, " ,;\t\r\n\f"); + int tokenCount = st.countTokens(); + if (tokenCount == 0) { + return TestUtil.EMPTY_STRING_ARRAY; + } + String[] result = new String[tokenCount]; + for (int i = 0; st.hasMoreTokens(); i++) { + result[i] = st.nextToken(); + } + return result; + } + + public static Properties loadPropertiesFor(String propFileName) { + File propFile; + + // always load vehicle.properties from under src + if (propFileName.equals("vehicle.properties")) { + propFile = new File(SRC_DIR, propFileName); + } else { + propFile = new File(PROPS_DIR, propFileName); + } + + Properties props = null; + String propPath = propFile.getPath(); + if (propFile.exists()) { + props = new Properties(); + try { + System.out.println("Loading " + propPath); + props.load(new FileInputStream(propFile)); + } catch (IOException ioe) { + ioe.printStackTrace(); + } + } + return props; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java new file mode 100644 index 0000000000..f45f8a348b --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/DoubleConsts.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +/** + * This class contains additional constants documenting limits of the double type. + * + * @author Joseph D. Darcy + */ + +public class DoubleConsts { + /** + * Don't let anyone instantiate this class. + */ + private DoubleConsts() { + } + + public static final double POSITIVE_INFINITY = java.lang.Double.POSITIVE_INFINITY; + + public static final double NEGATIVE_INFINITY = java.lang.Double.NEGATIVE_INFINITY; + + public static final double NaN = java.lang.Double.NaN; + + public static final double MAX_VALUE = java.lang.Double.MAX_VALUE; + + public static final double MIN_VALUE = java.lang.Double.MIN_VALUE; + + /** + * A constant holding the smallest positive normal value of type double, 2-1022. It is equal to + * the value returned by Double.longBitsToDouble(0x0010000000000000L). + * + * @since 1.5 + */ + public static final double MIN_NORMAL = 2.2250738585072014E-308; + + /** + * The number of logical bits in the significand of a double number, including the implicit bit. + */ + public static final int SIGNIFICAND_WIDTH = 53; + + /** + * Maximum exponent a finite double number may have. It is equal to the value returned by + * Math.ilogb(Double.MAX_VALUE). + */ + public static final int MAX_EXPONENT = 1023; + + /** + * Minimum exponent a normalized double number may have. It is equal to the value returned by + * Math.ilogb(Double.MIN_NORMAL). + */ + public static final int MIN_EXPONENT = -1022; + + /** + * The exponent the smallest positive double subnormal value would have if it could be normalized. It is + * equal to the value returned by FpUtils.ilogb(Double.MIN_VALUE). + */ + public static final int MIN_SUB_EXPONENT = MIN_EXPONENT - (SIGNIFICAND_WIDTH - 1); + + /** + * Bias used in representing a double exponent. + */ + public static final int EXP_BIAS = 1023; + + /** + * Bit mask to isolate the sign bit of a double. + */ + public static final long SIGN_BIT_MASK = 0x8000000000000000L; + + /** + * Bit mask to isolate the exponent field of a double. + */ + public static final long EXP_BIT_MASK = 0x7FF0000000000000L; + + /** + * Bit mask to isolate the significand field of a double. + */ + public static final long SIGNIF_BIT_MASK = 0x000FFFFFFFFFFFFFL; + + static { + // verify bit masks cover all bit positions and that the bit + // masks are non-overlapping + assert (((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0L) && (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0L) + && ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0L) && ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0L))); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java new file mode 100644 index 0000000000..d2b30347e5 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/FloatConsts.java @@ -0,0 +1,97 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +/** + * This class contains additional constants documenting limits of the float type. + * + * @author Joseph D. Darcy + */ + +public class FloatConsts { + /** + * Don't let anyone instantiate this class. + */ + private FloatConsts() { + } + + public static final float POSITIVE_INFINITY = java.lang.Float.POSITIVE_INFINITY; + + public static final float NEGATIVE_INFINITY = java.lang.Float.NEGATIVE_INFINITY; + + public static final float NaN = java.lang.Float.NaN; + + public static final float MAX_VALUE = java.lang.Float.MAX_VALUE; + + public static final float MIN_VALUE = java.lang.Float.MIN_VALUE; + + /** + * A constant holding the smallest positive normal value of type float, 2-126. It is equal to + * the value returned by Float.intBitsToFloat(0x00800000). + */ + public static final float MIN_NORMAL = 1.17549435E-38f; + + /** + * The number of logical bits in the significand of a float number, including the implicit bit. + */ + public static final int SIGNIFICAND_WIDTH = 24; + + /** + * Maximum exponent a finite float number may have. It is equal to the value returned by + * Math.ilogb(Float.MAX_VALUE). + */ + public static final int MAX_EXPONENT = 127; + + /** + * Minimum exponent a normalized float number may have. It is equal to the value returned by + * Math.ilogb(Float.MIN_NORMAL). + */ + public static final int MIN_EXPONENT = -126; + + /** + * The exponent the smallest positive float subnormal value would have if it could be normalized. It is + * equal to the value returned by FpUtils.ilogb(Float.MIN_VALUE). + */ + public static final int MIN_SUB_EXPONENT = MIN_EXPONENT - (SIGNIFICAND_WIDTH - 1); + + /** + * Bias used in representing a float exponent. + */ + public static final int EXP_BIAS = 127; + + /** + * Bit mask to isolate the sign bit of a float. + */ + public static final int SIGN_BIT_MASK = 0x80000000; + + /** + * Bit mask to isolate the exponent field of a float. + */ + public static final int EXP_BIT_MASK = 0x7F800000; + + /** + * Bit mask to isolate the significand field of a float. + */ + public static final int SIGNIF_BIT_MASK = 0x007FFFFF; + + static { + // verify bit masks cover all bit positions and that the bit + // masks are non-overlapping + assert (((SIGN_BIT_MASK | EXP_BIT_MASK | SIGNIF_BIT_MASK) == ~0) && (((SIGN_BIT_MASK & EXP_BIT_MASK) == 0) + && ((SIGN_BIT_MASK & SIGNIF_BIT_MASK) == 0) && ((EXP_BIT_MASK & SIGNIF_BIT_MASK) == 0))); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java new file mode 100644 index 0000000000..42511cc24c --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/FpUtils.java @@ -0,0 +1,986 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util; + +import com.sun.ts.lib.util.FloatConsts; +import com.sun.ts.lib.util.DoubleConsts; + +/** + * The class {@code FpUtils} contains static utility methods for manipulating and inspecting {@code float} and + * {@code double} floating-point numbers. These methods include functionality recommended or required by the IEEE 754 + * floating-point standard. + * + * @author Joseph D. Darcy + */ + +public class FpUtils { + /* + * The methods in this class are reasonably implemented using direct or indirect bit-level manipulation of + * floating-point values. However, having access to the IEEE 754 recommended functions would obviate the need for most + * programmers to engage in floating-point bit-twiddling. + * + * An IEEE 754 number has three fields, from most significant bit to to least significant, sign, exponent, and + * significand. + * + * msb lsb [sign|exponent| fractional_significand] + * + * Using some encoding cleverness, explained below, the high order bit of the logical significand does not need to be + * explicitly stored, thus "fractional_significand" instead of simply "significand" in the figure above. + * + * For finite normal numbers, the numerical value encoded is + * + * (-1)^sign * 2^(exponent)*(1.fractional_significand) + * + * Most finite floating-point numbers are normalized; the exponent value is reduced until the leading significand bit is + * 1. Therefore, the leading 1 is redundant and is not explicitly stored. If a numerical value is so small it cannot be + * normalized, it has a subnormal representation. Subnormal numbers don't have a leading 1 in their significand; + * subnormals are encoding using a special exponent value. In other words, the high-order bit of the logical significand + * can be elided in from the representation in either case since the bit's value is implicit from the exponent value. + * + * The exponent field uses a biased representation; if the bits of the exponent are interpreted as a unsigned integer E, + * the exponent represented is E - E_bias where E_bias depends on the floating-point format. E can range between E_min + * and E_max, constants which depend on the floating-point format. E_min and E_max are -126 and +127 for float, -1022 + * and +1023 for double. + * + * The 32-bit float format has 1 sign bit, 8 exponent bits, and 23 bits for the significand (which is logically 24 bits + * wide because of the implicit bit). The 64-bit double format has 1 sign bit, 11 exponent bits, and 52 bits for the + * significand (logically 53 bits). + * + * Subnormal numbers and zero have the special exponent value E_min -1; the numerical value represented by a subnormal + * is: + * + * (-1)^sign * 2^(E_min)*(0.fractional_significand) + * + * Zero is represented by all zero bits in the exponent and all zero bits in the significand; zero can have either sign. + * + * Infinity and NaN are encoded using the exponent value E_max + 1. Signed infinities have all significand bits zero; + * NaNs have at least one non-zero significand bit. + * + * The details of IEEE 754 floating-point encoding will be used in the methods below without further comment. For + * further exposition on IEEE 754 numbers, see "IEEE Standard for Binary Floating-Point Arithmetic" ANSI/IEEE Std + * 754-1985 or William Kahan's "Lecture Notes on the Status of IEEE Standard 754 for Binary Floating-Point Arithmetic", + * http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps. + * + * Many of this class's methods are members of the set of IEEE 754 recommended functions or similar functions + * recommended or required by IEEE 754R. Discussion of various implementation techniques for these functions have + * occurred in: + * + * W.J. Cody and Jerome T. Coonen, "Algorithm 772 Functions to Support the IEEE Standard for Binary Floating-Point + * Arithmetic," ACM Transactions on Mathematical Software, vol. 19, no. 4, December 1993, pp. 443-451. + * + * Joseph D. Darcy, "Writing robust IEEE recommended functions in ``100% Pure Java''(TM)," University of California, + * Berkeley technical report UCB//CSD-98-1009. + */ + + /** + * Don't let anyone instantiate this class. + */ + private FpUtils() { + } + + // Constants used in scalb + static double twoToTheDoubleScaleUp = powerOfTwoD(512); + + static double twoToTheDoubleScaleDown = powerOfTwoD(-512); + + // Helper Methods + + // The following helper methods are used in the implementation of + // the public recommended functions; they generally omit certain + // tests for exception cases. + + /** + * Returns unbiased exponent of a {@code double}. + */ + public static int getExponent(double d) { + /* + * Bitwise convert d to long, mask out exponent bits, shift to the right and then subtract out double's bias adjust to + * get true exponent value. + */ + return (int) (((Double.doubleToRawLongBits(d) & DoubleConsts.EXP_BIT_MASK) >> (DoubleConsts.SIGNIFICAND_WIDTH - 1)) + - DoubleConsts.EXP_BIAS); + } + + /** + * Returns unbiased exponent of a {@code float}. + */ + public static int getExponent(float f) { + /* + * Bitwise convert f to integer, mask out exponent bits, shift to the right and then subtract out float's bias adjust to + * get true exponent value + */ + return ((Float.floatToRawIntBits(f) & FloatConsts.EXP_BIT_MASK) >> (FloatConsts.SIGNIFICAND_WIDTH - 1)) - FloatConsts.EXP_BIAS; + } + + /** + * Returns a floating-point power of two in the normal range. + */ + static double powerOfTwoD(int n) { + assert (n >= DoubleConsts.MIN_EXPONENT && n <= DoubleConsts.MAX_EXPONENT); + return Double.longBitsToDouble( + (((long) n + (long) DoubleConsts.EXP_BIAS) << (DoubleConsts.SIGNIFICAND_WIDTH - 1)) & DoubleConsts.EXP_BIT_MASK); + } + + /** + * Returns a floating-point power of two in the normal range. + */ + static float powerOfTwoF(int n) { + assert (n >= FloatConsts.MIN_EXPONENT && n <= FloatConsts.MAX_EXPONENT); + return Float.intBitsToFloat(((n + FloatConsts.EXP_BIAS) << (FloatConsts.SIGNIFICAND_WIDTH - 1)) & FloatConsts.EXP_BIT_MASK); + } + + /** + * Returns the first floating-point argument with the sign of the second floating-point argument. Note that unlike the + * {@link FpUtils#copySign(double, double) copySign} method, this method does not require NaN {@code sign} arguments to + * be treated as positive values; implementations are permitted to treat some NaN arguments as positive and other NaN + * arguments as negative to allow greater performance. + * + * @param magnitude the parameter providing the magnitude of the result + * @param sign the parameter providing the sign of the result + * @return a value with the magnitude of {@code magnitude} and the sign of {@code sign}. + * @author Joseph D. Darcy + */ + public static double rawCopySign(double magnitude, double sign) { + return Double.longBitsToDouble((Double.doubleToRawLongBits(sign) & (DoubleConsts.SIGN_BIT_MASK)) + | (Double.doubleToRawLongBits(magnitude) & (DoubleConsts.EXP_BIT_MASK | DoubleConsts.SIGNIF_BIT_MASK))); + } + + /** + * Returns the first floating-point argument with the sign of the second floating-point argument. Note that unlike the + * {@link FpUtils#copySign(float, float) copySign} method, this method does not require NaN {@code sign} arguments to be + * treated as positive values; implementations are permitted to treat some NaN arguments as positive and other NaN + * arguments as negative to allow greater performance. + * + * @param magnitude the parameter providing the magnitude of the result + * @param sign the parameter providing the sign of the result + * @return a value with the magnitude of {@code magnitude} and the sign of {@code sign}. + * @author Joseph D. Darcy + */ + public static float rawCopySign(float magnitude, float sign) { + return Float.intBitsToFloat((Float.floatToRawIntBits(sign) & (FloatConsts.SIGN_BIT_MASK)) + | (Float.floatToRawIntBits(magnitude) & (FloatConsts.EXP_BIT_MASK | FloatConsts.SIGNIF_BIT_MASK))); + } + + /* ***************************************************************** */ + + /** + * Returns {@code true} if the argument is a finite floating-point value; returns {@code false} otherwise (for NaN and + * infinity arguments). + * + * @param d the {@code double} value to be tested + * @return {@code true} if the argument is a finite floating-point value, {@code false} otherwise. + */ + public static boolean isFinite(double d) { + return Math.abs(d) <= DoubleConsts.MAX_VALUE; + } + + /** + * Returns {@code true} if the argument is a finite floating-point value; returns {@code false} otherwise (for NaN and + * infinity arguments). + * + * @param f the {@code float} value to be tested + * @return {@code true} if the argument is a finite floating-point value, {@code false} otherwise. + */ + public static boolean isFinite(float f) { + return Math.abs(f) <= FloatConsts.MAX_VALUE; + } + + /** + * Returns {@code true} if the specified number is infinitely large in magnitude, {@code false} otherwise. + * + *

+ * Note that this method is equivalent to the {@link Double#isInfinite(double) Double.isInfinite} method; the + * functionality is included in this class for convenience. + * + * @param d the value to be tested. + * @return {@code true} if the value of the argument is positive infinity or negative infinity; {@code false} otherwise. + */ + public static boolean isInfinite(double d) { + return Double.isInfinite(d); + } + + /** + * Returns {@code true} if the specified number is infinitely large in magnitude, {@code false} otherwise. + * + *

+ * Note that this method is equivalent to the {@link Float#isInfinite(float) Float.isInfinite} method; the functionality + * is included in this class for convenience. + * + * @param f the value to be tested. + * @return {@code true} if the argument is positive infinity or negative infinity; {@code false} otherwise. + */ + public static boolean isInfinite(float f) { + return Float.isInfinite(f); + } + + /** + * Returns {@code true} if the specified number is a Not-a-Number (NaN) value, {@code false} otherwise. + * + *

+ * Note that this method is equivalent to the {@link Double#isNaN(double) Double.isNaN} method; the functionality is + * included in this class for convenience. + * + * @param d the value to be tested. + * @return {@code true} if the value of the argument is NaN; {@code false} otherwise. + */ + public static boolean isNaN(double d) { + return Double.isNaN(d); + } + + /** + * Returns {@code true} if the specified number is a Not-a-Number (NaN) value, {@code false} otherwise. + * + *

+ * Note that this method is equivalent to the {@link Float#isNaN(float) Float.isNaN} method; the functionality is + * included in this class for convenience. + * + * @param f the value to be tested. + * @return {@code true} if the argument is NaN; {@code false} otherwise. + */ + public static boolean isNaN(float f) { + return Float.isNaN(f); + } + + /** + * Returns {@code true} if the unordered relation holds between the two arguments. When two floating-point values are + * unordered, one value is neither less than, equal to, nor greater than the other. For the unordered relation to be + * true, at least one argument must be a {@code NaN}. + * + * @param arg1 the first argument + * @param arg2 the second argument + * @return {@code true} if at least one argument is a NaN, {@code false} otherwise. + */ + public static boolean isUnordered(double arg1, double arg2) { + return isNaN(arg1) || isNaN(arg2); + } + + /** + * Returns {@code true} if the unordered relation holds between the two arguments. When two floating-point values are + * unordered, one value is neither less than, equal to, nor greater than the other. For the unordered relation to be + * true, at least one argument must be a {@code NaN}. + * + * @param arg1 the first argument + * @param arg2 the second argument + * @return {@code true} if at least one argument is a NaN, {@code false} otherwise. + */ + public static boolean isUnordered(float arg1, float arg2) { + return isNaN(arg1) || isNaN(arg2); + } + + /** + * Returns unbiased exponent of a {@code double}; for subnormal values, the number is treated as if it were normalized. + * That is for all finite, non-zero, positive numbers x, scalb(x, -ilogb(x)) is always + * in the range [1, 2). + *

+ * Special cases: + *

    + *
  • If the argument is NaN, then the result is 230. + *
  • If the argument is infinite, then the result is 228. + *
  • If the argument is zero, then the result is -(228). + *
+ * + * @param d floating-point number whose exponent is to be extracted + * @return unbiased exponent of the argument. + * @author Joseph D. Darcy + */ + public static int ilogb(double d) { + int exponent = getExponent(d); + + switch (exponent) { + case DoubleConsts.MAX_EXPONENT + 1: // NaN or infinity + if (isNaN(d)) + return (1 << 30); // 2^30 + else // infinite value + return (1 << 28); // 2^28 + + case DoubleConsts.MIN_EXPONENT - 1: // zero or subnormal + if (d == 0.0) { + return -(1 << 28); // -(2^28) + } else { + long transducer = Double.doubleToRawLongBits(d); + + /* + * To avoid causing slow arithmetic on subnormals, the scaling to determine when d's significand is normalized is done + * in integer arithmetic. (there must be at least one "1" bit in the significand since zero has been screened out. + */ + + // isolate significand bits + transducer &= DoubleConsts.SIGNIF_BIT_MASK; + assert (transducer != 0L); + + // This loop is simple and functional. We might be + // able to do something more clever that was faster; + // e.g. number of leading zero detection on + // (transducer << (# exponent and sign bits). + while (transducer < (1L << (DoubleConsts.SIGNIFICAND_WIDTH - 1))) { + transducer *= 2; + exponent--; + } + exponent++; + assert (exponent >= DoubleConsts.MIN_EXPONENT - (DoubleConsts.SIGNIFICAND_WIDTH - 1) + && exponent < DoubleConsts.MIN_EXPONENT); + return exponent; + } + + default: + assert (exponent >= DoubleConsts.MIN_EXPONENT && exponent <= DoubleConsts.MAX_EXPONENT); + return exponent; + } + } + + /** + * Returns unbiased exponent of a {@code float}; for subnormal values, the number is treated as if it were normalized. + * That is for all finite, non-zero, positive numbers x, scalb(x, -ilogb(x)) is always + * in the range [1, 2). + *

+ * Special cases: + *

    + *
  • If the argument is NaN, then the result is 230. + *
  • If the argument is infinite, then the result is 228. + *
  • If the argument is zero, then the result is -(228). + *
+ * + * @param f floating-point number whose exponent is to be extracted + * @return unbiased exponent of the argument. + * @author Joseph D. Darcy + */ + public static int ilogb(float f) { + int exponent = getExponent(f); + + switch (exponent) { + case FloatConsts.MAX_EXPONENT + 1: // NaN or infinity + if (isNaN(f)) + return (1 << 30); // 2^30 + else // infinite value + return (1 << 28); // 2^28 + + case FloatConsts.MIN_EXPONENT - 1: // zero or subnormal + if (f == 0.0f) { + return -(1 << 28); // -(2^28) + } else { + int transducer = Float.floatToRawIntBits(f); + + /* + * To avoid causing slow arithmetic on subnormals, the scaling to determine when f's significand is normalized is done + * in integer arithmetic. (there must be at least one "1" bit in the significand since zero has been screened out. + */ + + // isolate significand bits + transducer &= FloatConsts.SIGNIF_BIT_MASK; + assert (transducer != 0); + + // This loop is simple and functional. We might be + // able to do something more clever that was faster; + // e.g. number of leading zero detection on + // (transducer << (# exponent and sign bits). + while (transducer < (1 << (FloatConsts.SIGNIFICAND_WIDTH - 1))) { + transducer *= 2; + exponent--; + } + exponent++; + assert (exponent >= FloatConsts.MIN_EXPONENT - (FloatConsts.SIGNIFICAND_WIDTH - 1) && exponent < FloatConsts.MIN_EXPONENT); + return exponent; + } + + default: + assert (exponent >= FloatConsts.MIN_EXPONENT && exponent <= FloatConsts.MAX_EXPONENT); + return exponent; + } + } + + /* + * The scalb operation should be reasonably fast; however, there are tradeoffs in writing a method to minimize the worst + * case performance and writing a method to minimize the time for expected common inputs. Some processors operate very + * slowly on subnormal operands, taking hundreds or thousands of cycles for one floating-point add or multiply as + * opposed to, say, four cycles for normal operands. For processors with very slow subnormal execution, scalb would be + * fastest if written entirely with integer operations; in other words, scalb would need to include the logic of + * performing correct rounding of subnormal values. This could be reasonably done in at most a few hundred cycles. + * However, this approach may penalize normal operations since at least the exponent of the floating-point argument must + * be examined. + * + * The approach taken in this implementation is a compromise. Floating-point multiplication is used to do most of the + * work; but knowingly multiplying by a subnormal scaling factor is avoided. However, the floating-point argument is not + * examined to see whether or not it is subnormal since subnormal inputs are assumed to be rare. At most three + * multiplies are needed to scale from the largest to smallest exponent ranges (scaling down, at most two multiplies are + * needed if subnormal scaling factors are allowed). However, in this implementation an expensive integer remainder + * operation is avoided at the cost of requiring five floating-point multiplies in the worst case, which should still be + * a performance win. + * + * If scaling of entire arrays is a concern, it would probably be more efficient to provide a double[] scalb(double[], + * int) version of scalb to avoid having to recompute the needed scaling factors for each floating-point value. + */ + + /** + * Return {@code d} × 2{@code scale_factor} rounded as if performed by a single correctly rounded + * floating-point multiply to a member of the double value set. See section 4.2.3 of The Java™ Language + * Specification for a discussion of floating-point value sets. If the exponent of the result is between the + * {@code double}'s minimum exponent and maximum exponent, the answer is calculated exactly. If the exponent of the + * result would be larger than {@code doubles}'s maximum exponent, an infinity is returned. Note that if the result is + * subnormal, precision may be lost; that is, when {@code scalb(x, + * n)} is subnormal, {@code scalb(scalb(x, n), -n)} may not equal x. When the result is non-NaN, the result has + * the same sign as {@code d}. + * + *

+ * Special cases: + *

    + *
  • If the first argument is NaN, NaN is returned. + *
  • If the first argument is infinite, then an infinity of the same sign is returned. + *
  • If the first argument is zero, then a zero of the same sign is returned. + *
+ * + * @param d number to be scaled by a power of two. + * @param scale_factor power of 2 used to scale {@code d} + * @return {@code d * }2{@code scale_factor} + * @author Joseph D. Darcy + */ + public static double scalb(double d, int scale_factor) { + /* + * This method does not need to be declared strictfp to compute the same correct result on all platforms. When scaling + * up, it does not matter what order the multiply-store operations are done; the result will be finite or overflow + * regardless of the operation ordering. However, to get the correct result when scaling down, a particular ordering + * must be used. + * + * When scaling down, the multiply-store operations are sequenced so that it is not possible for two consecutive + * multiply-stores to return subnormal results. If one multiply-store result is subnormal, the next multiply will round + * it away to zero. This is done by first multiplying by 2 ^ (scale_factor % n) and then multiplying several times by by + * 2^n as needed where n is the exponent of number that is a covenient power of two. In this way, at most one real + * rounding error occurs. If the double value set is being used exclusively, the rounding will occur on a multiply. If + * the double-extended-exponent value set is being used, the products will (perhaps) be exact but the stores to d are + * guaranteed to round to the double value set. + * + * It is _not_ a valid implementation to first multiply d by 2^MIN_EXPONENT and then by 2 ^ (scale_factor % + * MIN_EXPONENT) since even in a strictfp program double rounding on underflow could occur; e.g. if the scale_factor + * argument was (MIN_EXPONENT - n) and the exponent of d was a little less than -(MIN_EXPONENT - n), meaning the final + * result would be subnormal. + * + * Since exact reproducibility of this method can be achieved without any undue performance burden, there is no + * compelling reason to allow double rounding on underflow in scalb. + */ + + // magnitude of a power of two so large that scaling a finite + // nonzero value by it would be guaranteed to over or + // underflow; due to rounding, scaling down takes takes an + // additional power of two which is reflected here + final int MAX_SCALE = DoubleConsts.MAX_EXPONENT + -DoubleConsts.MIN_EXPONENT + DoubleConsts.SIGNIFICAND_WIDTH + 1; + int exp_adjust = 0; + int scale_increment = 0; + double exp_delta = Double.NaN; + + // Make sure scaling factor is in a reasonable range + + if (scale_factor < 0) { + scale_factor = Math.max(scale_factor, -MAX_SCALE); + scale_increment = -512; + exp_delta = twoToTheDoubleScaleDown; + } else { + scale_factor = Math.min(scale_factor, MAX_SCALE); + scale_increment = 512; + exp_delta = twoToTheDoubleScaleUp; + } + + // Calculate (scale_factor % +/-512), 512 = 2^9, using + // technique from "Hacker's Delight" section 10-2. + int t = (scale_factor >> 9 - 1) >>> 32 - 9; + exp_adjust = ((scale_factor + t) & (512 - 1)) - t; + + d *= powerOfTwoD(exp_adjust); + scale_factor -= exp_adjust; + + while (scale_factor != 0) { + d *= exp_delta; + scale_factor -= scale_increment; + } + return d; + } + + /** + * Return {@code f} × 2{@code scale_factor} rounded as if performed by a single correctly rounded + * floating-point multiply to a member of the float value set. See section 4.2.3 of The Java™ Language + * Specification for a discussion of floating-point value sets. If the exponent of the result is between the + * {@code float}'s minimum exponent and maximum exponent, the answer is calculated exactly. If the exponent of the + * result would be larger than {@code float}'s maximum exponent, an infinity is returned. Note that if the result is + * subnormal, precision may be lost; that is, when {@code scalb(x, n)} is subnormal, {@code scalb(scalb(x, n), -n)} may + * not equal x. When the result is non-NaN, the result has the same sign as {@code f}. + * + *

+ * Special cases: + *

    + *
  • If the first argument is NaN, NaN is returned. + *
  • If the first argument is infinite, then an infinity of the same sign is returned. + *
  • If the first argument is zero, then a zero of the same sign is returned. + *
+ * + * @param f number to be scaled by a power of two. + * @param scale_factor power of 2 used to scale {@code f} + * @return {@code f * }2{@code scale_factor} + * @author Joseph D. Darcy + */ + public static float scalb(float f, int scale_factor) { + // magnitude of a power of two so large that scaling a finite + // nonzero value by it would be guaranteed to over or + // underflow; due to rounding, scaling down takes takes an + // additional power of two which is reflected here + final int MAX_SCALE = FloatConsts.MAX_EXPONENT + -FloatConsts.MIN_EXPONENT + FloatConsts.SIGNIFICAND_WIDTH + 1; + + // Make sure scaling factor is in a reasonable range + scale_factor = Math.max(Math.min(scale_factor, MAX_SCALE), -MAX_SCALE); + + /* + * Since + MAX_SCALE for float fits well within the double exponent range and + float -> double conversion is exact the + * multiplication below will be exact. Therefore, the rounding that occurs when the double product is cast to float will + * be the correctly rounded float result. Since all operations other than the final multiply will be exact, it is not + * necessary to declare this method strictfp. + */ + return (float) ((double) f * powerOfTwoD(scale_factor)); + } + + /** + * Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both + * arguments compare as equal the second argument is returned. + * + *

+ * Special cases: + *

    + *
  • If either argument is a NaN, then NaN is returned. + * + *
  • If both arguments are signed zeros, {@code direction} is returned unchanged (as implied by the requirement of + * returning the second argument if the arguments compare as equal). + * + *
  • If {@code start} is ±{@code Double.MIN_VALUE} and {@code direction} has a value such that the result + * should have a smaller magnitude, then a zero with the same sign as {@code start} is returned. + * + *
  • If {@code start} is infinite and {@code direction} has a value such that the result should have a smaller + * magnitude, {@code Double.MAX_VALUE} with the same sign as {@code start} is returned. + * + *
  • If {@code start} is equal to ± {@code Double.MAX_VALUE} and {@code direction} has a value such that the + * result should have a larger magnitude, an infinity with same sign as {@code start} is returned. + *
+ * + * @param start starting floating-point value + * @param direction value indicating which of {@code start}'s neighbors or {@code start} should be returned + * @return The floating-point number adjacent to {@code start} in the direction of {@code direction}. + * @author Joseph D. Darcy + */ + public static double nextAfter(double start, double direction) { + /* + * The cases: + * + * nextAfter(+infinity, 0) == MAX_VALUE nextAfter(+infinity, +infinity) == +infinity nextAfter(-infinity, 0) == + * -MAX_VALUE nextAfter(-infinity, -infinity) == -infinity + * + * are naturally handled without any additional testing + */ + + // First check for NaN values + if (isNaN(start) || isNaN(direction)) { + // return a NaN derived from the input NaN(s) + return start + direction; + } else if (start == direction) { + return direction; + } else { // start > direction or start < direction + // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0) + // then bitwise convert start to integer. + long transducer = Double.doubleToRawLongBits(start + 0.0d); + + /* + * IEEE 754 floating-point numbers are lexicographically ordered if treated as signed- magnitude integers . Since Java's + * integers are two's complement, incrementing" the two's complement representation of a logically negative + * floating-point value *decrements* the signed-magnitude representation. Therefore, when the integer representation of + * a floating-point values is less than zero, the adjustment to the representation is in the opposite direction than + * would be expected at first . + */ + if (direction > start) { // Calculate next greater value + transducer = transducer + (transducer >= 0L ? 1L : -1L); + } else { // Calculate next lesser value + assert direction < start; + if (transducer > 0L) + --transducer; + else if (transducer < 0L) + ++transducer; + /* + * transducer==0, the result is -MIN_VALUE + * + * The transition from zero (implicitly positive) to the smallest negative signed magnitude value must be done + * explicitly. + */ + else + transducer = DoubleConsts.SIGN_BIT_MASK | 1L; + } + + return Double.longBitsToDouble(transducer); + } + } + + /** + * Returns the floating-point number adjacent to the first argument in the direction of the second argument. If both + * arguments compare as equal, the second argument is returned. + * + *

+ * Special cases: + *

    + *
  • If either argument is a NaN, then NaN is returned. + * + *
  • If both arguments are signed zeros, a {@code float} zero with the same sign as {@code direction} is returned (as + * implied by the requirement of returning the second argument if the arguments compare as equal). + * + *
  • If {@code start} is ±{@code Float.MIN_VALUE} and {@code direction} has a value such that the result should + * have a smaller magnitude, then a zero with the same sign as {@code start} is returned. + * + *
  • If {@code start} is infinite and {@code direction} has a value such that the result should have a smaller + * magnitude, {@code Float.MAX_VALUE} with the same sign as {@code start} is returned. + * + *
  • If {@code start} is equal to ± {@code Float.MAX_VALUE} and {@code direction} has a value such that the + * result should have a larger magnitude, an infinity with same sign as {@code start} is returned. + *
+ * + * @param start starting floating-point value + * @param direction value indicating which of {@code start}'s neighbors or {@code start} should be returned + * @return The floating-point number adjacent to {@code start} in the direction of {@code direction}. + * @author Joseph D. Darcy + */ + public static float nextAfter(float start, double direction) { + /* + * The cases: + * + * nextAfter(+infinity, 0) == MAX_VALUE nextAfter(+infinity, +infinity) == +infinity nextAfter(-infinity, 0) == + * -MAX_VALUE nextAfter(-infinity, -infinity) == -infinity + * + * are naturally handled without any additional testing + */ + + // First check for NaN values + if (isNaN(start) || isNaN(direction)) { + // return a NaN derived from the input NaN(s) + return start + (float) direction; + } else if (start == direction) { + return (float) direction; + } else { // start > direction or start < direction + // Add +0.0 to get rid of a -0.0 (+0.0 + -0.0 => +0.0) + // then bitwise convert start to integer. + int transducer = Float.floatToRawIntBits(start + 0.0f); + + /* + * IEEE 754 floating-point numbers are lexicographically ordered if treated as signed- magnitude integers . Since Java's + * integers are two's complement, incrementing" the two's complement representation of a logically negative + * floating-point value *decrements* the signed-magnitude representation. Therefore, when the integer representation of + * a floating-point values is less than zero, the adjustment to the representation is in the opposite direction than + * would be expected at first. + */ + if (direction > start) {// Calculate next greater value + transducer = transducer + (transducer >= 0 ? 1 : -1); + } else { // Calculate next lesser value + assert direction < start; + if (transducer > 0) + --transducer; + else if (transducer < 0) + ++transducer; + /* + * transducer==0, the result is -MIN_VALUE + * + * The transition from zero (implicitly positive) to the smallest negative signed magnitude value must be done + * explicitly. + */ + else + transducer = FloatConsts.SIGN_BIT_MASK | 1; + } + + return Float.intBitsToFloat(transducer); + } + } + + /** + * Returns the floating-point value adjacent to {@code d} in the direction of positive infinity. This method is + * semantically equivalent to {@code nextAfter(d, + * Double.POSITIVE_INFINITY)}; however, a {@code nextUp} implementation may run faster than its equivalent + * {@code nextAfter} call. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is positive infinity, the result is positive infinity. + * + *
  • If the argument is zero, the result is {@code Double.MIN_VALUE} + * + *
+ * + * @param d starting floating-point value + * @return The adjacent floating-point value closer to positive infinity. + * @author Joseph D. Darcy + */ + public static double nextUp(double d) { + if (isNaN(d) || d == Double.POSITIVE_INFINITY) + return d; + else { + d += 0.0d; + return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d >= 0.0d) ? +1L : -1L)); + } + } + + /** + * Returns the floating-point value adjacent to {@code f} in the direction of positive infinity. This method is + * semantically equivalent to {@code nextAfter(f, + * Double.POSITIVE_INFINITY)}; however, a {@code nextUp} implementation may run faster than its equivalent + * {@code nextAfter} call. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is positive infinity, the result is positive infinity. + * + *
  • If the argument is zero, the result is {@code Float.MIN_VALUE} + * + *
+ * + * @param f starting floating-point value + * @return The adjacent floating-point value closer to positive infinity. + * @author Joseph D. Darcy + */ + public static float nextUp(float f) { + if (isNaN(f) || f == FloatConsts.POSITIVE_INFINITY) + return f; + else { + f += 0.0f; + return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f >= 0.0f) ? +1 : -1)); + } + } + + /** + * Returns the floating-point value adjacent to {@code d} in the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(d, + * Double.NEGATIVE_INFINITY)}; however, a {@code nextDown} implementation may run faster than its equivalent + * {@code nextAfter} call. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is negative infinity. + * + *
  • If the argument is zero, the result is {@code -Double.MIN_VALUE} + * + *
+ * + * @param d starting floating-point value + * @return The adjacent floating-point value closer to negative infinity. + * @author Joseph D. Darcy + */ + public static double nextDown(double d) { + if (isNaN(d) || d == Double.NEGATIVE_INFINITY) + return d; + else { + if (d == 0.0) + return -Double.MIN_VALUE; + else + return Double.longBitsToDouble(Double.doubleToRawLongBits(d) + ((d > 0.0d) ? -1L : +1L)); + } + } + + /** + * Returns the floating-point value adjacent to {@code f} in the direction of negative infinity. This method is + * semantically equivalent to {@code nextAfter(f, + * Float.NEGATIVE_INFINITY)}; however, a {@code nextDown} implementation may run faster than its equivalent + * {@code nextAfter} call. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, the result is NaN. + * + *
  • If the argument is negative infinity, the result is negative infinity. + * + *
  • If the argument is zero, the result is {@code -Float.MIN_VALUE} + * + *
+ * + * @param f starting floating-point value + * @return The adjacent floating-point value closer to negative infinity. + * @author Joseph D. Darcy + */ + public static double nextDown(float f) { + if (isNaN(f) || f == Float.NEGATIVE_INFINITY) + return f; + else { + if (f == 0.0f) + return -Float.MIN_VALUE; + else + return Float.intBitsToFloat(Float.floatToRawIntBits(f) + ((f > 0.0f) ? -1 : +1)); + } + } + + /** + * Returns the first floating-point argument with the sign of the second floating-point argument. For this method, a NaN + * {@code sign} argument is always treated as if it were positive. + * + * @param magnitude the parameter providing the magnitude of the result + * @param sign the parameter providing the sign of the result + * @return a value with the magnitude of {@code magnitude} and the sign of {@code sign}. + * @author Joseph D. Darcy + * @since 1.5 + */ + public static double copySign(double magnitude, double sign) { + return rawCopySign(magnitude, (isNaN(sign) ? 1.0d : sign)); + } + + /** + * Returns the first floating-point argument with the sign of the second floating-point argument. For this method, a NaN + * {@code sign} argument is always treated as if it were positive. + * + * @param magnitude the parameter providing the magnitude of the result + * @param sign the parameter providing the sign of the result + * @return a value with the magnitude of {@code magnitude} and the sign of {@code sign}. + * @author Joseph D. Darcy + */ + public static float copySign(float magnitude, float sign) { + return rawCopySign(magnitude, (isNaN(sign) ? 1.0f : sign)); + } + + /** + * Returns the size of an ulp of the argument. An ulp of a {@code double} value is the positive distance between this + * floating-point value and the {@code double} value next larger in magnitude. Note that for non-NaN x, + * ulp(-x) == ulp(x). + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, then the result is NaN. + *
  • If the argument is positive or negative infinity, then the result is positive infinity. + *
  • If the argument is positive or negative zero, then the result is {@code Double.MIN_VALUE}. + *
  • If the argument is ±{@code Double.MAX_VALUE}, then the result is equal to 2971. + *
+ * + * @param d the floating-point value whose ulp is to be returned + * @return the size of an ulp of the argument + * @author Joseph D. Darcy + * @since 1.5 + */ + public static double ulp(double d) { + int exp = getExponent(d); + + switch (exp) { + case DoubleConsts.MAX_EXPONENT + 1: // NaN or infinity + return Math.abs(d); + + case DoubleConsts.MIN_EXPONENT - 1: // zero or subnormal + return Double.MIN_VALUE; + + default: + assert exp <= DoubleConsts.MAX_EXPONENT && exp >= DoubleConsts.MIN_EXPONENT; + + // ulp(x) is usually 2^(SIGNIFICAND_WIDTH-1)*(2^ilogb(x)) + exp = exp - (DoubleConsts.SIGNIFICAND_WIDTH - 1); + if (exp >= DoubleConsts.MIN_EXPONENT) { + return powerOfTwoD(exp); + } else { + // return a subnormal result; left shift integer + // representation of Double.MIN_VALUE appropriate + // number of positions + return Double.longBitsToDouble(1L << (exp - (DoubleConsts.MIN_EXPONENT - (DoubleConsts.SIGNIFICAND_WIDTH - 1)))); + } + } + } + + /** + * Returns the size of an ulp of the argument. An ulp of a {@code float} value is the positive distance between this + * floating-point value and the {@code float} value next larger in magnitude. Note that for non-NaN x, + * ulp(-x) == ulp(x). + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, then the result is NaN. + *
  • If the argument is positive or negative infinity, then the result is positive infinity. + *
  • If the argument is positive or negative zero, then the result is {@code Float.MIN_VALUE}. + *
  • If the argument is ±{@code Float.MAX_VALUE}, then the result is equal to 2104. + *
+ * + * @param f the floating-point value whose ulp is to be returned + * @return the size of an ulp of the argument + * @author Joseph D. Darcy + * @since 1.5 + */ + public static float ulp(float f) { + int exp = getExponent(f); + + switch (exp) { + case FloatConsts.MAX_EXPONENT + 1: // NaN or infinity + return Math.abs(f); + + case FloatConsts.MIN_EXPONENT - 1: // zero or subnormal + return FloatConsts.MIN_VALUE; + + default: + assert exp <= FloatConsts.MAX_EXPONENT && exp >= FloatConsts.MIN_EXPONENT; + + // ulp(x) is usually 2^(SIGNIFICAND_WIDTH-1)*(2^ilogb(x)) + exp = exp - (FloatConsts.SIGNIFICAND_WIDTH - 1); + if (exp >= FloatConsts.MIN_EXPONENT) { + return powerOfTwoF(exp); + } else { + // return a subnormal result; left shift integer + // representation of FloatConsts.MIN_VALUE appropriate + // number of positions + return Float.intBitsToFloat(1 << (exp - (FloatConsts.MIN_EXPONENT - (FloatConsts.SIGNIFICAND_WIDTH - 1)))); + } + } + } + + /** + * Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, + * -1.0 if the argument is less than zero. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, then the result is NaN. + *
  • If the argument is positive zero or negative zero, then the result is the same as the argument. + *
+ * + * @param d the floating-point value whose signum is to be returned + * @return the signum function of the argument + * @author Joseph D. Darcy + * @since 1.5 + */ + public static double signum(double d) { + return (d == 0.0 || isNaN(d)) ? d : copySign(1.0, d); + } + + /** + * Returns the signum function of the argument; zero if the argument is zero, 1.0f if the argument is greater than zero, + * -1.0f if the argument is less than zero. + * + *

+ * Special Cases: + *

    + *
  • If the argument is NaN, then the result is NaN. + *
  • If the argument is positive zero or negative zero, then the result is the same as the argument. + *
+ * + * @param f the floating-point value whose signum is to be returned + * @return the signum function of the argument + * @author Joseph D. Darcy + * @since 1.5 + */ + public static float signum(float f) { + return (f == 0.0f || isNaN(f)) ? f : copySign(1.0f, f); + } + +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java similarity index 69% rename from libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java index 101e1bd120..801bb22bf1 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/RemoteLoggingInitException.java @@ -21,27 +21,25 @@ package com.sun.ts.lib.util; /** - * This exception is thrown by the init method of the TestUtil class, if - * anything goes wrong while establishing a socket connection back to the - * harness host. + * This exception is thrown by the init method of the TestUtil class, if anything goes wrong while establishing a socket + * connection back to the harness host. * * @author Kyle Grucci */ public class RemoteLoggingInitException extends java.lang.Exception { - /** - * creates a RemoteLoggingInitException - */ - public RemoteLoggingInitException() { - super(); - } + /** + * creates a RemoteLoggingInitException + */ + public RemoteLoggingInitException() { + super(); + } - /** - * creates a RemoteLoggingInitException with a message - * - * @param s - * the message - */ - public RemoteLoggingInitException(String s) { - super(s); - } + /** + * creates a RemoteLoggingInitException with a message + * + * @param s the message + */ + public RemoteLoggingInitException(String s) { + super(s); + } } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java new file mode 100644 index 0000000000..e4e7d1690a --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogAdapter.java @@ -0,0 +1,86 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.util; + +/** + * This class acts as an adapter between the logging API used in the API check utility and the logginf API available in + * the CTS harness. The API check utility uses a PrintWriter to log messages. The parts of the PrintWriter API used by + * the API check utility will be translated to TestUtil calls in this class. The SigLogIntf will capture the parts of + * the PrintWriter API that need to be reimplemented so API check can fit into the CTS test framework. + */ +public class SigLogAdapter implements SigLogIntf { + + private static final String NL = System.getProperty("line.separator", "\n"); + + private boolean dumpMessagesToStdErr; + + public SigLogAdapter() { + String useStdErr = System.getProperty("dump.api.check.stderr", "false"); + if (useStdErr.equalsIgnoreCase("true")) { + dumpMessagesToStdErr = true; + } + } + + public void println(String msg) { + print(msg + NL); + } + + public void println(Object obj) { + print(obj.toString() + NL); + } + + public void println(char c) { + print(c); + println(); + } + + public void println() { + print(NL); + } + + public void print(String msg) { + if (dumpMessagesToStdErr) { + System.err.println(msg); + } else { + TestUtil.logMsg(msg); + } + } + + public void print(Object obj) { + print(obj.toString()); + } + + public void print(char c) { + char[] chars = new char[] { c }; + print(new String(chars)); + } + + public void flush() { + // do nothing unless there is an equivalent call in TestUtil + // to flush the output stream + } + + public void close() { + // do nothing unless there is an equivalent call in TestUtil + // to close the output stream + } + +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java similarity index 54% rename from libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java index a28e9b0c57..0dedb85429 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/SigLogIntf.java @@ -21,32 +21,30 @@ package com.sun.ts.lib.util; /** - * This interface defines the API necessary for a signature verification - * application to log status messages, errors and debug messages to a common - * output repository. This interface will be used by the API check tool to log - * messages to the CTS output framework (namely the output methods defined in - * the TestUtil class). This interface will be implemented by an adapter class - * that will adapt the API defined in this interface to the logging API used by - * CTS test code. + * This interface defines the API necessary for a signature verification application to log status messages, errors and + * debug messages to a common output repository. This interface will be used by the API check tool to log messages to + * the CTS output framework (namely the output methods defined in the TestUtil class). This interface will be + * implemented by an adapter class that will adapt the API defined in this interface to the logging API used by CTS test + * code. */ public interface SigLogIntf { - public void println(String msg); + public void println(String msg); - public void println(Object obj); + public void println(Object obj); - public void println(char c); + public void println(char c); - public void println(); + public void println(); - public void print(String msg); + public void print(String msg); - public void print(Object obj); + public void print(Object obj); - public void print(char c); + public void print(char c); - public void flush(); // nop + public void flush(); // nop - public void close(); // nop + public void close(); // nop } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java similarity index 55% rename from libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java index d2d7223a6e..21aada0519 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContext.java @@ -32,43 +32,39 @@ */ public class TSNamingContext implements TSNamingContextInterface, Serializable { - Properties props = null; + Properties props = null; - public TSNamingContext() throws Exception { - } + public TSNamingContext() throws Exception { + } - public TSNamingContext(Properties pp) throws Exception { - if (pp != null) { - props = pp; + public TSNamingContext(Properties pp) throws Exception { + if (pp != null) { + props = pp; + } } - } - /** - * Provides lookup of an object. - * - * @param s - * object name to lookup - * @param c - * object class to narrow to if remote object if null no narrow is - * performed. - */ - public Object lookup(String s, Class c) throws Exception { - Object o = lookup(s); - return (c != null && c.isAssignableFrom(o.getClass())) ? c.cast(o):null; - } + /** + * Provides lookup of an object. + * + * @param s object name to lookup + * @param c object class to narrow to if remote object if null no narrow is performed. + */ + public Object lookup(String s, Class c) throws Exception { + Object o = lookup(s); + return (c != null && c.isAssignableFrom(o.getClass())) ? c.cast(o) : null; + } - /** - * Provides lookup of an object. - * - * @param s - * object name to lookup - */ - public Object lookup(String s) throws Exception { - if (props != null) { - return new InitialContext(props).lookup(s); - } else { - return new InitialContext().lookup(s); + /** + * Provides lookup of an object. + * + * @param s object name to lookup + */ + public Object lookup(String s) throws Exception { + if (props != null) { + return new InitialContext(props).lookup(s); + } else { + return new InitialContext().lookup(s); + } } - } } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java similarity index 77% rename from libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java index e424a709d1..d245144535 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSNamingContextInterface.java @@ -23,12 +23,11 @@ import java.util.*; /** - * TSNamingContextInterface provides the interface that must be implemented to - * provide the implementation specific naming context code needed to obtain the - * intial naming context and perform object lookups. + * TSNamingContextInterface provides the interface that must be implemented to provide the implementation specific + * naming context code needed to obtain the intial naming context and perform object lookups. */ public interface TSNamingContextInterface { - public Object lookup(String s, Class c) throws Exception; + public Object lookup(String s, Class c) throws Exception; - public Object lookup(String s) throws Exception; + public Object lookup(String s) throws Exception; } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java new file mode 100644 index 0000000000..638aa6e2e8 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/TSXADataSource.java @@ -0,0 +1,211 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * @(#)TSXADataSource.java 1.6 04/10/01 + */ + +package com.sun.ts.lib.util; + +import java.util.*; +import java.lang.reflect.*; +import javax.sql.XADataSource; + +public class TSXADataSource { + + private static final char PROPS_DELIM = ':'; + + private static final char PAIR_DELIM = '='; + + private static final char LITERAL_DELIM = '\''; + + private static final String XA_CLASS_NAME = "XADataSourceName"; + + private static TSXADataSource instance = new TSXADataSource(); + + private TSXADataSource() { + } + + public static TSXADataSource instance() { + return instance; + } + + private String lowerFirstChar(String str) { + String result = str; + if (str == null || str.length() == 0) { + return str; + } + char firstChar = str.charAt(0); + if (Character.isLowerCase(firstChar)) { + result = Character.toString(Character.toUpperCase(firstChar)) + result.substring(1); + } + return result; + } + + private void setProperties(Map props, Class clazz, Object target) throws Exception { + try { + Iterator iter = props.keySet().iterator(); + while (iter.hasNext()) { + String originalPropName = (String) iter.next(); + String propName = lowerFirstChar(originalPropName); + String methodName = "set" + propName; + Method m = findMethod(methodName, clazz); + String propValue = (String) props.get(originalPropName); + // Get the parameter type supported by the setter + Class[] parameters = m.getParameterTypes(); + Object[] values = new Object[1]; + // Now Convert the type to a wrapper object as needed + values[0] = convertType(parameters[0], propValue); + m.invoke(target, values); + System.err.println("$$$$$ TSXADataSource.setProperties \"[" + originalPropName + ", " + propValue + "]\""); + } + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + + private Map getProps(String arg) throws Exception { + Map result = new HashMap(); + boolean inValue = false; + boolean inQuote = false; + StringBuffer nameBuffer = new StringBuffer(); + StringBuffer valueBuffer = new StringBuffer(); + int numChars = arg.length(); + for (int i = 0; i < numChars; i++) { + char current = arg.charAt(i); + if (Character.isWhitespace(current)) { + continue; + } + if (current == PAIR_DELIM) { + inValue = true; + } else if (current == LITERAL_DELIM) { + inQuote = !inQuote; + } else if (current == PROPS_DELIM && !inQuote) { + inValue = false; + result.put(nameBuffer.toString(), valueBuffer.toString()); + nameBuffer.delete(0, nameBuffer.length()); + valueBuffer.delete(0, valueBuffer.length()); + } else { + if (inQuote || inValue) { + valueBuffer.append(current); + } else { + nameBuffer.append(current); + } + } + } + result.put(nameBuffer.toString(), valueBuffer.toString()); + System.err.println("$$$$$ getProps()" + result); + return result; + } + + /** + * Find a specific method within a Class + * + * @param methodName the name of the method to search for in clazz + * @param clazz The Class to search for 'methodName' in + * @return the returned Method. + * @throws Exception, in case methodName cannot be found in clazz + */ + private Method findMethod(String methodName, Class clazz) throws Exception { + Method[] methods = clazz.getMethods(); + Method result = null; + for (int i = 0; i < methods.length; i++) { + if (methods[i].getName().equalsIgnoreCase(methodName)) { + result = methods[i]; + System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); + System.err.println("$$$$$ findMethod() found method: " + result); + System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); + break; + } + } + if (result == null) { + throw new Exception("$$$$ Could not find method " + methodName + " in Class: " + clazz.getName()); + } + return result; + } + + /** + * Converts the type from String to the Class type. + * + * @param type Class name to which the conversion is required. + * @param parameter String value to be converted. + * @return Converted value. + * @throws NumberFormatException, in case of the mismatch of parameter values. + */ + private Object convertType(Class type, String parameter) throws NumberFormatException { + try { + String typeName = type.getName(); + if (typeName.equals("java.lang.String") || typeName.equals("java.lang.Object")) { + return parameter; + } + + if (typeName.equals("int") || typeName.equals("java.lang.Integer")) { + return new Integer(parameter); + } + + if (typeName.equals("short") || typeName.equals("java.lang.Short")) { + return new Short(parameter); + } + + if (typeName.equals("byte") || typeName.equals("java.lang.Byte")) { + return new Byte(parameter); + } + + if (typeName.equals("long") || typeName.equals("java.lang.Long")) { + return new Long(parameter); + } + + if (typeName.equals("float") || typeName.equals("java.lang.Float")) { + return new Float(parameter); + } + + if (typeName.equals("double") || typeName.equals("java.lang.Double")) { + return new Double(parameter); + } + + if (typeName.equals("java.math.BigDecimal")) { + return new java.math.BigDecimal(parameter); + } + + if (typeName.equals("java.math.BigInteger")) { + return new java.math.BigInteger(parameter); + } + + if (typeName.equals("boolean") || typeName.equals("java.lang.Boolean")) { + return new Boolean(parameter); + } + + return parameter; + } catch (NumberFormatException nfe) { + System.err.println("$$$$$ NumberFormatException Encountered"); + throw nfe; + } + } + + public XADataSource getXADataSource(String xaProps, String className) throws Exception { + System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); + System.err.println("xaProps \"" + xaProps + "\""); + System.err.println("className \"" + className + "\""); + System.err.println("$$$$$$$$$$$$$$$$$$$$$$$$$"); + Map props = getProps(xaProps); + Class clazz = Class.forName(className); + XADataSource target = (XADataSource) clazz.newInstance(); + setProperties(props, clazz, target); + return target; + } + +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java similarity index 67% rename from libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java index 80fa81b12a..84fd6a3b9e 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/TestReportInfo.java @@ -25,24 +25,20 @@ import java.net.*; import java.text.SimpleDateFormat; - - - public class TestReportInfo implements Serializable { - public int iDebugLevel = TestUtil.NORMAL_OUTPUT_LEVEL; + public int iDebugLevel = TestUtil.NORMAL_OUTPUT_LEVEL; - public String sOutput = ""; // Constants.EMPTY_STRING; + public String sOutput = ""; // Constants.EMPTY_STRING; - public Throwable exception = null; + public Throwable exception = null; - public int iStream = TestUtil.OUTPUT_STREAM; + public int iStream = TestUtil.OUTPUT_STREAM; - public TestReportInfo(String output, int stream, int level, Throwable e) { - if (sOutput != null) - sOutput = output; - iDebugLevel = level; - exception = e; - iStream = stream; - } + public TestReportInfo(String output, int stream, int level, Throwable e) { + if (sOutput != null) + sOutput = output; + iDebugLevel = level; + exception = e; + iStream = stream; + } } - diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java new file mode 100644 index 0000000000..75dd6f4601 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/TestUtil.java @@ -0,0 +1,1078 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.util; + +import java.io.*; +import java.util.*; +import java.net.*; +import java.text.SimpleDateFormat; + +/** + * TestUtil is a final utility class responsible for implementing logging across multiple VMs. It also contains many + * convenience methods for logging property object contents, stacktraces, and header lines. + * + * @author Kyle Grucci + * + */ +public final class TestUtil { + public static boolean traceflag = true; + + // this can be set in TestUtil's start logging method!! + public static String sTestName; + + public static final String[] EMPTY_STRING_ARRAY = new String[0]; + + public static final int VM_UNDER_TEST = 0; + + public static final int VM_HARNESS = 1; // this is really the test client VM + + public static final int VM_JAVATEST = 2; + + public static final int DEBUG_OUTPUT_LEVEL = 2; + + public static final int NORMAL_OUTPUT_LEVEL = 3; + + public static final int ERROR_STREAM = 4; + + public static final int OUTPUT_STREAM = 5; + + public static String NEW_LINE = System.getProperty("line.separator", "\n"); + + // by default so the testers don't have to do anything + public static int iWhereAreWe = VM_UNDER_TEST; + + private static PrintWriter out = null; + + private static PrintWriter err = null; + + private static PrintWriter additionalWriter = null; + + private static ObjectOutputStream objectOutputStream = null; + + private static ObjectOutputStream objectInputStream = null; + + private static Socket socketOnRemoteVM = null; + + private static boolean bAlreadyInitialized = false; + + private static Object socketMutex = new Object(); + + private static int portOfHarness = 2000; + + private static String hostOfHarness = "unset host"; + + private static Vector vBuffereredOutput = new Vector(); + + // Transaction Attribute Value Mapping Table + private static final String UNRECOGNIZED_STATUS = "UNRECOGNIZED_STATUS"; + + private static final String transactionTable[] = { "STATUS_ACTIVE", // 0 + "STATUS_MARKED_ROLLBACK", // 1 + "STATUS_PREPARED", // 2 + "STATUS_COMMITTED", // 3 + "STATUS_ROLLEDBACK", // 4 + "STATUS_UNKNOWN", // 5 + "STATUS_NO_TRANSACTION", // 6 + "STATUS_PREPARING", // 7 + "STATUS_COMMITTING", // 8 + "STATUS_ROLLING_BACK", // 9 + }; + + // debug flag for printing TS harness debug output + public static boolean harnessDebug; + + // hang onto the props that are passed in during logging init calls + private static Properties testProps = null; + + private static SimpleDateFormat df = new SimpleDateFormat("MM-dd-yyyy HH:mm:ss"); + + static { + harnessDebug = Boolean.getBoolean("cts.harness.debug"); + } + + /** + * used by harness to log debug output to the standard output stream + * + * @param s the output string + */ + public static void logHarnessDebug(String s) { + if (harnessDebug) { + logHarness(s, null); + } + } + + /** + * used by TSTestFinder and TSScript to log output to the standard output stream + * + * @param s the output string + * @param t a Throwable whose stacktrace gets printed + */ + public static void logHarness(String s, Throwable t) { + synchronized (System.out) { + System.out.println(df.format(new Date()) + ": Harness - " + s); + logToAdditionalWriter(s, t); + if (t != null) { + t.printStackTrace(); + } + } + } + + public static void logHarness(String s) { + logHarness(s, null); + } + + private static void logToAdditionalWriter(String s) { + logToAdditionalWriter(s, null); + } + + private static void logToAdditionalWriter(String s, Throwable t) { + if (additionalWriter != null) + additionalWriter.println(s); + if (t != null) { + t.printStackTrace(additionalWriter); + } + } + + /** + * This method returns the properties object + * + * @return the properties object + */ + public static Properties getProperties() { + if (testProps == null) { + testProps = getPropsFromFile(); + } + return testProps; + } + + /** + * This method returns the property value for the appropriate property key + * + * @param s the property name + * @return the property value + */ + public static String getProperty(String s) { + Properties p = getProperties(); + return getProperty(p, s); + } + + /** + * This method returns the property value for the appropriate property key + * + * @param s the property name + * @return the property value + */ + public static String getProperty(String s, String defaultValue) { + Properties p = getProperties(); + return getProperty(p, s, defaultValue); + } + + /** + * Reads a property from the properties object and logs a message if the value is not set + * + * @param props the properties object + * @param key the property key + * @return the property value, null if not set + */ + public static String getProperty(Properties props, String key) { + String value = props.getProperty(key); + if (value == null) { + logMsg("Test property " + key + " is not set"); + } + return value; + } + + /** + * Reads a property from the properties object and logs a message if the value is not set + * + * @param props the properties object + * @param key the property key + * @param defaultValue the default value + * @return the property value, defaultValue if not set + */ + public static String getProperty(Properties props, String key, String defaultValue) { + String value = props.getProperty(key); + if (value == null) { + logMsg("Test property " + key + " is not set, using: " + defaultValue); + value = defaultValue; + } + return value; + } + + /** + * Wrapper for System.getProperty(String) that logs missing properties + * + * @param key the property key + * @return the property value + */ + public static String getSystemProperty(String key) { + String value = System.getProperty(key); + if (value == null) { + logMsg("System property " + key + " is not set"); + } + return value; + } + + public static String getSystemProperty(String key, String def) { + return System.getProperty(key, def); + } + + /** + * returns the transaction status value as a String given its integer representation + * + * @param status integer representation of a transaction status + * @return string representation of a transaction status + */ + public static String getTransactionStatus(int status) { + if (status < 0 || status > transactionTable.length - 1) + return UNRECOGNIZED_STATUS; + else + return transactionTable[status]; + } + + /** + * prints the transaction status value as a String given its integer representation + * + * @param status integer representation of a transaction status + */ + public static void printTransactionStatus(int status) { + logMsg("TRANSACTION_STATUS: " + getTransactionStatus(status)); + } + + // MilliSeconds Multiple + public static final int MILLI = 1000; + + /** + * pauses the calling thread for the specified number of seconds + * + * @param s number of seconds + */ + public static void sleepSec(int s) { + logTrace("Sleeping " + s + " seconds"); + try { + Thread.sleep(s * MILLI); + } catch (InterruptedException e) { + logErr("Exception: " + e); + } + } + + /** + * pauses the calling thread for the specified number of milliseconds + * + * @param s number of milliseconds + */ + public static void sleep(int s) { + sleepMsec(s); + } + + /** + * pauses the calling thread for the specified number of milliseconds + * + * @param s number of milliseconds + */ + public static void sleepMsec(int s) { + logTrace("Sleeping " + s + " milliseconds"); + try { + Thread.sleep(s); + } catch (InterruptedException e) { + logErr("Exception: " + e); + } + } + + public static void flushStream() { + synchronized (socketMutex) { + try { + objectOutputStream.flush(); + } catch (Throwable t) { + // Ignore + // System.out.println("EXCEPTION WHILE FLUSHING"); + } + } + } + + public static void writeObject(TestReportInfo info) { + synchronized (socketMutex) { + flushStream(); + try { + objectOutputStream.writeObject(info); + // System.out.println("WROTE: " + info.sOutput); + } catch (Exception e) { + // System.out.println("EXCEPTION WHILE WRITING: " + info.sOutput); + synchronized (vBuffereredOutput) { + vBuffereredOutput.addElement(info); + // System.out.println("ADDED THIS STRING TO BUFFERED OUT: " + + // info.sOutput); + } + } + flushStream(); + } + } + + private static void sendBufferedData() throws Exception { + TestReportInfo tri = null; + synchronized (vBuffereredOutput) { + try { + // logMsg("vBuffereredOutput size = " + vBuffereredOutput.size()); + synchronized (socketMutex) { + for (int ii = 0; ii < vBuffereredOutput.size(); ii++) { + tri = (TestReportInfo) vBuffereredOutput.elementAt(ii); + writeObject(tri); + // System.out.println("WRITING_bufferedoutput: " + tri.sOutput); + // objectOutputStream.writeObject(tri); + // objectOutputStream.flush(); + // logMsg("writing: " + ii); + // logMsg("writing: " + tri.sOutput); + } + } + // logMsg("wrote buffered output"); + } catch (Exception e) { + throw e; + } finally { + vBuffereredOutput.removeAllElements(); + // logMsg("reinititialized buffered output vector"); + } + } + } + + private static final String PROPS_FILE_NAME = "-cts-props.txt"; + + private static final String PROPS_FILE; + + static { + String userName = System.getProperty("user.name"); + String tmpDir = System.getProperty("java.io.tmpdir", File.separator + "tmp"); + if (tmpDir.endsWith(File.separator)) { + PROPS_FILE = tmpDir + userName + PROPS_FILE_NAME; + } else { + PROPS_FILE = tmpDir + File.separator + userName + PROPS_FILE_NAME; + } + System.out.println("************************************************************"); + System.out.println("* props file set to \"" + PROPS_FILE + "\""); + System.out.println("************************************************************"); + } + + private static Properties getPropsFromFile() { + FileInputStream in = null; + Properties p = new Properties(); + try { + in = new FileInputStream(PROPS_FILE); + p.load(in); + } catch (Exception e) { + logErr("Error reading the Properties object", e); + } finally { + if (in != null) { + try { + in.close(); + } catch (Exception e) { + } + } + } + return p; + } + + private static void savePropsToFile(Properties p) { + try (FileOutputStream out = new FileOutputStream(PROPS_FILE)) { + p.store(out, "CTS Test Properties File"); + } catch (Exception e) { + logErr("Error saving the Properties object", e); + } + } + + /** + * This static method must be called once by each new remote VM. Once called, a socket connection is created back to the + * host running the test harness. All calls to logMsg, logErr, and logTrace are immediately sent back to the harness + * host. + * + * @param p properties containing harness host, port, and trace flag + * @exception RemoteLoggingInitException if an exception occurs while the server side is setting up the socket + * connection back to the client host + */ + public static void init(Properties p) throws RemoteLoggingInitException { + savePropsToFile(p); // persist properties to a disk file + // System.out.println("INIT_CALLED"); + synchronized (socketMutex) { + try { + // TSPropertyManager.createTSPropertyManager(p); + testProps = p; + if (p.isEmpty()) { + throw new RemoteLoggingInitException("Init: Error - Empty properties object passed to TestUtil.init"); + } + NEW_LINE = p.getProperty("line.separator"); + if (socketOnRemoteVM != null) { + socketOnRemoteVM.close(); + } + if (objectOutputStream != null) { + objectOutputStream.close(); + } + if (true) { + // System.out.println("INIT_CALLED AND SOCKET = NULL"); + traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); + hostOfHarness = p.getProperty("harness.host"); + portOfHarness = Integer.parseInt(p.getProperty("harness.log.port", "2000")); + if (hostOfHarness == null) { + throw new RemoteLoggingInitException("Init: Error while trying to getProperty(harness.host) - returned null"); + } + socketOnRemoteVM = new Socket(hostOfHarness, portOfHarness); + objectOutputStream = new ObjectOutputStream(socketOnRemoteVM.getOutputStream()); + sendBufferedData(); + // logMsg("socketOnRemoteVM=null, renewed everything"); + } else { + // we'll never get here now... + // call flush to make sure that we still have an open connection. + // if the client went away and a new client is being run, we will + // get an IOException, in which case we will reconnect. + // logMsg("socketOnRemoteVM != null, calling flush"); + // objectOutputStream.flush(); + // if this fails, then the connection is gone + // this is better than flush, because flush seems to always fail + TestReportInfo tri = new TestReportInfo("SVR: " + "Logging check", OUTPUT_STREAM, DEBUG_OUTPUT_LEVEL, null); + objectOutputStream.writeObject(tri); + // System.out.println("WROTE TEST OBJECT"); + } + } catch (UnknownHostException e) { + throw new RemoteLoggingInitException("You must pass a valid host string to init()"); + } catch (IOException e) { + // System.out.println("EXCEPTION WHILE WRITING TEST OBJECT"); + // the client VM may have shutdown, so establish a new connection + try { + // System.out.println("INIT_CALLED AND TRYING TO ESABLISH CONN. AFTER + // IOEXCEPTION"); + traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); + hostOfHarness = p.getProperty("harness.host"); + portOfHarness = Integer.parseInt(p.getProperty("harness.log.port", "2000")); + if (hostOfHarness == null) { + throw new RemoteLoggingInitException("Init: Error while trying to getProperty(harness.host) - returned null"); + } + if (socketOnRemoteVM != null) { + socketOnRemoteVM.close(); + } + socketOnRemoteVM = new Socket(hostOfHarness, portOfHarness); + objectOutputStream = new ObjectOutputStream(socketOnRemoteVM.getOutputStream()); + sendBufferedData(); + // logMsg("caught IOException from flush(), renewed everything"); + } catch (IOException e2) { + e2.printStackTrace(); + throw new RemoteLoggingInitException("IOException in TestUtil.init()"); + } catch (Exception e2) { + e2.printStackTrace(); + throw new RemoteLoggingInitException("got a random exception in init()"); + } + } catch (NumberFormatException e) { + throw new RemoteLoggingInitException("You must pass a valid port number string to init()"); + } catch (Exception e) { + e.printStackTrace(); + throw new RemoteLoggingInitException("got a random exception in init()"); + } + } + } + + /* + * This method is called by our harness code to allow code that is shared between the harness and the tests and calls + * TestUtil logMsg and logTrace to do the right thing inside of the JavaTest VM. These calls will call to our logHarness + * methods. + */ + public static void initJavaTest() { + iWhereAreWe = VM_JAVATEST; + } + + public static void setAdditionalWriter(PrintWriter pw) { + iWhereAreWe = VM_JAVATEST; + additionalWriter = pw; + } + + /** + * This static method must be called once by a VM which does not rely upon any remote logging. + * + * param p properties containing harness trace flag + */ + public static void initNoLogging(Properties p) { + if (bAlreadyInitialized) + return; + + testProps = p; + NEW_LINE = p.getProperty("line.separator"); + traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); + iWhereAreWe = VM_HARNESS; + bAlreadyInitialized = true; + } + + /** + * This static method must be called once by the harness VM. Once called, a serversocket begins listening for Remote VMs + * to connect on the port specified by harness.log.port. + * + * @param p properties containing harness trace flag + */ + public static void initClient(Properties p) { + if (bAlreadyInitialized) + return; + // start listener thread + try { + testProps = p; + NEW_LINE = p.getProperty("line.separator"); + traceflag = Boolean.parseBoolean(p.getProperty("harness.log.traceflag", "true")); + iWhereAreWe = VM_HARNESS; + ServerSocket ss = getServerSocket(p); + new Acceptor(ss); + bAlreadyInitialized = true; + } catch (IOException e) { + e.printStackTrace(); + } + } + + private static ServerSocket getServerSocket(Properties p) throws IOException { + ServerSocket result = null; + int port = 2000; + int retry = 10; + final int delaySeconds = 1; + try { + port = Integer.parseInt(p.getProperty("harness.log.port", "2000")); + } catch (NumberFormatException e1) { + e1.printStackTrace(); + System.err.println("Invalid value for harness.log.port," + " using default harness.log.port of " + port); + } + try { + retry = Integer.parseInt(p.getProperty("harness.socket.retry.count", "10")); + } catch (NumberFormatException e2) { + e2.printStackTrace(); + System.err.println("Invalid value for harness.socket.retry.count," + " using default harness.socket.retry.count of " + retry); + } + logTrace("####### Value of harness.socket.retry.count is \"" + retry + "\""); + logTrace("####### Value of harness.log.port is \"" + port + "\""); + result = getServerSocket0(port, retry, delaySeconds); + while (result == null) { + port++; + result = getServerSocket0(port, retry, delaySeconds); + } + p.setProperty("harness.log.port", Integer.toString(port)); + logTrace("####### Actual bind value of harness.log.port is \"" + port + "\""); + return result; + } + + private static ServerSocket getServerSocket0(int port, int retry, int delaySeconds) { + ServerSocket result = null; + for (int i = 0; i < retry; i++) { + try { + result = new ServerSocket(port); + break; + } catch (IOException e3) { + try { + Thread.sleep(delaySeconds * 1000); + } catch (InterruptedException e4) { + } + } + } + return result; + } + + /** + * This static method must be called once by the harness VM in order to set the output and error streams and the name of + * the current test. + * + * @param testName the currently running testname as specified in the source code tags + * @param outStream stream printed to by the logMsg and logTrace methods + * @param errStream stream printed to by the logErr methods + */ + public static void setCurrentTest(String testName, PrintWriter outStream, PrintWriter errStream) { + sTestName = testName; + out = outStream; + err = outStream; + } + + /** + * prints a string to the log stream. All tests should use this method for standard logging messages + * + * @param s string to print to the log stream + */ + public static void logMsg(String s) { + if (iWhereAreWe == VM_JAVATEST) { + logHarness(s); + } else if (iWhereAreWe == VM_HARNESS) { + synchronized (out) { + // just print to the appropriate stream + out.println(df.format(new Date()) + ": " + s); + out.flush(); + } + } else { + TestReportInfo tri = new TestReportInfo("SVR: " + s, OUTPUT_STREAM, NORMAL_OUTPUT_LEVEL, null); + writeObject( + tri); /* + * try { synchronized(socketMutex) { objectOutputStream.flush(); objectOutputStream.writeObject(tri); + * objectOutputStream.flush(); //System.out. println("successfully wrote to objectOutputStream"); } } + * catch(Exception ex) { //System.out. println("got exception trying to write to objectOutputStream" ); //if we + * have any problem, buffer the data synchronized(vBuffereredOutput) { vBuffereredOutput.addElement(tri); } } + */ + + } + } + + /** + * prints a string as well as the provided Throwable's stacktrace to the log stream. All tests should use this method + * for standard logging messages + * + * @param s string to print to the log stream + * @param t - throwable whose stacktrace gets printed* + * + */ + public static void logMsg(String s, Throwable t) { + if (iWhereAreWe == VM_JAVATEST) { + logHarnessDebug(s); + if (t != null) { + t.printStackTrace(); + } + } else { + if (iWhereAreWe == VM_HARNESS) { + synchronized (out) { + // just print to the appropriate stream + out.println(df.format(new Date()) + ": " + s); + out.flush(); + } + } else { + TestReportInfo tri = new TestReportInfo("SVR: " + s, OUTPUT_STREAM, NORMAL_OUTPUT_LEVEL, null); + writeObject(tri); + } + if (t != null) { + printStackTrace(t); + } + } + + } + + /** + * turns on/off debugging. Once on, all calls to the logTrace method result in messages being printed to the log stream. + * If off, all logTrace calls are not printed. + * + * @param b If true, debugging is on. If false, debugging is turned off. + */ + public static void setTrace(boolean b) { + traceflag = b; + } + + /** + * prints a debug string to the log stream. All tests should use this method for verbose logging messages. Whether or + * not the string is printed is determined by the last call to the setTrace method. + * + * @param s string to print to the log stream + */ + public static void logTrace(String s) { + logTrace(s, null); + } + + /** + * Prints a debug string as well as the provided Throwable's stacktrace. Use this if certain exceptions are only desired + * while tracing. + * + * @param s - string to print to the log stream + * @param t - throwable whose stactrace gets printed + */ + public static void logTrace(String s, Throwable t) { + if (traceflag) { + if (iWhereAreWe == VM_JAVATEST) { + logHarnessDebug(s); + } else { + if (iWhereAreWe == VM_HARNESS) { + synchronized (out) { + // just print to the appropriate stream + if (s != null && s.startsWith("SVR-TRACE")) + out.println(df.format(new Date()) + ": " + s); + else + out.println(df.format(new Date()) + ": TRACE: " + s); + } + } else { + TestReportInfo tri = new TestReportInfo("SVR-TRACE: " + s, OUTPUT_STREAM, DEBUG_OUTPUT_LEVEL, null); + writeObject(tri); + } + } + if (t != null) { + t.printStackTrace(); + } + } + } + + /** + * prints an error string to the error stream. All tests should use this method for error messages. + * + * @param s string to print to the error stream + * @param e a Throwable whose stacktrace gets printed + */ + public static void logErr(String s, Throwable e) { + if (iWhereAreWe == VM_JAVATEST) { + logHarness(s); + if (e != null) { + e.printStackTrace(); + } + } else { + if (iWhereAreWe == VM_HARNESS) { + synchronized (err) { + // just print to the appropriate stream + if (s != null && s.startsWith("SVR-ERROR")) + err.println(df.format(new Date()) + ": " + s); + else + err.println(df.format(new Date()) + ": ERROR: " + s); + } + } else { + TestReportInfo tri = new TestReportInfo("SVR-ERROR: " + s, ERROR_STREAM, NORMAL_OUTPUT_LEVEL, null); + writeObject(tri); + } + if (e != null) { + printStackTrace(e); + } + } + } + + /** + * prints an error string to the error stream. All tests should use this method for error messages. + * + * @param s string to print to the error stream + */ + public static void logErr(String s) { + logErr(s, null); + } + + /** + * prints the contents of a properties object to the logging stream + * + * @param p properties to print + */ + public static void list(Properties p) { + StringBuffer sb = new StringBuffer(); + if (p == null) + return; + sb.append("--- Property Listing ---").append(TestUtil.NEW_LINE); + Enumeration e = p.propertyNames(); + String key = null; + while (e.hasMoreElements()) { + key = (String) e.nextElement(); + sb.append(key).append("=").append(p.getProperty(key)).append(TestUtil.NEW_LINE); + } + sb.append("--- End Property Listing ---").append(TestUtil.NEW_LINE); + logTrace(new String(sb)); + } + + /** + * prints the stacktrace of a Throwable to the logging stream + * + * @param e exception to print the stacktrace of + */ + public static void printStackTrace(Throwable e) { + if (e == null) { + return; + } + try { + StringWriter sw = new StringWriter(); + PrintWriter writer = new PrintWriter(sw); + e.printStackTrace(writer); + logErr(sw.toString()); + writer.close(); + } catch (Exception E) { + } + } + + /** + * prints the stacktrace of a Throwable to a string + * + * @param e exception to print the stacktrace of + */ + public static String printStackTraceToString(Throwable e) { + String sTrace = ""; + if (e == null) + return ""; + try { + StringWriter sw = new StringWriter(); + PrintWriter writer = new PrintWriter(sw); + e.printStackTrace(writer); + sTrace = sw.toString(); + writer.close(); + } catch (Exception E) { + } + return sTrace; + } + + /** + * prints a line of asterisks to the logging stream + */ + public static void separator2() { + logMsg("**************************************************" + "******************************"); + } + + /** + * prints a line of dashes to the logging stream + */ + public static void separator1() { + logMsg("--------------------------------------------------" + "------------------------------"); + } + + /** + * Convience method to handle sucking in the data from a connection. + */ + public static String getResponse(URLConnection connection) throws IOException { + StringBuffer content; + BufferedReader in; + // set up the streams / readers + InputStream instream = connection.getInputStream(); + InputStreamReader inreader = new InputStreamReader(instream); + in = new BufferedReader(inreader); + // data structures + content = new StringBuffer(1024); + char[] chars = new char[1024]; + int length = 0; + // pull the data into the content buffer + while (length != -1) { + content.append(chars, 0, length); + length = in.read(chars, 0, chars.length); + } + // return + instream.close(); // john feb 16 + inreader.close(); // john feb 16 + in.close(); // john feb 16 + return content.toString(); + } + + /** + * Loads any properties that might be in a given String. + */ + public static Properties getResponseProperties(String string) throws IOException { + Properties props; + ByteArrayInputStream in; + byte[] bytes; + props = new Properties(); + bytes = string.getBytes(); + in = new ByteArrayInputStream(bytes); + props.load(in); + in.close(); + return props; + } + + /** + * One shot method to get Properties directly from a URLConnection. + */ + public static Properties getResponseProperties(URLConnection connection) throws IOException { + Properties props; + String input; + input = getResponse(connection); + props = getResponseProperties(input); + return props; + } + + public static String toEncodedString(Properties args) { + StringBuffer buf = new StringBuffer(); + Enumeration names = args.propertyNames(); + while (names.hasMoreElements()) { + String name = (String) names.nextElement(); + String value = args.getProperty(name); + buf.append(URLEncoder.encode(name)).append("=").append(URLEncoder.encode(value)); + if (names.hasMoreElements()) + buf.append("&"); + } + return buf.toString(); + } + + public static URLConnection sendPostData(Properties p, URL url) throws IOException { + TestUtil.logMsg("Openning url connection to: " + url.toString()); + URLConnection urlConn = url.openConnection(); + // Begin POST of properties to SERVLET + String argString = TestUtil.toEncodedString(p); + urlConn.setDoOutput(true); + urlConn.setDoInput(true); + urlConn.setUseCaches(false); + DataOutputStream out = new DataOutputStream(urlConn.getOutputStream()); + out.writeBytes(argString); + out.flush(); + out.close(); + // End POST + return urlConn; + } + + /** + * Parse a the table name from the ddl string such as: "create table foo" or "delete from foo" + * + * @param value buffer to parse + * @return The name of the table + */ + public static String getTableName(String value) { + String tableName = ""; + if (value != null) { + tableName = value.trim(); + int pos = tableName.lastIndexOf(" "); + tableName = tableName.substring(pos + 1); + } else { + TestUtil.logMsg("Error: Null value passed for table Name"); + } + return (tableName); + } // END -- getTableName + + public static String srcToDist(String src) { + return replaceLastSrc(src, "dist"); + } + + public static String replaceLastSrc(String src, String replacement) { + // find last index of /src/, remove "src", then replace it with replacement + StringBuffer sbToConvert = new StringBuffer(src); + int iStart = src.lastIndexOf("src"); + if (iStart != -1) { + if (harnessDebug) { + TestUtil.logHarnessDebug("Pre-converted src dir = " + sbToConvert); + } + sbToConvert.replace(iStart, iStart + 3, replacement); + + if (harnessDebug) { + TestUtil.logHarnessDebug("Converted " + replacement + " dir = " + sbToConvert); + } + } + return sbToConvert.toString(); + } + + public static String getDistString() { + // we may need to default to src until we are ready to convert for good + return "dist"; + } + + public static String getRelativePath(String oldVal) { + if (oldVal == null) { + return oldVal; + } + String result = oldVal; + oldVal = oldVal.replace('\\', '/'); + while (oldVal.endsWith("/")) { + oldVal = oldVal.substring(0, oldVal.length() - 1); + } + if (oldVal.endsWith("/src")) { + return result; + } + int pos = oldVal.indexOf("/src/"); + if (pos == -1) { + pos = oldVal.indexOf("/dist/"); + if (pos == -1) { + result = oldVal; + } else { + result = oldVal.substring(pos + 6); // len of '/dist/' + } + } else { + result = oldVal.substring(pos + 5); + } + return result; + } + + // Convert the given string of key-value-pair into a properties object + // + // for example : + // DatabaseName=derbyDB:user=cts1:password=cts1:serverName=localhost:portNumber=1527 + // + public static Properties strToProps(String strProps) { + + logTrace("Props String = " + strProps); + Properties props = new Properties(); + String strArray[] = strProps.split(":"); // Split the given string into + // array of key value pairs + + for (String keyValuePair : strArray) { + String strArray2[] = keyValuePair.split("="); // Take the key value pair + // and store it into + // properties + logTrace("Setting property " + strArray2[0] + " = " + strArray2[1]); + props.setProperty(strArray2[0], strArray2[1]); + } + + return props; + + } + + public static void printProperties(Properties props) { + Set propertyNames = props.stringPropertyNames(); + for (String key : propertyNames) { + logTrace(key + " = " + props.getProperty(key)); + } + } + +} + +// ======================= end of class TestUtil ====================== + +class Acceptor extends Thread { + ServerSocket serverSocket; + + private Socket outputSocket = null; + + public Acceptor(ServerSocket ss) { + serverSocket = ss; + this.start(); + } + + public void run() { + while (true) { + try { + outputSocket = serverSocket.accept(); + new SocketReader(outputSocket); + // System.out.println("new connection!!!!!"); + } catch (IOException ex) { + ex.printStackTrace(); + } + } + } +} + +class SocketReader extends Thread { + private Socket outputSocket = null; + + public SocketReader(Socket s) { + outputSocket = s; + this.start(); + } + + public void run() { + ObjectInputStream objIn; + TestReportInfo tri = null; + try { + objIn = new ObjectInputStream(outputSocket.getInputStream()); + // while((tri = (TestReportInfo)objIn.readObject()) != null) + while (true) { + tri = (TestReportInfo) objIn.readObject(); + if (tri.iDebugLevel == TestUtil.DEBUG_OUTPUT_LEVEL) { + // System.out.println("about to call logTrace"); + TestUtil.logTrace(tri.sOutput); + } else { + if (tri.iStream == TestUtil.ERROR_STREAM) { + if (tri.exception == null) + TestUtil.logErr(tri.sOutput); + else + TestUtil.logErr(tri.sOutput, tri.exception); + // System.out.println("about to call logErr"); + } else // assume outputstream + { + // System.out.println("about to call logMsg"); + TestUtil.logMsg(tri.sOutput); + } + } + } + } catch (EOFException e) { + // do nothing since the eof broke us out of the loop + } catch (ClassNotFoundException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + // cleanup socket no matter what happens + /* + * try { outputSocket.close(); outputSocket = null; } catch(IOException e) { + * + * } + */ + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java new file mode 100644 index 0000000000..9ac4fcc811 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/WebUtil.java @@ -0,0 +1,284 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.util; + +import java.io.*; +import java.net.*; +import java.util.*; + +/** + * Contains convenience methods for interacting with a web server. + * + * @author Mark Roth + */ +public class WebUtil { + + /** + * Reponse object containing information returned from the web server + */ + public static class Response { + /** Version (usually HTTP/1.0) */ + public String versionToken; + + /** Status (e.g. 401) */ + public String statusToken; + + /** Location (for redirections) */ + public String location; + + /** Actual page content */ + public String content = ""; + + /** Storage for cookies */ + public Hashtable cookies = new Hashtable(); + + /** Flag; true if authentication requested */ + public boolean authenticationRequested = false; + + /** + * Parses a header line for an old-style cookie (not Set-Cookie2), and stores the cookie in the cookies table. Only the + * key and value are stored. Expected syntax: "Set-Cookie: NAME=VALUE[;...]" The key is stored in upper-case. + * + * @param cookieLine The string with the cookie in it. + */ + public void parseCookie(String cookieLine) { + // Strip Set-Cookie: from line: + cookieLine = cookieLine.substring("Set-Cookie:".length()).trim(); + + // Strip any additional parameters from the end of the line. + int semicolon = cookieLine.indexOf(";"); + if (semicolon != -1) { + cookieLine = cookieLine.substring(0, semicolon).trim(); + } + + // Now we have "NAME=VALUE" + int equals = cookieLine.indexOf("="); + String name = cookieLine.substring(0, equals).toUpperCase(); + String value = cookieLine.substring(equals + 1); + cookies.put(name.trim(), value.trim()); + } + + /** + * Returns true if the status token for this response represents an error, or false if the status token indicates the + * page was retrieved okay. Note that a redirection is not an error. + */ + public boolean isError() { + // According to RFC2616, all status tokens staring with 4xx or 5xx + // are errors. + return statusToken.startsWith("4") || statusToken.startsWith("5"); + } + } + + /** + * Converts a standard URL to a request. For example, the string "http://goodtimes:8000/testing" would be converted to + * "/testing". + * + * @param urlString The URL to convert + * @return The resulting GET request + * @exception MalformedURLException Thrown if the urlString does not contain a valid URL. + */ + public static String getRequestFromURL(String urlString) throws MalformedURLException { + URL url = new URL(urlString); + return url.getFile(); + } + + /** + * Sends a request to the web server. A WebUtil.Response object is returned with the response information. + * + * @param method Can be either "GET" or "POST" + * @param addr Address of web server + * @param port Port of web server + * @param req The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) + * @param postData If this is a POST request, the data to be posted, encoded in a Properties class. null if no post data + * to be sent. + * @param cookieList A list of cookies to send when requesting the page. null if no cookie list is to be sent. + * @return WebUtil.Response object containing response information + * @exception IOException Thrown if request could not be made + */ + public static Response sendRequest(String method, InetAddress addr, int port, String req, Properties postData, Hashtable cookieList) + throws IOException { + return sendAuthenticatedRequest(method, addr, port, req, postData, cookieList, null, null); + } + + /** + * Sends an authenticated request to the web server. A WebUtil.Response object is returned with the response + * information. + * + * @param method Can be either "GET" or "POST" + * @param addr Address of web server + * @param port Port of web server + * @param req The file to request (e.g. /jsp_dep_secContextRoot/jspSec.jsp) + * @param postData If this is a POST request, the data to be posted, encoded in a Properties class. null if no post data + * to be sent. + * @param cookieList A list of cookies to send when requesting the page. null if no cookie list is to be sent. + * @param username The username for authentication, null if no authentication required. + * @param password The password for authentication, null if no authentication required. + * @return WebUtil.Response object containing response information + * @exception IOException Thrown if request could not be made + */ + public static Response sendAuthenticatedRequest(String method, InetAddress addr, int port, String req, Properties postData, + Hashtable cookieList, String username, String password) throws IOException { + String protocol = "HTTP/1.0"; + URL requestURL; + Socket socket = null; + PrintWriter out = null; + BufferedReader in = null; + String line = null; + Response response = new Response(); + String hostname = null; + + try { + hostname = addr.getHostName(); + requestURL = new URL("http", hostname, port, req); + req = method + " " + req + " " + protocol; + + socket = new Socket(addr, port); + + in = new BufferedReader(new InputStreamReader(socket.getInputStream())); + out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream())); + send(out, req); + + // send Host header + if (port == 80) { + send(out, "Host: " + hostname); + } else { + send(out, "Host: " + hostname + ':' + port); + } + + if (cookieList != null) { + // Send cookies: + Enumeration keys = cookieList.keys(); + + // Does at least one cookie exist? + if (keys.hasMoreElements()) { + String cookieString = "Cookie: "; + + // Add each cookie to the string + boolean first = true; + while (keys.hasMoreElements()) { + String key = (String) keys.nextElement(); + String value = (String) cookieList.get(key); + cookieString += (first ? "" : "; ") + key + "=" + value; // + "; + // $Path=/"; + first = false; + } + + // Write cookies: + send(out, cookieString); + } + } + + // Send authentication information if necessary: + if (username != null) { + String code = encodeBase64(username + ":" + password); + send(out, "Authorization: Basic " + code.trim()); + } + + // Send extra header information if we are posting. + if (postData != null) { + send(out, "Content-type: application/x-www-form-urlencoded"); + } + + // If this is a post request, send post data: + if ((postData != null) && method.toUpperCase().equals("POST")) { + String postString = TestUtil.toEncodedString(postData); + + // Skip a line: + send(out, "Content-length: " + postString.length()); + send(out, ""); + send(out, postString); + } else { + // Skip a line: + send(out, ""); + } + + out.flush(); + + // Read first line and check for HTTP version and OK. + line = in.readLine(); + if (line != null) { + TestUtil.logTrace("HEADER: " + line); + + StringTokenizer st = new StringTokenizer(line.trim()); + response.versionToken = st.nextToken(); + response.statusToken = st.nextToken(); + } + + // Read each line of the header until we hit a blank line + while ((line = in.readLine()) != null) { + TestUtil.logTrace("HEADER: " + line); + + // Blank line means we are done with the header: + if (line.trim().equals("")) + break; + + // Analyze special tags location and set cookie + if (line.toLowerCase().startsWith("location:")) { + // This is a redirect. Extract valuable infomration: + response.location = line.substring(10); + } else if (line.toLowerCase().startsWith("set-cookie:")) { + // This is a cookie. Add the cookie to the response + // object. + response.parseCookie(line); + } else if (line.toLowerCase().startsWith("www-authenticate:")) { + // Request to authenticate this page. + response.authenticationRequested = true; + } + } + + // The rest is content: + while ((line = in.readLine()) != null) { + response.content += line + "\n"; + } + + in.close(); + out.close(); + } catch (MalformedURLException e) { + throw new IOException("MalformedURLException: " + e.getMessage()); + } catch (UnknownHostException e) { + throw new IOException("UnknownHostException: " + e.getMessage()); + } catch (ConnectException e) { + throw new IOException("ConnectException: " + e.getMessage()); + } + + return response; + } + + /** + * Outputs a single line of text to the given output stream. Appends a \r\n automatically. By adding a + * System.out.println here, you can easily echo what is being sent to the web server. + */ + private static void send(PrintWriter out, String s) { + out.print(s + "\r\n"); + TestUtil.logTrace("REQUEST: " + s); + } + + /** + * Encodes the given string in base64 format (useful for BASIC authentication). Base64 encoding is defined by RFC2047. + * + * @param s The string to encode + * @return The encoded string + */ + public static String encodeBase64(String s) { + BASE64Encoder encoder = new BASE64Encoder(); + return encoder.encodeBuffer(s.getBytes()); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java new file mode 100644 index 0000000000..275a069426 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInfo.java @@ -0,0 +1,380 @@ +/* + * Copyright (c) 1999, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.util.StringTokenizer; +import java.util.jar.Attributes; +import java.util.jar.Attributes.Name; +import java.util.ResourceBundle; +import java.util.MissingResourceException; +import java.text.MessageFormat; +import java.lang.Character.*; + +/** + * This class holds all necessary information to install or upgrade a extension on the user's disk + * + * @author Jerome Dochez + */ +public class ExtensionInfo { + + /** + *

+ * public static values returned by the isCompatible method + *

+ */ + public static final int COMPATIBLE = 0; + + public static final int REQUIRE_SPECIFICATION_UPGRADE = 1; + + public static final int REQUIRE_IMPLEMENTATION_UPGRADE = 2; + + public static final int REQUIRE_VENDOR_SWITCH = 3; + + public static final int INCOMPATIBLE = 4; + + /** + *

+ * attributes fully describer an extension. The underlying described extension may be installed and requested. + *

+ */ + public String title; + + public String name; + + public String specVersion; + + public String specVendor; + + public String implementationVersion; + + public String vendor; + + public String vendorId; + + public String url; + + // For I18N support + private static final ResourceBundle rb = ResourceBundle.getBundle("sun.misc.resources.Messages"); + + /** + *

+ * Create a new uninitialized extension information object + *

+ */ + public ExtensionInfo() { + } + + /** + *

+ * Create and initialize an extension information object. The initialization uses the attributes passed as being the + * content of a manifest file to load the extension information from. Since manifest file may contain information on + * several extension they may depend on, the extension key parameter is prepanded to the attribute name to make the key + * used to retrieve the attribute from the manifest file + *

+ * + * @param extensionKey unique extension key in the manifest + * @param attr Attributes of a manifest file + */ + public ExtensionInfo(String extensionKey, Attributes attr) throws NullPointerException { + String s; + if (extensionKey != null) { + s = extensionKey + "-"; + } else { + s = ""; + } + + String attrKey = s + Name.EXTENSION_NAME.toString(); + name = attr.getValue(attrKey); + if (name != null) + name = name.trim(); + + attrKey = s + Name.SPECIFICATION_TITLE.toString(); + title = attr.getValue(attrKey); + if (title != null) + title = title.trim(); + + attrKey = s + Name.SPECIFICATION_VERSION.toString(); + specVersion = attr.getValue(attrKey); + if (specVersion != null) + specVersion = specVersion.trim(); + + attrKey = s + Name.SPECIFICATION_VENDOR.toString(); + specVendor = attr.getValue(attrKey); + if (specVendor != null) + specVendor = specVendor.trim(); + + attrKey = s + Name.IMPLEMENTATION_VERSION.toString(); + implementationVersion = attr.getValue(attrKey); + if (implementationVersion != null) + implementationVersion = implementationVersion.trim(); + + attrKey = s + Name.IMPLEMENTATION_VENDOR.toString(); + vendor = attr.getValue(attrKey); + if (vendor != null) + vendor = vendor.trim(); + + attrKey = s + Name.IMPLEMENTATION_VENDOR_ID.toString(); + vendorId = attr.getValue(attrKey); + if (vendorId != null) + vendorId = vendorId.trim(); + + attrKey = s + Name.IMPLEMENTATION_URL.toString(); + url = attr.getValue(attrKey); + if (url != null) + url = url.trim(); + } + + /** + *

+ * + * @return true if the extension described by this extension information is compatible with the extension described by + * the extension information passed as a parameter + *

+ * + * @param the requested extension information to compare to + */ + public int isCompatibleWith(ExtensionInfo ei) { + + if (name == null || ei.name == null) + return INCOMPATIBLE; + if (name.compareTo(ei.name) == 0) { + // is this true, if not spec version is specified, we consider + // the value as being "any". + if (specVersion == null || ei.specVersion == null) + return COMPATIBLE; + + int version = compareExtensionVersion(specVersion, ei.specVersion); + if (version < 0) { + // this extension specification is "older" + if (vendorId != null && ei.vendorId != null) { + if (vendorId.compareTo(ei.vendorId) != 0) { + return REQUIRE_VENDOR_SWITCH; + } + } + return REQUIRE_SPECIFICATION_UPGRADE; + } else { + // the extension spec is compatible, let's look at the + // implementation attributes + if (vendorId != null && ei.vendorId != null) { + // They care who provides the extension + if (vendorId.compareTo(ei.vendorId) != 0) { + // They want to use another vendor implementation + return REQUIRE_VENDOR_SWITCH; + } else { + // Vendor matches, let's see the implementation version + if (implementationVersion != null && ei.implementationVersion != null) { + // they care about the implementation version + version = compareExtensionVersion(implementationVersion, ei.implementationVersion); + if (version < 0) { + // This extension is an older implementation + return REQUIRE_IMPLEMENTATION_UPGRADE; + } + } + } + } + // All othe cases, we consider the extensions to be compatible + return COMPATIBLE; + } + } + return INCOMPATIBLE; + } + + /** + *

+ * helper method to print sensible information on the undelying described extension + *

+ */ + public String toString() { + return "Extension : title(" + title + "), name(" + name + "), spec vendor(" + specVendor + "), spec version(" + specVersion + + "), impl vendor(" + vendor + "), impl vendor id(" + vendorId + "), impl version(" + implementationVersion + "), impl url(" + + url + ")"; + } + + /* + *

helper method to compare two versions. version are in the x.y.z.t pattern.

+ * + * @param source version to compare to + * + * @param target version used to compare against + * + * @return < 0 if source < version > 0 if source > version = 0 if source = version + */ + private int compareExtensionVersion(String source, String target) throws NumberFormatException { + source = source.toLowerCase(); + target = target.toLowerCase(); + + return strictCompareExtensionVersion(source, target); + } + + /* + *

helper method to compare two versions. version are in the x.y.z.t pattern.

+ * + * @param source version to compare to + * + * @param target version used to compare against + * + * @return < 0 if source < version > 0 if source > version = 0 if source = version + */ + private int strictCompareExtensionVersion(String source, String target) throws NumberFormatException { + if (source.equals(target)) + return 0; + + StringTokenizer stk = new StringTokenizer(source, ".,"); + StringTokenizer ttk = new StringTokenizer(target, ".,"); + + // Compare number + int n = 0, m = 0, result = 0; + + // Convert token into meaning number for comparision + if (stk.hasMoreTokens()) + n = convertToken(stk.nextToken().toString()); + + // Convert token into meaning number for comparision + if (ttk.hasMoreTokens()) + m = convertToken(ttk.nextToken().toString()); + + if (n > m) + return 1; + else if (m > n) + return -1; + else { + // Look for index of "." in the string + int sIdx = source.indexOf("."); + int tIdx = target.indexOf("."); + + if (sIdx == -1) + sIdx = source.length() - 1; + + if (tIdx == -1) + tIdx = target.length() - 1; + + return strictCompareExtensionVersion(source.substring(sIdx + 1), target.substring(tIdx + 1)); + } + } + + private int convertToken(String token) { + if (token == null || token.equals("")) + return 0; + + int charValue = 0; + int charVersion = 0; + int patchVersion = 0; + int strLength = token.length(); + int endIndex = strLength; + char lastChar; + + Object[] args = { name }; + MessageFormat mf = new MessageFormat(rb.getString("optpkg.versionerror")); + String versionError = mf.format(args); + + // Look for "-" for pre-release + int prIndex = token.indexOf("-"); + + // Look for "_" for patch release + int patchIndex = token.indexOf("_"); + + if (prIndex == -1 && patchIndex == -1) { + // This is a FCS release + try { + return Integer.parseInt(token) * 100; + } catch (NumberFormatException e) { + System.out.println(versionError); + return 0; + } + } else if (patchIndex != -1) { + // This is a patch (update) release + int prversion; + try { + // Obtain the version + prversion = Integer.parseInt(token.substring(0, patchIndex)); + + // Check to see if the patch version is in the n.n.n_nnl format (special + // release) + lastChar = token.charAt(strLength - 1); + if (Character.isLetter(lastChar)) { + // letters a-z have values from 10-35 + charValue = Character.getNumericValue(lastChar); + endIndex = strLength - 1; + + // Obtain the patch version id + patchVersion = Integer.parseInt(token.substring(patchIndex + 1, endIndex)); + + if (charValue >= Character.getNumericValue('a') && charValue <= Character.getNumericValue('z')) { + // This is a special release + charVersion = (patchVersion * 100) + charValue; + } else { + // character is not a a-z letter, ignore + charVersion = 0; + System.out.println(versionError); + } + } else { + // This is a regular update release. Obtain the patch version id + patchVersion = Integer.parseInt(token.substring(patchIndex + 1, endIndex)); + } + } catch (NumberFormatException e) { + System.out.println(versionError); + return 0; + } + return prversion * 100 + (patchVersion + charVersion); + } else { + // This is a milestone release, either a early access, alpha, beta, or RC + + // Obtain the version + int mrversion; + try { + mrversion = Integer.parseInt(token.substring(0, prIndex)); + } catch (NumberFormatException e) { + System.out.println(versionError); + return 0; + } + + // Obtain the patch version string, including the milestone + version + String prString = token.substring(prIndex + 1); + + // Milestone version + String msVersion = ""; + int delta = 0; + + if (prString.indexOf("ea") != -1) { + msVersion = prString.substring(2); + delta = 50; + } else if (prString.indexOf("alpha") != -1) { + msVersion = prString.substring(5); + delta = 40; + } else if (prString.indexOf("beta") != -1) { + msVersion = prString.substring(4); + delta = 30; + } else if (prString.indexOf("rc") != -1) { + msVersion = prString.substring(2); + delta = 20; + } + + if (msVersion == null || msVersion.equals("")) { + // No version after the milestone, assume 0 + return mrversion * 100 - delta; + } else { + // Convert the milestone version + try { + return mrversion * 100 - delta + Integer.parseInt(msVersion); + } catch (NumberFormatException e) { + System.out.println(versionError); + return 0; + } + } + } + } +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java similarity index 85% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java index 8db9a0e9b9..221de53f2e 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationException.java @@ -25,10 +25,10 @@ public class ExtensionInstallationException extends Exception { - /* - *

Construct a new exception with an exception reason

- */ - public ExtensionInstallationException(String s) { - super(s); - } + /* + *

Construct a new exception with an exception reason

+ */ + public ExtensionInstallationException(String s) { + super(s); + } } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java similarity index 52% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java index 382cbc6f3f..e471e1a68e 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/ExtensionInstallationProvider.java @@ -17,30 +17,24 @@ package com.sun.ts.lib.util.sec.misc; /** - * This interface defines the contract a extension installation capable provided - * to the extension installation dependency mechanism to install new extensions - * on the user's disk + * This interface defines the contract a extension installation capable provided to the extension installation + * dependency mechanism to install new extensions on the user's disk * * @author Jerome Dochez */ public interface ExtensionInstallationProvider { - /* - *

Request the installation of an extension in the extension directory - *

- * - * @param requestExtInfo information on the extension that need to be - * installed - * - * @param installedExtInfo information on the current compatible installed - * extension. Can be null if no current installation has been found. - * - * @return true if the installation is successful, false if the installation - * could not be attempted. - * - * @exception ExtensionInstallationException if an installation was attempted - * but did not succeed. - */ - boolean installExtension(ExtensionInfo requestExtInfo, - ExtensionInfo installedExtInfo) throws ExtensionInstallationException; + /* + *

Request the installation of an extension in the extension directory

+ * + * @param requestExtInfo information on the extension that need to be installed + * + * @param installedExtInfo information on the current compatible installed extension. Can be null if no current + * installation has been found. + * + * @return true if the installation is successful, false if the installation could not be attempted. + * + * @exception ExtensionInstallationException if an installation was attempted but did not succeed. + */ + boolean installExtension(ExtensionInfo requestExtInfo, ExtensionInfo installedExtInfo) throws ExtensionInstallationException; } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java similarity index 50% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java index 4d7c744104..10f60ba2d9 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/FileURLMapper.java @@ -21,47 +21,45 @@ import com.sun.ts.lib.util.sec.net.www.ParseUtil; /** - * (Windows) Platform specific handling for file: URLs . In particular deals - * with network paths mapping them to UNCs. + * (Windows) Platform specific handling for file: URLs . In particular deals with network paths mapping them to UNCs. * * @author Michael McMahon */ public class FileURLMapper { - URL url; + URL url; - String file; + String file; - public FileURLMapper(URL url) { - this.url = url; - } + public FileURLMapper(URL url) { + this.url = url; + } - /** - * @returns the platform specific path corresponding to the URL, and in - * particular returns a UNC when the authority contains a hostname - */ + /** + * @returns the platform specific path corresponding to the URL, and in particular returns a UNC when the authority + * contains a hostname + */ - public String getPath() { - if (file != null) { - return file; - } - String host = url.getHost(); - if (host != null && !host.equals("") - && !"localhost".equalsIgnoreCase(host)) { - String rest = url.getFile(); - String s = host + ParseUtil.decode(url.getFile()); - file = "\\\\" + s.replace('/', '\\'); - return file; + public String getPath() { + if (file != null) { + return file; + } + String host = url.getHost(); + if (host != null && !host.equals("") && !"localhost".equalsIgnoreCase(host)) { + String rest = url.getFile(); + String s = host + ParseUtil.decode(url.getFile()); + file = "\\\\" + s.replace('/', '\\'); + return file; + } + String path = url.getFile().replace('/', '\\'); + file = ParseUtil.decode(path); + return file; } - String path = url.getFile().replace('/', '\\'); - file = ParseUtil.decode(path); - return file; - } - public boolean exists() { - String path = getPath(); - File f = new File(path); - return f.exists(); - } + public boolean exists() { + String path = getPath(); + File f = new File(path); + return f.exists(); + } } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java similarity index 69% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java index a14b2f16a6..bb3994982d 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/InvalidJarIndexException.java @@ -19,8 +19,7 @@ import java.lang.LinkageError; /** - * Thrown if the URLClassLoader finds the INDEX.LIST file of a jar file contains - * incorrect information. + * Thrown if the URLClassLoader finds the INDEX.LIST file of a jar file contains incorrect information. * * @author Zhenghua Li * @since 1.3 @@ -28,21 +27,19 @@ public class InvalidJarIndexException extends RuntimeException { - /** - * Constructs an InvalidJarIndexException with no detail message. - */ - public InvalidJarIndexException() { - super(); - } + /** + * Constructs an InvalidJarIndexException with no detail message. + */ + public InvalidJarIndexException() { + super(); + } - /** - * Constructs an InvalidJarIndexException with the specified - * detail message. - * - * @param s - * the detail message. - */ - public InvalidJarIndexException(String s) { - super(s); - } + /** + * Constructs an InvalidJarIndexException with the specified detail message. + * + * @param s the detail message. + */ + public InvalidJarIndexException(String s) { + super(s); + } } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java new file mode 100644 index 0000000000..34b1d4d542 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JarIndex.java @@ -0,0 +1,283 @@ +/* + * Copyright (c) 1999, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.io.*; +import java.util.*; +import java.util.jar.*; +import java.util.zip.*; + +/** + * This class is used to maintain mappings from packages, classes and resources to their enclosing JAR files. Mappings + * are kept at the package level except for class or resource files that are located at the root directory. + * URLClassLoader uses the mapping information to determine where to fetch an extension class or resource from. + * + * @author Zhenghua Li + * @since 1.3 + */ + +public class JarIndex { + + /** + * The hash map that maintains mappings from package/classe/resource to jar file list(s) + */ + private HashMap indexMap; + + /** + * The hash map that maintains mappings from jar file to package/class/resource lists + */ + private HashMap jarMap; + + /* + * An ordered list of jar file names. + */ + private String[] jarFiles; + + /** + * The index file name. + */ + public static final String INDEX_NAME = "META-INF/INDEX.LIST"; + + /** + * Constructs a new, empty jar index. + */ + public JarIndex() { + indexMap = new HashMap(); + jarMap = new HashMap(); + } + + /** + * Constructs a new index from the specified input stream. + * + * @param is the input stream containing the index data + */ + public JarIndex(InputStream is) throws IOException { + this(); + read(is); + } + + /** + * Constructs a new index for the specified list of jar files. + * + * @param files the list of jar files to construct the index from. + */ + public JarIndex(String[] files) throws IOException { + this(); + this.jarFiles = files; + parseJars(files); + } + + /** + * Returns the jar index, or null if none. + * + * @param jar the JAR file to get the index from. + * @exception IOException if an I/O error has occurred. + */ + public static JarIndex getJarIndex(JarFile jar, MetaIndex metaIndex) throws IOException { + JarIndex index = null; + /* + * If metaIndex is not null, check the meta index to see if META-INF/INDEX.LIST is contained in jar file or not. + */ + if (metaIndex != null && !metaIndex.mayContain(INDEX_NAME)) { + return null; + } + JarEntry e = jar.getJarEntry(INDEX_NAME); + // if found, then load the index + if (e != null) { + index = new JarIndex(jar.getInputStream(e)); + } + return index; + } + + /** + * Returns the jar files that are defined in this index. + */ + public String[] getJarFiles() { + return jarFiles; + } + + /* + * Add the key, value pair to the hashmap, the value will be put in a linked list which is created if necessary. + */ + private void addToList(String key, String value, HashMap t) { + LinkedList list = (LinkedList) t.get(key); + if (list == null) { + list = new LinkedList(); + list.add(value); + t.put(key, list); + } else if (!list.contains(value)) { + list.add(value); + } + } + + /** + * Returns the list of jar files that are mapped to the file. + * + * @param fileName the key of the mapping + */ + public LinkedList get(String fileName) { + LinkedList jarFiles = null; + if ((jarFiles = (LinkedList) indexMap.get(fileName)) == null) { + /* try the package name again */ + int pos; + if ((pos = fileName.lastIndexOf("/")) != -1) { + jarFiles = (LinkedList) indexMap.get(fileName.substring(0, pos)); + } + } + return jarFiles; + } + + /** + * Add the mapping from the specified file to the specified jar file. If there were no mapping for the package of the + * specified file before, a new linked list will be created, the jar file is added to the list and a new mapping from + * the package to the jar file list is added to the hashmap. Otherwise, the jar file will be added to the end of the + * existing list. + * + * @param fileName the file name + * @param jarName the jar file that the file is mapped to + * + */ + public void add(String fileName, String jarName) { + String packageName; + int pos; + if ((pos = fileName.lastIndexOf("/")) != -1) { + packageName = fileName.substring(0, pos); + } else { + packageName = fileName; + } + + // add the mapping to indexMap + addToList(packageName, jarName, indexMap); + + // add the mapping to jarMap + addToList(jarName, packageName, jarMap); + } + + /** + * Go through all the jar files and construct the index table. + */ + private void parseJars(String[] files) throws IOException { + if (files == null) { + return; + } + + String currentJar = null; + + for (int i = 0; i < files.length; i++) { + currentJar = files[i]; + ZipFile zrf = new ZipFile(currentJar.replace('/', File.separatorChar)); + + Enumeration entries = zrf.entries(); + while (entries.hasMoreElements()) { + String fileName = ((ZipEntry) (entries.nextElement())).getName(); + // Index the META-INF directory, but not the index or manifest. + if (!fileName.startsWith("META-INF/") + || !(fileName.equals("META-INF/") || fileName.equals(INDEX_NAME) || fileName.equals(JarFile.MANIFEST_NAME))) { + add(fileName, currentJar); + } + } + zrf.close(); + } + } + + /** + * Writes the index to the specified OutputStream + * + * @param out the output stream + * @exception IOException if an I/O error has occurred + */ + public void write(OutputStream out) throws IOException { + BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(out, "UTF8")); + bw.write("JarIndex-Version: 1.0\n\n"); + + if (jarFiles != null) { + for (int i = 0; i < jarFiles.length; i++) { + /* print out the jar file name */ + String jar = jarFiles[i]; + bw.write(jar + "\n"); + LinkedList jarlist = (LinkedList) jarMap.get(jar); + if (jarlist != null) { + Iterator listitr = jarlist.iterator(); + while (listitr.hasNext()) { + bw.write((String) (listitr.next()) + "\n"); + } + } + bw.write("\n"); + } + bw.flush(); + } + } + + /** + * Reads the index from the specified InputStream. + * + * @param is the input stream + * @exception IOException if an I/O error has occurred + */ + public void read(InputStream is) throws IOException { + BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF8")); + String line = null; + String currentJar = null; + + /* an ordered list of jar file names */ + Vector jars = new Vector(); + + /* read until we see a .jar line */ + while ((line = br.readLine()) != null && !line.endsWith(".jar")) + ; + + for (; line != null; line = br.readLine()) { + if (line.length() == 0) + continue; + + if (line.endsWith(".jar")) { + currentJar = line; + jars.add(currentJar); + } else { + String name = line; + addToList(name, currentJar, indexMap); + addToList(currentJar, name, jarMap); + } + } + + jarFiles = (String[]) jars.toArray(new String[jars.size()]); + } + + /** + * Merges the current index into another index, taking into account the relative path of the current index. + * + * @param toIndex The destination index which the current index will merge into. + * @param path The relative path of the this index to the destination index. + * + */ + public void merge(JarIndex toIndex, String path) { + Iterator itr = indexMap.entrySet().iterator(); + while (itr.hasNext()) { + Map.Entry e = (Map.Entry) itr.next(); + String packageName = (String) e.getKey(); + LinkedList from_list = (LinkedList) e.getValue(); + Iterator listItr = from_list.iterator(); + while (listItr.hasNext()) { + String jarName = (String) listItr.next(); + if (path != null) { + jarName = path.concat(jarName); + } + toIndex.add(packageName, jarName); + } + } + } +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java similarity index 89% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java index 1f75cab8f3..d8163223ad 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOAccess.java @@ -20,9 +20,9 @@ import java.nio.charset.Charset; public interface JavaIOAccess { - public Console console(); + public Console console(); - public Runnable consoleRestoreHook(); + public Runnable consoleRestoreHook(); - public Charset charset(); + public Charset charset(); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java similarity index 97% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java index b8508fe829..0eae571b89 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIODeleteOnExitAccess.java @@ -17,5 +17,5 @@ package com.sun.ts.lib.util.sec.misc; public interface JavaIODeleteOnExitAccess extends Runnable { - public void run(); + public void run(); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java similarity index 90% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java index fcb7ba1364..959966a82b 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaIOFileDescriptorAccess.java @@ -23,7 +23,7 @@ */ public interface JavaIOFileDescriptorAccess { - public void set(FileDescriptor obj, int fd); + public void set(FileDescriptor obj, int fd); - public int get(FileDescriptor fd); + public int get(FileDescriptor fd); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java similarity index 53% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java index b5493894ec..add84bd274 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaLangAccess.java @@ -21,28 +21,25 @@ import com.sun.ts.lib.util.sec.nio.ch.Interruptible; public interface JavaLangAccess { - /** Return the constant pool for a class. */ - ConstantPool getConstantPool(Class klass); + /** Return the constant pool for a class. */ + ConstantPool getConstantPool(Class klass); - /** - * Set the AnnotationType instance corresponding to this class. (This method - * only applies to annotation types.) - */ - void setAnnotationType(Class klass, AnnotationType annotationType); + /** + * Set the AnnotationType instance corresponding to this class. (This method only applies to annotation types.) + */ + void setAnnotationType(Class klass, AnnotationType annotationType); - /** - * Get the AnnotationType instance corresponding to this class. (This method - * only applies to annotation types.) - */ - AnnotationType getAnnotationType(Class klass); + /** + * Get the AnnotationType instance corresponding to this class. (This method only applies to annotation types.) + */ + AnnotationType getAnnotationType(Class klass); - /** - * Returns the elements of an enum class or null if the Class object does not - * represent an enum type; the result is uncloned, cached, and shared by all - * callers. - */ - > E[] getEnumConstantsShared(Class klass); + /** + * Returns the elements of an enum class or null if the Class object does not represent an enum type; the result is + * uncloned, cached, and shared by all callers. + */ + > E[] getEnumConstantsShared(Class klass); - /** Set thread's blocker field. */ - void blockedOn(Thread t, Interruptible b); + /** Set thread's blocker field. */ + void blockedOn(Thread t, Interruptible b); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java similarity index 86% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java index fffb3c7f80..b40a95dad0 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaNetAccess.java @@ -19,8 +19,8 @@ import java.net.URLClassLoader; public interface JavaNetAccess { - /** - * return the URLClassPath belonging to the given loader - */ - URLClassPath getURLClassPath(URLClassLoader u); + /** + * return the URLClassPath belonging to the given loader + */ + URLClassPath getURLClassPath(URLClassLoader u); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java similarity index 79% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java index 98c6b0ad91..7340be44f5 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityAccess.java @@ -21,10 +21,8 @@ public interface JavaSecurityAccess { - T doIntersectionPrivilege(PrivilegedAction action, - AccessControlContext stack, AccessControlContext context); + T doIntersectionPrivilege(PrivilegedAction action, AccessControlContext stack, AccessControlContext context); - T doIntersectionPrivilege(PrivilegedAction action, - AccessControlContext context); + T doIntersectionPrivilege(PrivilegedAction action, AccessControlContext context); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java similarity index 76% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java index 259272e28a..9a61ff2257 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaSecurityProtectionDomainAccess.java @@ -20,14 +20,14 @@ import java.security.ProtectionDomain; public interface JavaSecurityProtectionDomainAccess { - interface ProtectionDomainCache { - void put(ProtectionDomain pd, PermissionCollection pc); + interface ProtectionDomainCache { + void put(ProtectionDomain pd, PermissionCollection pc); - PermissionCollection get(ProtectionDomain pd); - } + PermissionCollection get(ProtectionDomain pd); + } - /** - * Returns the ProtectionDomainCache. - */ - ProtectionDomainCache getProtectionDomainCache(); + /** + * Returns the ProtectionDomainCache. + */ + ProtectionDomainCache getProtectionDomainCache(); } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java similarity index 91% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java index 60b4db312b..6bec030472 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/JavaUtilJarAccess.java @@ -20,5 +20,5 @@ import java.util.jar.JarFile; public interface JavaUtilJarAccess { - public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException; + public boolean jarFileHasClassPathAttribute(JarFile jar) throws IOException; } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java new file mode 100644 index 0000000000..1df5364161 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/MetaIndex.java @@ -0,0 +1,261 @@ +/* + * Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.io.BufferedReader; +import java.io.FileReader; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/* + * MetaIndex is intended to decrease startup time (in particular cold + * start, when files are not yet in the disk cache) by providing a + * quick reject mechanism for probes into jar files. The on-disk + * representation of the meta-index is a flat text file with per-jar + * entries indicating (generally speaking) prefixes of package names + * contained in the jar. As an example, here is an edited excerpt of + * the meta-index generated for jre/lib in the current build: + * +
+% VERSION 1
+# charsets.jar
+sun/
+# jce.jar
+javax/
+! jsse.jar
+sun/
+com/sun/net/
+javax/
+com/sun/security/
+@ resources.jar
+com/sun/xml/
+com/sun/rowset/
+com/sun/org/
+sun/
+com/sun/imageio/
+javax/
+com/sun/java/swing/
+META-INF/services/
+com/sun/java/util/jar/pack/
+com/sun/corba/
+com/sun/jndi/
+! rt.jar
+org/w3c/
+com/sun/imageio/
+javax/
+sunw/util/
+java/
+sun/
+...
+
+ *

A few notes about the design of the meta-index: + * + *

    + * + *
  • It contains entries for multiple jar files. This is + * intentional, to reduce the number of disk accesses that need to be + * performed during startup. + * + *
  • It is only intended to act as a fast reject mechanism to + * prevent application and other classes from forcing all jar files on + * the boot and extension class paths to be opened. It is not intended + * as a precise index of the contents of the jar. + * + *
  • It should be as small as possible to reduce the amount of time + * required to parse it during startup. For example, adding on the + * secondary package element to java/ and javax/ packages + * ("javax/swing/", for example) causes the meta-index to grow + * significantly. This is why substrings of the packages have been + * chosen as the principal contents. + * + *
  • It is versioned, and optional, to prevent strong dependencies + * between the JVM and JDK. It is also potentially applicable to more + * than just the boot and extension class paths. + * + *
  • Precisely speaking, it plays different role in JVM and J2SE + * side. On the JVM side, meta-index file is used to speed up locating the + * class files only while on the J2SE side, meta-index file is used to speed + * up the resources file & class file. + * To help the JVM and J2SE code to better utilize the information in meta-index + * file, we mark the jar file differently. Here is the current rule we use. + * For jar file containing only class file, we put '!' before the jar file name; + * for jar file containing only resources file, we put '@' before the jar file name; + * for jar file containing both resources and class file, we put '#' before the + * jar name. + * Notice the fact that every jar file contains at least the manifest file, so when + * we say "jar file containing only class file", we don't include that file. + * + *
+ * + *

To avoid changing the behavior of the current application + * loader and other loaders, the current MetaIndex implementation in + * the JDK requires that the directory containing the meta-index be + * registered with the MetaIndex class before construction of the + * associated URLClassPath. This prevents the need for automatic + * searching for the meta-index in the URLClassPath code and potential + * changes in behavior for non-core ClassLoaders. + * + * This class depends on make/tools/MetaIndex/BuildMetaIndex.java and + * is used principally by sun.misc.URLClassPath. + */ + +public class MetaIndex { + // Maps jar file names in registered directories to meta-indices + private static volatile Map jarMap; + + // List of contents of this meta-index + private String[] contents; + + // Indicate whether the coresponding jar file is a pure class jar file or not + private boolean isClassOnlyJar; + + // ---------------------------------------------------------------------- + // Registration of directories (which can cause parsing of the + // meta-index file if it is present), and fetching of parsed + // meta-indices + // jarMap is not strictly thread-safe when the meta index mechanism + // is extended for user-provided jar files in future. + + public static MetaIndex forJar(File jar) { + return getJarMap().get(jar); + } + + // 'synchronized' is added to protect the jarMap from being modified + // by multiple threads. + public static synchronized void registerDirectory(File dir) { + // Note that this does not currently check to see whether the + // directory has previously been registered, since the meta-index + // in a particular directory creates multiple entries in the + // jarMap. If this mechanism is extended beyond the boot and + // extension class paths (for example, automatically searching for + // meta-index files in directories containing jars which have been + // explicitly opened) then this code should be generalized. + // + // This method must be called from a privileged context. + File indexFile = new File(dir, "meta-index"); + if (indexFile.exists()) { + try { + BufferedReader reader = new BufferedReader(new FileReader(indexFile)); + String line = null; + String curJarName = null; + boolean isCurJarContainClassOnly = false; + List contents = new ArrayList(); + Map map = getJarMap(); + + /* Convert dir into canonical form. */ + dir = dir.getCanonicalFile(); + /* + * Note: The first line should contain the version of the meta-index file. We have to match the right version before + * trying to parse this file. + */ + line = reader.readLine(); + if (line == null || !line.equals("% VERSION 2")) { + reader.close(); + return; + } + while ((line = reader.readLine()) != null) { + switch (line.charAt(0)) { + case '!': + case '#': + case '@': { + // Store away current contents, if any + if ((curJarName != null) && (contents.size() > 0)) { + map.put(new File(dir, curJarName), new MetaIndex(contents, isCurJarContainClassOnly)); + + contents.clear(); + } + // Fetch new current jar file name + curJarName = line.substring(2); + if (line.charAt(0) == '!') { + isCurJarContainClassOnly = true; + } else if (isCurJarContainClassOnly) { + isCurJarContainClassOnly = false; + } + + break; + } + case '%': + break; + default: { + contents.add(line); + } + } + } + // Store away current contents, if any + if ((curJarName != null) && (contents.size() > 0)) { + map.put(new File(dir, curJarName), new MetaIndex(contents, isCurJarContainClassOnly)); + } + + reader.close(); + + } catch (IOException e) { + // Silently fail for now (similar behavior to elsewhere in + // extension and core loaders) + } + } + } + + // ---------------------------------------------------------------------- + // Public APIs + // + + public boolean mayContain(String entry) { + // Ask non-class file from class only jar returns false + // This check is important to avoid some class only jar + // files such as rt.jar are opened for resource request. + if (isClassOnlyJar && !entry.endsWith(".class")) { + return false; + } + + String[] conts = contents; + for (int i = 0; i < conts.length; i++) { + if (entry.startsWith(conts[i])) { + return true; + } + } + return false; + } + + // ---------------------------------------------------------------------- + // Implementation only below this point + // @IllegalArgumentException if entries is null. + private MetaIndex(List entries, boolean isClassOnlyJar) throws IllegalArgumentException { + if (entries == null) { + throw new IllegalArgumentException(); + } + + contents = entries.toArray(new String[0]); + this.isClassOnlyJar = isClassOnlyJar; + } + + private static Map getJarMap() { + if (jarMap == null) { + synchronized (MetaIndex.class) { + if (jarMap == null) { + jarMap = new HashMap(); + } + } + } + assert jarMap != null; + return jarMap; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java new file mode 100644 index 0000000000..52d2247987 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Resource.java @@ -0,0 +1,179 @@ +/* + * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.io.EOFException; +import java.net.URL; +import java.io.IOException; +import java.io.InterruptedIOException; +import java.io.InputStream; +import java.security.CodeSigner; +import java.util.jar.Manifest; +import java.nio.ByteBuffer; +import java.util.Arrays; +import com.sun.ts.lib.util.sec.nio.ByteBuffered; + +/** + * This class is used to represent a Resource that has been loaded from the class path. + * + * @author David Connelly + * @since 1.2 + */ +public abstract class Resource { + /** + * Returns the name of the Resource. + */ + public abstract String getName(); + + /** + * Returns the URL of the Resource. + */ + public abstract URL getURL(); + + /** + * Returns the CodeSource URL for the Resource. + */ + public abstract URL getCodeSourceURL(); + + /** + * Returns an InputStream for reading the Resource data. + */ + public abstract InputStream getInputStream() throws IOException; + + /** + * Returns the length of the Resource data, or -1 if unknown. + */ + public abstract int getContentLength() throws IOException; + + private InputStream cis; + + /* Cache result in case getBytes is called after getByteBuffer. */ + private synchronized InputStream cachedInputStream() throws IOException { + if (cis == null) { + cis = getInputStream(); + } + return cis; + } + + /** + * Returns the Resource data as an array of bytes. + */ + public byte[] getBytes() throws IOException { + byte[] b; + // Get stream before content length so that a FileNotFoundException + // can propagate upwards without being caught too early + InputStream in = cachedInputStream(); + + // This code has been uglified to protect against interrupts. + // Even if a thread has been interrupted when loading resources, + // the IO should not abort, so must carefully retry, failing only + // if the retry leads to some other IO exception. + + boolean isInterrupted = Thread.interrupted(); + int len; + for (;;) { + try { + len = getContentLength(); + break; + } catch (InterruptedIOException iioe) { + Thread.interrupted(); + isInterrupted = true; + } + } + + try { + b = new byte[0]; + if (len == -1) + len = Integer.MAX_VALUE; + int pos = 0; + while (pos < len) { + int bytesToRead; + if (pos >= b.length) { // Only expand when there's no room + bytesToRead = Math.min(len - pos, b.length + 1024); + if (b.length < pos + bytesToRead) { + b = Arrays.copyOf(b, pos + bytesToRead); + } + } else { + bytesToRead = b.length - pos; + } + int cc = 0; + try { + cc = in.read(b, pos, bytesToRead); + } catch (InterruptedIOException iioe) { + Thread.interrupted(); + isInterrupted = true; + } + if (cc < 0) { + if (len != Integer.MAX_VALUE) { + throw new EOFException("Detect premature EOF"); + } else { + if (b.length != pos) { + b = Arrays.copyOf(b, pos); + } + break; + } + } + pos += cc; + } + } finally { + try { + in.close(); + } catch (InterruptedIOException iioe) { + isInterrupted = true; + } catch (IOException ignore) { + } + + if (isInterrupted) { + Thread.currentThread().interrupt(); + } + } + return b; + } + + /** + * Returns the Resource data as a ByteBuffer, but only if the input stream was implemented on top of a ByteBuffer. + * Return null otherwise. + */ + public ByteBuffer getByteBuffer() throws IOException { + InputStream in = cachedInputStream(); + if (in instanceof ByteBuffered) { + return ((ByteBuffered) in).getByteBuffer(); + } + return null; + } + + /** + * Returns the Manifest for the Resource, or null if none. + */ + public Manifest getManifest() throws IOException { + return null; + } + + /** + * Returns theCertificates for the Resource, or null if none. + */ + public java.security.cert.Certificate[] getCertificates() { + return null; + } + + /** + * Returns the code signers for the Resource, or null if none. + */ + public CodeSigner[] getCodeSigners() { + return null; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java new file mode 100644 index 0000000000..c360f8f4ec --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/SharedSecrets.java @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2002, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.util.jar.JarFile; +import java.io.Console; +import java.io.File; +import java.io.FileDescriptor; +import java.security.ProtectionDomain; + +import java.security.AccessController; + +/** + * A repository of "shared secrets", which are a mechanism for calling implementation-private methods in another package + * without using reflection. A package-private class implements a public interface and provides the ability to call + * package-private methods within that package; the object implementing that interface is provided through a third + * package to which access is restricted. This framework avoids the primary disadvantage of using reflection for this + * purpose, namely the loss of compile-time checking. + */ + +public class SharedSecrets { + private static final Unsafe unsafe = Unsafe.getUnsafe(); + + private static JavaUtilJarAccess javaUtilJarAccess; + + private static JavaLangAccess javaLangAccess; + + private static JavaIOAccess javaIOAccess; + + private static JavaIODeleteOnExitAccess javaIODeleteOnExitAccess; + + private static JavaNetAccess javaNetAccess; + + private static JavaIOFileDescriptorAccess javaIOFileDescriptorAccess; + + private static JavaSecurityProtectionDomainAccess javaSecurityProtectionDomainAccess; + + private static JavaSecurityAccess javaSecurityAccess; + + public static JavaUtilJarAccess javaUtilJarAccess() { + if (javaUtilJarAccess == null) { + // Ensure JarFile is initialized; we know that that class + // provides the shared secret + unsafe.ensureClassInitialized(JarFile.class); + } + return javaUtilJarAccess; + } + + public static void setJavaUtilJarAccess(JavaUtilJarAccess access) { + javaUtilJarAccess = access; + } + + public static void setJavaLangAccess(JavaLangAccess jla) { + javaLangAccess = jla; + } + + public static JavaLangAccess getJavaLangAccess() { + return javaLangAccess; + } + + public static void setJavaNetAccess(JavaNetAccess jna) { + javaNetAccess = jna; + } + + public static JavaNetAccess getJavaNetAccess() { + return javaNetAccess; + } + + public static void setJavaIOAccess(JavaIOAccess jia) { + javaIOAccess = jia; + } + + public static JavaIOAccess getJavaIOAccess() { + if (javaIOAccess == null) { + unsafe.ensureClassInitialized(Console.class); + } + return javaIOAccess; + } + + public static void setJavaIODeleteOnExitAccess(JavaIODeleteOnExitAccess jida) { + javaIODeleteOnExitAccess = jida; + } + + public static JavaIODeleteOnExitAccess getJavaIODeleteOnExitAccess() { + if (javaIODeleteOnExitAccess == null) { + unsafe.ensureClassInitialized(File.class); + } + return javaIODeleteOnExitAccess; + } + + public static void setJavaIOFileDescriptorAccess(JavaIOFileDescriptorAccess jiofda) { + javaIOFileDescriptorAccess = jiofda; + } + + public static JavaIOFileDescriptorAccess getJavaIOFileDescriptorAccess() { + if (javaIOFileDescriptorAccess == null) + unsafe.ensureClassInitialized(FileDescriptor.class); + + return javaIOFileDescriptorAccess; + } + + public static void setJavaSecurityProtectionDomainAccess(JavaSecurityProtectionDomainAccess jspda) { + javaSecurityProtectionDomainAccess = jspda; + } + + public static JavaSecurityProtectionDomainAccess getJavaSecurityProtectionDomainAccess() { + if (javaSecurityProtectionDomainAccess == null) + unsafe.ensureClassInitialized(ProtectionDomain.class); + + return javaSecurityProtectionDomainAccess; + } + + public static void setJavaSecurityAccess(JavaSecurityAccess jsa) { + javaSecurityAccess = jsa; + } + + public static JavaSecurityAccess getJavaSecurityAccess() { + if (javaSecurityAccess == null) { + unsafe.ensureClassInitialized(AccessController.class); + } + return javaSecurityAccess; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java new file mode 100644 index 0000000000..7ae348170e --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/URLClassPath.java @@ -0,0 +1,963 @@ +/* + * Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.util.Enumeration; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.Hashtable; +import java.util.NoSuchElementException; +import java.util.Stack; +import java.util.Set; +import java.util.HashSet; +import java.util.StringTokenizer; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.jar.JarFile; +import com.sun.ts.lib.util.sec.misc.JarIndex; +import com.sun.ts.lib.util.sec.misc.InvalidJarIndexException; +import com.sun.ts.lib.util.sec.net.www.ParseUtil; +import java.util.zip.ZipEntry; +import java.util.jar.JarEntry; +import java.util.jar.Manifest; +import java.util.jar.Attributes; +import java.util.jar.Attributes.Name; +import java.net.JarURLConnection; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.net.HttpURLConnection; +import java.net.URLStreamHandler; +import java.net.URLStreamHandlerFactory; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.security.AccessController; +import java.security.AccessControlException; +import java.security.CodeSigner; +import java.security.Permission; +import java.security.PrivilegedAction; +import java.security.PrivilegedExceptionAction; +import java.security.cert.Certificate; +import com.sun.ts.lib.util.sec.misc.FileURLMapper; + +/** + * This class is used to maintain a search path of URLs for loading classes and resources from both JAR files and + * directories. + * + * @author David Connelly + */ +public class URLClassPath { + final static String USER_AGENT_JAVA_VERSION = "UA-Java-Version"; + + final static String JAVA_VERSION; + + private static final boolean DEBUG; + + static { + JAVA_VERSION = java.security.AccessController + .doPrivileged(new com.sun.ts.lib.util.sec.security.action.GetPropertyAction("java.version")); + DEBUG = (java.security.AccessController + .doPrivileged(new com.sun.ts.lib.util.sec.security.action.GetPropertyAction("sun.misc.URLClassPath.debug")) != null); + } + + /* The original search path of URLs. */ + private ArrayList path = new ArrayList(); + + /* The stack of unopened URLs */ + Stack urls = new Stack(); + + /* The resulting search path of Loaders */ + ArrayList loaders = new ArrayList(); + + /* Map of each URL opened to its corresponding Loader */ + HashMap lmap = new HashMap(); + + /* The jar protocol handler to use when creating new URLs */ + private URLStreamHandler jarHandler; + + /** + * Creates a new URLClassPath for the given URLs. The URLs will be searched in the order specified for classes and + * resources. A URL ending with a '/' is assumed to refer to a directory. Otherwise, the URL is assumed to refer to a + * JAR file. + * + * @param urls the directory and JAR file URLs to search for classes and resources + * @param factory the URLStreamHandlerFactory to use when creating new URLs + */ + public URLClassPath(URL[] urls, URLStreamHandlerFactory factory) { + for (int i = 0; i < urls.length; i++) { + path.add(urls[i]); + } + push(urls); + if (factory != null) { + jarHandler = factory.createURLStreamHandler("jar"); + } + } + + public URLClassPath(URL[] urls) { + this(urls, null); + } + + /** + * Appends the specified URL to the search path of directory and JAR file URLs from which to load classes and resources. + */ + public void addURL(URL url) { + synchronized (urls) { + if (path.contains(url)) + return; + + urls.add(0, url); + path.add(url); + } + } + + /** + * Returns the original search path of URLs. + */ + public URL[] getURLs() { + synchronized (urls) { + return (URL[]) path.toArray(new URL[path.size()]); + } + } + + /** + * Finds the resource with the specified name on the URL search path or null if not found or security check fails. + * + * @param name the name of the resource + * @param check whether to perform a security check + * @return a URL for the resource, or null if the resource could not be found. + */ + public URL findResource(String name, boolean check) { + Loader loader; + for (int i = 0; (loader = getLoader(i)) != null; i++) { + URL url = loader.findResource(name, check); + if (url != null) { + return url; + } + } + return null; + } + + /** + * Finds the first Resource on the URL search path which has the specified name. Returns null if no Resource could be + * found. + * + * @param name the name of the Resource + * @param check whether to perform a security check + * @return the Resource, or null if not found + */ + public Resource getResource(String name, boolean check) { + if (DEBUG) { + System.err.println("URLClassPath.getResource(\"" + name + "\")"); + } + + Loader loader; + for (int i = 0; (loader = getLoader(i)) != null; i++) { + Resource res = loader.getResource(name, check); + if (res != null) { + return res; + } + } + return null; + } + + /** + * Finds all resources on the URL search path with the given name. Returns an enumeration of the URL objects. + * + * @param name the resource name + * @return an Enumeration of all the urls having the specified name + */ + public Enumeration findResources(final String name, final boolean check) { + return new Enumeration() { + private int index = 0; + + private URL url = null; + + private boolean next() { + if (url != null) { + return true; + } else { + Loader loader; + while ((loader = getLoader(index++)) != null) { + url = loader.findResource(name, check); + if (url != null) { + return true; + } + } + return false; + } + } + + public boolean hasMoreElements() { + return next(); + } + + public Object nextElement() { + if (!next()) { + throw new NoSuchElementException(); + } + URL u = url; + url = null; + return u; + } + }; + } + + public Resource getResource(String name) { + return getResource(name, true); + } + + /** + * Finds all resources on the URL search path with the given name. Returns an enumeration of the Resource objects. + * + * @param name the resource name + * @return an Enumeration of all the resources having the specified name + */ + public Enumeration getResources(final String name, final boolean check) { + return new Enumeration() { + private int index = 0; + + private Resource res = null; + + private boolean next() { + if (res != null) { + return true; + } else { + Loader loader; + while ((loader = getLoader(index++)) != null) { + res = loader.getResource(name, check); + if (res != null) { + return true; + } + } + return false; + } + } + + public boolean hasMoreElements() { + return next(); + } + + public Object nextElement() { + if (!next()) { + throw new NoSuchElementException(); + } + Resource r = res; + res = null; + return r; + } + }; + } + + public Enumeration getResources(final String name) { + return getResources(name, true); + } + + /* + * Returns the Loader at the specified position in the URL search path. The URLs are opened and expanded as needed. + * Returns null if the specified index is out of range. + */ + private synchronized Loader getLoader(int index) { + // Expand URL search path until the request can be satisfied + // or the URL stack is empty. + while (loaders.size() < index + 1) { + // Pop the next URL from the URL stack + URL url; + synchronized (urls) { + if (urls.empty()) { + return null; + } else { + url = (URL) urls.pop(); + } + } + // Skip this URL if it already has a Loader. (Loader + // may be null in the case where URL has not been opened + // but is referenced by a JAR index.) + if (lmap.containsKey(url)) { + continue; + } + // Otherwise, create a new Loader for the URL. + Loader loader; + try { + loader = getLoader(url); + // If the loader defines a local class path then add the + // URLs to the list of URLs to be opened. + URL[] urls = loader.getClassPath(); + if (urls != null) { + push(urls); + } + } catch (IOException e) { + // Silently ignore for now... + continue; + } + // Finally, add the Loader to the search path. + loaders.add(loader); + lmap.put(url, loader); + } + return (Loader) loaders.get(index); + } + + /* + * Returns the Loader for the specified base URL. + */ + private Loader getLoader(final URL url) throws IOException { + try { + return (Loader) java.security.AccessController.doPrivileged(new java.security.PrivilegedExceptionAction() { + public Object run() throws IOException { + String file = url.getFile(); + if (file != null && file.endsWith("/")) { + if ("file".equals(url.getProtocol())) { + return new FileLoader(url); + } else { + return new Loader(url); + } + } else { + return new JarLoader(url, jarHandler, lmap); + } + } + }); + } catch (java.security.PrivilegedActionException pae) { + throw (IOException) pae.getException(); + } + } + + /* + * Pushes the specified URLs onto the list of unopened URLs. + */ + private void push(URL[] us) { + synchronized (urls) { + for (int i = us.length - 1; i >= 0; --i) { + urls.push(us[i]); + } + } + } + + /** + * Convert class path specification into an array of file URLs. + * + * The path of the file is encoded before conversion into URL form so that reserved characters can safely appear in the + * path. + */ + public static URL[] pathToURLs(String path) { + StringTokenizer st = new StringTokenizer(path, File.pathSeparator); + URL[] urls = new URL[st.countTokens()]; + int count = 0; + while (st.hasMoreTokens()) { + File f = new File(st.nextToken()); + try { + f = new File(f.getCanonicalPath()); + } catch (IOException x) { + // use the non-canonicalized filename + } + try { + urls[count++] = ParseUtil.fileToEncodedURL(f); + } catch (IOException x) { + } + } + + if (urls.length != count) { + URL[] tmp = new URL[count]; + System.arraycopy(urls, 0, tmp, 0, count); + urls = tmp; + } + return urls; + } + + /* + * Check whether the resource URL should be returned. Return null on security check failure. Called by + * java.net.URLClassLoader. + */ + public URL checkURL(URL url) { + + return url; + } + + /** + * Inner class used to represent a loader of resources and classes from a base URL. + */ + private static class Loader { + private final URL base; + + /* + * Creates a new Loader for the specified URL. + */ + Loader(URL url) { + base = url; + } + + /* + * Returns the base URL for this Loader. + */ + URL getBaseURL() { + return base; + } + + URL findResource(final String name, boolean check) { + URL url; + try { + url = new URL(base, ParseUtil.encodePath(name, false)); + } catch (MalformedURLException e) { + throw new IllegalArgumentException("name"); + } + + try { + + /* + * For a HTTP connection we use the HEAD method to check if the resource exists. + */ + URLConnection uc = url.openConnection(); + if (uc instanceof HttpURLConnection) { + HttpURLConnection hconn = (HttpURLConnection) uc; + hconn.setRequestMethod("HEAD"); + if (hconn.getResponseCode() >= HttpURLConnection.HTTP_BAD_REQUEST) { + return null; + } + } else { + // our best guess for the other cases + InputStream is = url.openStream(); + is.close(); + } + return url; + } catch (Exception e) { + return null; + } + } + + Resource getResource(final String name, boolean check) { + final URL url; + try { + url = new URL(base, ParseUtil.encodePath(name, false)); + } catch (MalformedURLException e) { + throw new IllegalArgumentException("name"); + } + final URLConnection uc; + try { + uc = url.openConnection(); + InputStream in = uc.getInputStream(); + } catch (Exception e) { + return null; + } + return new Resource() { + public String getName() { + return name; + } + + public URL getURL() { + return url; + } + + public URL getCodeSourceURL() { + return base; + } + + public InputStream getInputStream() throws IOException { + return uc.getInputStream(); + } + + public int getContentLength() throws IOException { + return uc.getContentLength(); + } + }; + } + + /* + * Returns the Resource for the specified name, or null if not found or the caller does not have the permission to get + * the resource. + */ + Resource getResource(final String name) { + return getResource(name, true); + } + + /* + * Returns the local class path for this loader, or null if none. + */ + URL[] getClassPath() throws IOException { + return null; + } + } + + /* + * Inner class used to represent a Loader of resources from a JAR URL. + */ + static class JarLoader extends Loader { + private JarFile jar; + + private URL csu; + + private JarIndex index; + + private MetaIndex metaIndex; + + private URLStreamHandler handler; + + private HashMap lmap; + + /* + * Creates a new JarLoader for the specified URL referring to a JAR file. + */ + JarLoader(URL url, URLStreamHandler jarHandler, HashMap loaderMap) throws IOException { + super(new URL("jar", "", -1, url + "!/", jarHandler)); + csu = url; + handler = jarHandler; + lmap = loaderMap; + + if (!isOptimizable(url)) { + ensureOpen(); + } else { + String fileName = url.getFile(); + if (fileName != null) { + fileName = ParseUtil.decode(fileName); + File f = new File(fileName); + metaIndex = MetaIndex.forJar(f); + // If the meta index is found but the file is not + // installed, set metaIndex to null. A typical + // senario is charsets.jar which won't be installed + // when the user is running in certain locale environment. + // The side effect of null metaIndex will cause + // ensureOpen get called so that IOException is thrown. + if (metaIndex != null && !f.exists()) { + metaIndex = null; + } + } + + // metaIndex is null when either there is no such jar file + // entry recorded in meta-index file or such jar file is + // missing in JRE. See bug 6340399. + if (metaIndex == null) { + ensureOpen(); + } + } + } + + JarFile getJarFile() { + return jar; + } + + private boolean isOptimizable(URL url) { + return "file".equals(url.getProtocol()); + } + + private void ensureOpen() throws IOException { + if (jar == null) { + try { + java.security.AccessController.doPrivileged(new java.security.PrivilegedExceptionAction() { + public Object run() throws IOException { + if (DEBUG) { + System.err.println("Opening " + csu); + Thread.dumpStack(); + } + + jar = getJarFile(csu); + index = JarIndex.getJarIndex(jar, metaIndex); + if (index != null) { + String[] jarfiles = index.getJarFiles(); + // Add all the dependent URLs to the lmap so that loaders + // will not be created for them by + // URLClassPath.getLoader(int) + // if the same URL occurs later on the main class path. We + // set + // Loader to null here to avoid creating a Loader for each + // URL until we actually need to try to load something from + // them. + for (int i = 0; i < jarfiles.length; i++) { + try { + URL jarURL = new URL(csu, jarfiles[i]); + // If a non-null loader already exists, leave it alone. + if (!lmap.containsKey(jarURL)) { + lmap.put(jarURL, null); + } + } catch (MalformedURLException e) { + continue; + } + } + } + return null; + } + }); + } catch (java.security.PrivilegedActionException pae) { + throw (IOException) pae.getException(); + } + } + } + + private JarFile getJarFile(URL url) throws IOException { + // Optimize case where url refers to a local jar file + if (isOptimizable(url)) { + FileURLMapper p = new FileURLMapper(url); + if (!p.exists()) { + throw new FileNotFoundException(p.getPath()); + } + return new JarFile(p.getPath()); + } + URLConnection uc = getBaseURL().openConnection(); + uc.setRequestProperty(USER_AGENT_JAVA_VERSION, JAVA_VERSION); + return ((JarURLConnection) uc).getJarFile(); + } + + /* + * Returns the index of this JarLoader if it exists. + */ + JarIndex getIndex() { + try { + ensureOpen(); + } catch (IOException e) { + throw (InternalError) new InternalError().initCause(e); + } + return index; + } + + /* + * Creates the resource and if the check flag is set to true, checks if is its okay to return the resource. + */ + Resource checkResource(final String name, boolean check, final JarEntry entry) { + + final URL url; + try { + url = new URL(getBaseURL(), ParseUtil.encodePath(name, false)); + } catch (MalformedURLException e) { + return null; + // throw new IllegalArgumentException("name"); + } catch (IOException e) { + return null; + } + + return new Resource() { + public String getName() { + return name; + } + + public URL getURL() { + return url; + } + + public URL getCodeSourceURL() { + return csu; + } + + public InputStream getInputStream() throws IOException { + return jar.getInputStream(entry); + } + + public int getContentLength() { + return (int) entry.getSize(); + } + + public Manifest getManifest() throws IOException { + return jar.getManifest(); + }; + + public Certificate[] getCertificates() { + return entry.getCertificates(); + }; + + public CodeSigner[] getCodeSigners() { + return entry.getCodeSigners(); + }; + }; + } + + /* + * Returns true iff atleast one resource in the jar file has the same package name as that of the specified resource + * name. + */ + boolean validIndex(final String name) { + String packageName = name; + int pos; + if ((pos = name.lastIndexOf("/")) != -1) { + packageName = name.substring(0, pos); + } + + String entryName; + ZipEntry entry; + Enumeration enum_ = jar.entries(); + while (enum_.hasMoreElements()) { + entry = (ZipEntry) enum_.nextElement(); + entryName = entry.getName(); + if ((pos = entryName.lastIndexOf("/")) != -1) + entryName = entryName.substring(0, pos); + if (entryName.equals(packageName)) { + return true; + } + } + return false; + } + + /* + * Returns the URL for a resource with the specified name + */ + URL findResource(final String name, boolean check) { + Resource rsc = getResource(name, check); + if (rsc != null) { + return rsc.getURL(); + } + return null; + } + + /* + * Returns the JAR Resource for the specified name. + */ + Resource getResource(final String name, boolean check) { + if (metaIndex != null) { + if (!metaIndex.mayContain(name)) { + return null; + } + } + + try { + ensureOpen(); + } catch (IOException e) { + throw (InternalError) new InternalError().initCause(e); + } + final JarEntry entry = jar.getJarEntry(name); + if (entry != null) + return checkResource(name, check, entry); + + if (index == null) + return null; + + HashSet visited = new HashSet(); + return getResource(name, check, visited); + } + + /* + * Version of getResource() that tracks the jar files that have been visited by linking through the index files. This + * helper method uses a HashSet to store the URLs of jar files that have been searched and uses it to avoid going into + * an infinite loop, looking for a non-existent resource + */ + Resource getResource(final String name, boolean check, Set visited) { + + Resource res; + Object[] jarFiles; + boolean done = false; + int count = 0; + LinkedList jarFilesList = null; + + /* + * If there no jar files in the index that can potential contain this resource then return immediately. + */ + if ((jarFilesList = index.get(name)) == null) + return null; + + do { + jarFiles = jarFilesList.toArray(); + int size = jarFilesList.size(); + /* loop through the mapped jar file list */ + while (count < size) { + String jarName = (String) jarFiles[count++]; + JarLoader newLoader; + final URL url; + + try { + url = new URL(csu, jarName); + if ((newLoader = (JarLoader) lmap.get(url)) == null) { + /* + * no loader has been set up for this jar file before + */ + newLoader = (JarLoader) AccessController.doPrivileged(new PrivilegedExceptionAction() { + public Object run() throws IOException { + return new JarLoader(url, handler, lmap); + } + }); + + /* + * this newly opened jar file has its own index, merge it into the parent's index, taking into account the + * relative path. + */ + JarIndex newIndex = newLoader.getIndex(); + if (newIndex != null) { + int pos = jarName.lastIndexOf("/"); + newIndex.merge(this.index, (pos == -1 ? null : jarName.substring(0, pos + 1))); + } + + /* put it in the global hashtable */ + lmap.put(url, newLoader); + } + } catch (java.security.PrivilegedActionException pae) { + continue; + } catch (MalformedURLException e) { + continue; + } + + /* + * Note that the addition of the url to the list of visited jars incorporates a check for presence in the hashmap + */ + boolean visitedURL = !visited.add(url); + if (!visitedURL) { + try { + newLoader.ensureOpen(); + } catch (IOException e) { + throw (InternalError) new InternalError().initCause(e); + } + final JarEntry entry = newLoader.jar.getJarEntry(name); + if (entry != null) { + return newLoader.checkResource(name, check, entry); + } + + /* + * Verify that at least one other resource with the same package name as the lookedup resource is present in the new + * jar + */ + if (!newLoader.validIndex(name)) { + /* the mapping is wrong */ + throw new InvalidJarIndexException("Invalid index"); + } + } + + /* + * If newLoader is the current loader or if it is a loader that has already been searched or if the new loader does not + * have an index then skip it and move on to the next loader. + */ + if (visitedURL || newLoader == this || newLoader.getIndex() == null) { + continue; + } + + /* + * Process the index of the new loader + */ + if ((res = newLoader.getResource(name, check, visited)) != null) { + return res; + } + } + // Get the list of jar files again as the list could have grown + // due to merging of index files. + jarFilesList = index.get(name); + + // If the count is unchanged, we are done. + } while (count < jarFilesList.size()); + return null; + } + + /* + * Returns the JAR file local class path, or null if none. + */ + URL[] getClassPath() throws IOException { + if (index != null) { + return null; + } + + if (metaIndex != null) { + return null; + } + + ensureOpen(); + if (SharedSecrets.javaUtilJarAccess().jarFileHasClassPathAttribute(jar)) { // Only + // get + // manifest + // when + // necessary + Manifest man = jar.getManifest(); + if (man != null) { + Attributes attr = man.getMainAttributes(); + if (attr != null) { + String value = attr.getValue(Name.CLASS_PATH); + if (value != null) { + return parseClassPath(csu, value); + } + } + } + } + return null; + } + + /* + * Parses value of the Class-Path manifest attribute and returns an array of URLs relative to the specified base URL. + */ + private URL[] parseClassPath(URL base, String value) throws MalformedURLException { + StringTokenizer st = new StringTokenizer(value); + URL[] urls = new URL[st.countTokens()]; + int i = 0; + while (st.hasMoreTokens()) { + String path = st.nextToken(); + urls[i] = new URL(base, path); + i++; + } + return urls; + } + } + + /* + * Inner class used to represent a loader of classes and resources from a file URL that refers to a directory. + */ + private static class FileLoader extends Loader { + private File dir; + + FileLoader(URL url) throws IOException { + super(url); + if (!"file".equals(url.getProtocol())) { + throw new IllegalArgumentException("url"); + } + String path = url.getFile().replace('/', File.separatorChar); + path = ParseUtil.decode(path); + dir = new File(path); + } + + /* + * Returns the URL for a resource with the specified name + */ + URL findResource(final String name, boolean check) { + Resource rsc = getResource(name, check); + if (rsc != null) { + return rsc.getURL(); + } + return null; + } + + Resource getResource(final String name, boolean check) { + final URL url; + try { + URL normalizedBase = new URL(getBaseURL(), "."); + url = new URL(getBaseURL(), ParseUtil.encodePath(name, false)); + + if (url.getFile().startsWith(normalizedBase.getFile()) == false) { + // requested resource had ../..'s in path + return null; + } + + final File file = new File(dir, name.replace('/', File.separatorChar)); + if (file.exists()) { + return new Resource() { + public String getName() { + return name; + }; + + public URL getURL() { + return url; + }; + + public URL getCodeSourceURL() { + return getBaseURL(); + }; + + public InputStream getInputStream() throws IOException { + return new FileInputStream(file); + }; + + public int getContentLength() throws IOException { + return (int) file.length(); + }; + }; + } + } catch (Exception e) { + return null; + } + return null; + } + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java new file mode 100644 index 0000000000..030abaee5c --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/misc/Unsafe.java @@ -0,0 +1,791 @@ +/* + * Copyright (c) 2000, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.misc; + +import java.security.*; +import java.lang.reflect.*; + +/** + * A collection of methods for performing low-level, unsafe operations. Although the class and all methods are public, + * use of this class is limited because only trusted code can obtain instances of it. + * + * @author John R. Rose + * @see #getUnsafe + */ + +public final class Unsafe { + + private static native void registerNatives(); + + static { + registerNatives(); + com.sun.ts.lib.util.sec.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe"); + } + + private Unsafe() { + } + + private static final Unsafe theUnsafe = new Unsafe(); + + /** + * Provides the caller with the capability of performing unsafe operations. + * + *

+ * The returned Unsafe object should be carefully guarded by the caller, since it can be used to read and + * write data at arbitrary memory addresses. It must never be passed to untrusted code. + * + *

+ * Most methods in this class are very low-level, and correspond to a small number of hardware instructions (on typical + * machines). Compilers are encouraged to optimize these methods accordingly. + * + *

+ * Here is a suggested idiom for using unsafe operations: + * + *

+ * + *
+     * class MyTrustedClass {
+     *   private static final Unsafe unsafe = Unsafe.getUnsafe();
+     *   ...
+     *   private long myCountAddress = ...;
+     *   public int getCount() { return unsafe.getByte(myCountAddress); }
+     * }
+     * 
+ * + *
+ * + * (It may assist compilers to make the local variable be final.) + * + * @exception SecurityException if a security manager exists and its checkPropertiesAccess method doesn't + * allow access to the system properties. + */ + public static Unsafe getUnsafe() { + Class cc = com.sun.ts.lib.util.sec.reflect.Reflection.getCallerClass(2); + if (cc.getClassLoader() != null) + throw new SecurityException("Unsafe"); + return theUnsafe; + } + + /// peek and poke operations + /// (compilers should optimize these to memory ops) + + // These work on object fields in the Java heap. + // They will not work on elements of packed arrays. + + /** + * Fetches a value from a given Java variable. More specifically, fetches a field or array element within the given + * object o at the given offset, or (if o is null) from the memory address whose numerical + * value is the given offset. + *

+ * The results are undefined unless one of the following cases is true: + *

    + *
  • The offset was obtained from {@link #objectFieldOffset} on the {@link java.lang.reflect.Field} of some Java field + * and the object referred to by o is of a class compatible with that field's class. + * + *
  • The offset and object reference o (either null or non-null) were both obtained via + * {@link #staticFieldOffset} and {@link #staticFieldBase} (respectively) from the reflective {@link Field} + * representation of some Java field. + * + *
  • The object referred to by o is an array, and the offset is an integer of the form + * B+N*S, where N is a valid index into the array, and B and S are + * the values obtained by {@link #arrayBaseOffset} and {@link #arrayIndexScale} (respectively) from the array's class. + * The value referred to is the Nth element of the array. + * + *
+ *

+ * If one of the above cases is true, the call references a specific Java variable (field or array element). However, + * the results are undefined if that variable is not in fact of the type returned by this method. + *

+ * This method refers to a variable by means of two parameters, and so it provides (in effect) a + * double-register addressing mode for Java variables. When the object reference is null, this method uses its + * offset as an absolute address. This is similar in operation to methods such as {@link #getInt(long)}, which provide + * (in effect) a single-register addressing mode for non-Java variables. However, because Java variables may + * have a different layout in memory from non-Java variables, programmers should not assume that these two addressing + * modes are ever equivalent. Also, programmers should remember that offsets from the double-register addressing mode + * cannot be portably confused with longs used in the single-register addressing mode. + * + * @param o Java heap object in which the variable resides, if any, else null + * @param offset indication of where the variable resides in a Java heap object, if any, else a memory address locating + * the variable statically + * @return the value fetched from the indicated Java variable + * @throws RuntimeException No defined exceptions are thrown, not even {@link NullPointerException} + */ + public native int getInt(Object o, long offset); + + /** + * Stores a value into a given Java variable. + *

+ * The first two parameters are interpreted exactly as with {@link #getInt(Object, long)} to refer to a specific Java + * variable (field or array element). The given value is stored into that variable. + *

+ * The variable must be of the same type as the method parameter x. + * + * @param o Java heap object in which the variable resides, if any, else null + * @param offset indication of where the variable resides in a Java heap object, if any, else a memory address locating + * the variable statically + * @param x the value to store into the indicated Java variable + * @throws RuntimeException No defined exceptions are thrown, not even {@link NullPointerException} + */ + public native void putInt(Object o, long offset, int x); + + /** + * Fetches a reference value from a given Java variable. + * + * @see #getInt(Object, long) + */ + public native Object getObject(Object o, long offset); + + /** + * Stores a reference value into a given Java variable. + *

+ * Unless the reference x being stored is either null or matches the field type, the results are undefined. + * If the reference o is non-null, car marks or other store barriers for that object (if the VM requires + * them) are updated. + * + * @see #putInt(Object, int, int) + */ + public native void putObject(Object o, long offset, Object x); + + /** @see #getInt(Object, long) */ + public native boolean getBoolean(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putBoolean(Object o, long offset, boolean x); + + /** @see #getInt(Object, long) */ + public native byte getByte(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putByte(Object o, long offset, byte x); + + /** @see #getInt(Object, long) */ + public native short getShort(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putShort(Object o, long offset, short x); + + /** @see #getInt(Object, long) */ + public native char getChar(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putChar(Object o, long offset, char x); + + /** @see #getInt(Object, long) */ + public native long getLong(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putLong(Object o, long offset, long x); + + /** @see #getInt(Object, long) */ + public native float getFloat(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putFloat(Object o, long offset, float x); + + /** @see #getInt(Object, long) */ + public native double getDouble(Object o, long offset); + + /** @see #putInt(Object, int, int) */ + public native void putDouble(Object o, long offset, double x); + + /** + * This method, like all others with 32-bit offsets, was native in a previous release but is now a wrapper which simply + * casts the offset to a long value. It provides backward compatibility with bytecodes compiled against 1.4. + * + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public int getInt(Object o, int offset) { + return getInt(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putInt(Object o, int offset, int x) { + putInt(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public Object getObject(Object o, int offset) { + return getObject(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putObject(Object o, int offset, Object x) { + putObject(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public boolean getBoolean(Object o, int offset) { + return getBoolean(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putBoolean(Object o, int offset, boolean x) { + putBoolean(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public byte getByte(Object o, int offset) { + return getByte(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putByte(Object o, int offset, byte x) { + putByte(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public short getShort(Object o, int offset) { + return getShort(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putShort(Object o, int offset, short x) { + putShort(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public char getChar(Object o, int offset) { + return getChar(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putChar(Object o, int offset, char x) { + putChar(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public long getLong(Object o, int offset) { + return getLong(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putLong(Object o, int offset, long x) { + putLong(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public float getFloat(Object o, int offset) { + return getFloat(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putFloat(Object o, int offset, float x) { + putFloat(o, (long) offset, x); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public double getDouble(Object o, int offset) { + return getDouble(o, (long) offset); + } + + /** + * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long. See {@link #staticFieldOffset}. + */ + @Deprecated + public void putDouble(Object o, int offset, double x) { + putDouble(o, (long) offset, x); + } + + // These work on values in the C heap. + + /** + * Fetches a value from a given memory address. If the address is zero, or does not point into a block obtained from + * {@link #allocateMemory}, the results are undefined. + * + * @see #allocateMemory + */ + public native byte getByte(long address); + + /** + * Stores a value into a given memory address. If the address is zero, or does not point into a block obtained from + * {@link #allocateMemory}, the results are undefined. + * + * @see #getByte(long) + */ + public native void putByte(long address, byte x); + + /** @see #getByte(long) */ + public native short getShort(long address); + + /** @see #putByte(long, byte) */ + public native void putShort(long address, short x); + + /** @see #getByte(long) */ + public native char getChar(long address); + + /** @see #putByte(long, byte) */ + public native void putChar(long address, char x); + + /** @see #getByte(long) */ + public native int getInt(long address); + + /** @see #putByte(long, byte) */ + public native void putInt(long address, int x); + + /** @see #getByte(long) */ + public native long getLong(long address); + + /** @see #putByte(long, byte) */ + public native void putLong(long address, long x); + + /** @see #getByte(long) */ + public native float getFloat(long address); + + /** @see #putByte(long, byte) */ + public native void putFloat(long address, float x); + + /** @see #getByte(long) */ + public native double getDouble(long address); + + /** @see #putByte(long, byte) */ + public native void putDouble(long address, double x); + + /** + * Fetches a native pointer from a given memory address. If the address is zero, or does not point into a block obtained + * from {@link #allocateMemory}, the results are undefined. + * + *

+ * If the native pointer is less than 64 bits wide, it is extended as an unsigned number to a Java long. The pointer may + * be indexed by any given byte offset, simply by adding that offset (as a simple integer) to the long representing the + * pointer. The number of bytes actually read from the target address maybe determined by consulting + * {@link #addressSize}. + * + * @see #allocateMemory + */ + public native long getAddress(long address); + + /** + * Stores a native pointer into a given memory address. If the address is zero, or does not point into a block obtained + * from {@link #allocateMemory}, the results are undefined. + * + *

+ * The number of bytes actually written at the target address maybe determined by consulting {@link #addressSize}. + * + * @see #getAddress(long) + */ + public native void putAddress(long address, long x); + + /// wrappers for malloc, realloc, free: + + /** + * Allocates a new block of native memory, of the given size in bytes. The contents of the memory are uninitialized; + * they will generally be garbage. The resulting native pointer will never be zero, and will be aligned for all value + * types. Dispose of this memory by calling {@link #freeMemory}, or resize it with {@link #reallocateMemory}. + * + * @throws IllegalArgumentException if the size is negative or too large for the native size_t type + * + * @throws OutOfMemoryError if the allocation is refused by the system + * + * @see #getByte(long) + * @see #putByte(long, byte) + */ + public native long allocateMemory(long bytes); + + /** + * Resizes a new block of native memory, to the given size in bytes. The contents of the new block past the size of the + * old block are uninitialized; they will generally be garbage. The resulting native pointer will be zero if and only if + * the requested size is zero. The resulting native pointer will be aligned for all value types. Dispose of this memory + * by calling {@link #freeMemory}, or resize it with {@link #reallocateMemory}. The address passed to this method may be + * null, in which case an allocation will be performed. + * + * @throws IllegalArgumentException if the size is negative or too large for the native size_t type + * + * @throws OutOfMemoryError if the allocation is refused by the system + * + * @see #allocateMemory + */ + public native long reallocateMemory(long address, long bytes); + + /** + * Sets all bytes in a given block of memory to a fixed value (usually zero). + */ + public native void setMemory(long address, long bytes, byte value); + + /** + * Sets all bytes in a given block of memory to a copy of another block. + */ + public native void copyMemory(long srcAddress, long destAddress, long bytes); + + /** + * Disposes of a block of native memory, as obtained from {@link #allocateMemory} or {@link #reallocateMemory}. The + * address passed to this method may be null, in which case no action is taken. + * + * @see #allocateMemory + */ + public native void freeMemory(long address); + + /// random queries + + /** + * This constant differs from all results that will ever be returned from {@link #staticFieldOffset}, + * {@link #objectFieldOffset}, or {@link #arrayBaseOffset}. + */ + public static final int INVALID_FIELD_OFFSET = -1; + + /** + * Returns the offset of a field, truncated to 32 bits. This method is implemented as follows:

+ * + *
+     * public int fieldOffset(Field f) {
+     *     if (Modifier.isStatic(f.getModifiers()))
+     *         return (int) staticFieldOffset(f);
+     *     else
+     *         return (int) objectFieldOffset(f);
+     * }
+     * 
+ * + *
+ * + * @deprecated As of 1.4.1, use {@link #staticFieldOffset} for static fields and {@link #objectFieldOffset} for + * non-static fields. + */ + @Deprecated + public int fieldOffset(Field f) { + if (Modifier.isStatic(f.getModifiers())) + return (int) staticFieldOffset(f); + else + return (int) objectFieldOffset(f); + } + + /** + * Returns the base address for accessing some static field in the given class. This method is implemented as follows: + *
+ * + *
+     * public Object staticFieldBase(Class c) {
+     *     Field[] fields = c.getDeclaredFields();
+     *     for (int i = 0; i < fields.length; i++) {
+     *         if (Modifier.isStatic(fields[i].getModifiers())) {
+     *             return staticFieldBase(fields[i]);
+     *         }
+     *     }
+     *     return null;
+     * }
+     * 
+ * + *
+ * + * @deprecated As of 1.4.1, use {@link #staticFieldBase(Field)} to obtain the base pertaining to a specific + * {@link Field}. This method works only for JVMs which store all statics for a given class in one place. + */ + @Deprecated + public Object staticFieldBase(Class c) { + Field[] fields = c.getDeclaredFields(); + for (int i = 0; i < fields.length; i++) { + if (Modifier.isStatic(fields[i].getModifiers())) { + return staticFieldBase(fields[i]); + } + } + return null; + } + + /** + * Report the location of a given field in the storage allocation of its class. Do not expect to perform any sort of + * arithmetic on this offset; it is just a cookie which is passed to the unsafe heap memory accessors. + * + *

+ * Any given field will always have the same offset and base, and no two distinct fields of the same class will ever + * have the same offset and base. + * + *

+ * As of 1.4.1, offsets for fields are represented as long values, although the Sun JVM does not use the most + * significant 32 bits. However, JVM implementations which store static fields at absolute addresses can use long + * offsets and null base pointers to express the field locations in a form usable by {@link #getInt(Object,long)}. + * Therefore, code which will be ported to such JVMs on 64-bit platforms must preserve all bits of static field offsets. + * + * @see #getInt(Object, long) + */ + public native long staticFieldOffset(Field f); + + /** + * Report the location of a given static field, in conjunction with {@link #staticFieldBase}. + *

+ * Do not expect to perform any sort of arithmetic on this offset; it is just a cookie which is passed to the unsafe + * heap memory accessors. + * + *

+ * Any given field will always have the same offset, and no two distinct fields of the same class will ever have the + * same offset. + * + *

+ * As of 1.4.1, offsets for fields are represented as long values, although the Sun JVM does not use the most + * significant 32 bits. It is hard to imagine a JVM technology which needs more than a few bits to encode an offset + * within a non-array object, However, for consistency with other methods in this class, this method reports its result + * as a long value. + * + * @see #getInt(Object, long) + */ + public native long objectFieldOffset(Field f); + + /** + * Report the location of a given static field, in conjunction with {@link #staticFieldOffset}. + *

+ * Fetch the base "Object", if any, with which static fields of the given class can be accessed via methods like + * {@link #getInt(Object, long)}. This value may be null. This value may refer to an object which is a "cookie", not + * guaranteed to be a real Object, and it should not be used in any way except as argument to the get and put routines + * in this class. + */ + public native Object staticFieldBase(Field f); + + /** + * Ensure the given class has been initialized. This is often needed in conjunction with obtaining the static field base + * of a class. + */ + public native void ensureClassInitialized(Class c); + + /** + * Report the offset of the first element in the storage allocation of a given array class. If {@link #arrayIndexScale} + * returns a non-zero value for the same class, you may use that scale factor, together with this base offset, to form + * new offsets to access elements of arrays of the given class. + * + * @see #getInt(Object, long) + * @see #putInt(Object, long, int) + */ + public native int arrayBaseOffset(Class arrayClass); + + /** + * Report the scale factor for addressing elements in the storage allocation of a given array class. However, arrays of + * "narrow" types will generally not work properly with accessors like {@link #getByte(Object, int)}, so the scale + * factor for such classes is reported as zero. + * + * @see #arrayBaseOffset + * @see #getInt(Object, long) + * @see #putInt(Object, long, int) + */ + public native int arrayIndexScale(Class arrayClass); + + /** + * Report the size in bytes of a native pointer, as stored via {@link #putAddress}. This value will be either 4 or 8. + * Note that the sizes of other primitive types (as stored in native memory blocks) is determined fully by their + * information content. + */ + public native int addressSize(); + + /** + * Report the size in bytes of a native memory page (whatever that is). This value will always be a power of two. + */ + public native int pageSize(); + + /// random trusted operations from JNI: + + /** + * Tell the VM to define a class, without security checks. By default, the class loader and protection domain come from + * the caller's class. + */ + public native Class defineClass(String name, byte[] b, int off, int len, ClassLoader loader, ProtectionDomain protectionDomain); + + public native Class defineClass(String name, byte[] b, int off, int len); + + /** + * Allocate an instance but do not run any constructor. Initializes the class if it has not yet been. + */ + public native Object allocateInstance(Class cls) throws InstantiationException; + + /** Lock the object. It must get unlocked via {@link #monitorExit}. */ + public native void monitorEnter(Object o); + + /** + * Unlock the object. It must have been locked via {@link #monitorEnter}. + */ + public native void monitorExit(Object o); + + /** + * Tries to lock the object. Returns true or false to indicate whether the lock succeeded. If it did, the object must be + * unlocked via {@link #monitorExit}. + */ + public native boolean tryMonitorEnter(Object o); + + /** Throw the exception without telling the verifier. */ + public native void throwException(Throwable ee); + + /** + * Atomically update Java variable to x if it is currently holding expected. + * + * @return true if successful + */ + public final native boolean compareAndSwapObject(Object o, long offset, Object expected, Object x); + + /** + * Atomically update Java variable to x if it is currently holding expected. + * + * @return true if successful + */ + public final native boolean compareAndSwapInt(Object o, long offset, int expected, int x); + + /** + * Atomically update Java variable to x if it is currently holding expected. + * + * @return true if successful + */ + public final native boolean compareAndSwapLong(Object o, long offset, long expected, long x); + + /** + * Fetches a reference value from a given Java variable, with volatile load semantics. Otherwise identical to + * {@link #getObject(Object, long)} + */ + public native Object getObjectVolatile(Object o, long offset); + + /** + * Stores a reference value into a given Java variable, with volatile store semantics. Otherwise identical to + * {@link #putObject(Object, long, Object)} + */ + public native void putObjectVolatile(Object o, long offset, Object x); + + /** Volatile version of {@link #getInt(Object, long)} */ + public native int getIntVolatile(Object o, long offset); + + /** Volatile version of {@link #putInt(Object, long, int)} */ + public native void putIntVolatile(Object o, long offset, int x); + + /** Volatile version of {@link #getBoolean(Object, long)} */ + public native boolean getBooleanVolatile(Object o, long offset); + + /** Volatile version of {@link #putBoolean(Object, long, boolean)} */ + public native void putBooleanVolatile(Object o, long offset, boolean x); + + /** Volatile version of {@link #getByte(Object, long)} */ + public native byte getByteVolatile(Object o, long offset); + + /** Volatile version of {@link #putByte(Object, long, byte)} */ + public native void putByteVolatile(Object o, long offset, byte x); + + /** Volatile version of {@link #getShort(Object, long)} */ + public native short getShortVolatile(Object o, long offset); + + /** Volatile version of {@link #putShort(Object, long, short)} */ + public native void putShortVolatile(Object o, long offset, short x); + + /** Volatile version of {@link #getChar(Object, long)} */ + public native char getCharVolatile(Object o, long offset); + + /** Volatile version of {@link #putChar(Object, long, char)} */ + public native void putCharVolatile(Object o, long offset, char x); + + /** Volatile version of {@link #getLong(Object, long)} */ + public native long getLongVolatile(Object o, long offset); + + /** Volatile version of {@link #putLong(Object, long, long)} */ + public native void putLongVolatile(Object o, long offset, long x); + + /** Volatile version of {@link #getFloat(Object, long)} */ + public native float getFloatVolatile(Object o, long offset); + + /** Volatile version of {@link #putFloat(Object, long, float)} */ + public native void putFloatVolatile(Object o, long offset, float x); + + /** Volatile version of {@link #getDouble(Object, long)} */ + public native double getDoubleVolatile(Object o, long offset); + + /** Volatile version of {@link #putDouble(Object, long, double)} */ + public native void putDoubleVolatile(Object o, long offset, double x); + + /** + * Version of {@link #putObjectVolatile(Object, long, Object)} that does not guarantee immediate visibility of the store + * to other threads. This method is generally only useful if the underlying field is a Java volatile (or if an array + * cell, one that is otherwise only accessed using volatile accesses). + */ + public native void putOrderedObject(Object o, long offset, Object x); + + /** Ordered/Lazy version of {@link #putIntVolatile(Object, long, int)} */ + public native void putOrderedInt(Object o, long offset, int x); + + /** Ordered/Lazy version of {@link #putLongVolatile(Object, long, long)} */ + public native void putOrderedLong(Object o, long offset, long x); + + /** + * Unblock the given thread blocked on park, or, if it is not blocked, cause the subsequent call to + * park not to block. Note: this operation is "unsafe" solely because the caller must somehow ensure that the + * thread has not been destroyed. Nothing special is usually required to ensure this when called from Java (in which + * there will ordinarily be a live reference to the thread) but this is not nearly-automatically so when calling from + * native code. + * + * @param thread the thread to unpark. + * + */ + public native void unpark(Object thread); + + /** + * Block current thread, returning when a balancing unpark occurs, or a balancing unpark has already + * occurred, or the thread is interrupted, or, if not absolute and time is not zero, the given time nanoseconds have + * elapsed, or if absolute, the given deadline in milliseconds since Epoch has passed, or spuriously (i.e., returning + * for no "reason"). Note: This operation is in the Unsafe class only because unpark is, so it would be strange + * to place it elsewhere. + */ + public native void park(boolean isAbsolute, long time); + + /** + * Gets the load average in the system run queue assigned to the available processors averaged over various periods of + * time. This method retrieves the given nelem samples and assigns to the elements of the given + * loadavg array. The system imposes a maximum of 3 samples, representing averages over the last 1, 5, and 15 + * minutes, respectively. + * + * @params loadavg an array of double of size nelems + * @params nelems the number of samples to be retrieved and must be 1 to 3. + * + * @return the number of samples actually retrieved; or -1 if the load average is unobtainable. + */ + public native int getLoadAverage(double[] loadavg, int nelems); +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java new file mode 100644 index 0000000000..09b334d803 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/net/www/ParseUtil.java @@ -0,0 +1,622 @@ +/* + * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.net.www; + +import java.util.BitSet; +import java.io.UnsupportedEncodingException; +import java.io.File; +import java.net.URL; +import java.net.MalformedURLException; +import java.net.URI; +import java.net.URISyntaxException; +import java.nio.ByteBuffer; +import java.nio.CharBuffer; +import java.nio.charset.CharacterCodingException; +import com.sun.ts.lib.util.sec.nio.cs.ThreadLocalCoders; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CoderResult; +import java.nio.charset.CodingErrorAction; + +/** + * A class that contains useful routines common to sun.net.www + * + * @author Mike McCloskey + */ + +public class ParseUtil { + static BitSet encodedInPath; + + static { + encodedInPath = new BitSet(256); + + // Set the bits corresponding to characters that are encoded in the + // path component of a URI. + + // These characters are reserved in the path segment as described in + // RFC2396 section 3.3. + encodedInPath.set('='); + encodedInPath.set(';'); + encodedInPath.set('?'); + encodedInPath.set('/'); + + // These characters are defined as excluded in RFC2396 section 2.4.3 + // and must be escaped if they occur in the data part of a URI. + encodedInPath.set('#'); + encodedInPath.set(' '); + encodedInPath.set('<'); + encodedInPath.set('>'); + encodedInPath.set('%'); + encodedInPath.set('"'); + encodedInPath.set('{'); + encodedInPath.set('}'); + encodedInPath.set('|'); + encodedInPath.set('\\'); + encodedInPath.set('^'); + encodedInPath.set('['); + encodedInPath.set(']'); + encodedInPath.set('`'); + + // US ASCII control characters 00-1F and 7F. + for (int i = 0; i < 32; i++) + encodedInPath.set(i); + encodedInPath.set(127); + } + + /** + * Constructs an encoded version of the specified path string suitable for use in the construction of a URL. + * + * A path separator is replaced by a forward slash. The string is UTF8 encoded. The % escape sequence is used for + * characters that are above 0x7F or those defined in RFC2396 as reserved or excluded in the path component of a URL. + */ + public static String encodePath(String path) { + return encodePath(path, true); + } + + /* + * flag indicates whether path uses platform dependent File.separatorChar or not. True indicates path uses platform + * dependent File.separatorChar. + */ + public static String encodePath(String path, boolean flag) { + char[] retCC = new char[path.length() * 2 + 16]; + int retLen = 0; + char[] pathCC = path.toCharArray(); + + int n = path.length(); + for (int i = 0; i < n; i++) { + char c = pathCC[i]; + if ((!flag && c == '/') || (flag && c == File.separatorChar)) + retCC[retLen++] = '/'; + else { + if (c <= 0x007F) { + if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z' || c >= '0' && c <= '9') { + retCC[retLen++] = c; + } else if (encodedInPath.get(c)) + retLen = escape(retCC, c, retLen); + else + retCC[retLen++] = c; + } else if (c > 0x07FF) { + retLen = escape(retCC, (char) (0xE0 | ((c >> 12) & 0x0F)), retLen); + retLen = escape(retCC, (char) (0x80 | ((c >> 6) & 0x3F)), retLen); + retLen = escape(retCC, (char) (0x80 | ((c >> 0) & 0x3F)), retLen); + } else { + retLen = escape(retCC, (char) (0xC0 | ((c >> 6) & 0x1F)), retLen); + retLen = escape(retCC, (char) (0x80 | ((c >> 0) & 0x3F)), retLen); + } + } + // worst case scenario for character [0x7ff-] every single + // character will be encoded into 9 characters. + if (retLen + 9 > retCC.length) { + int newLen = retCC.length * 2 + 16; + if (newLen < 0) { + newLen = Integer.MAX_VALUE; + } + char[] buf = new char[newLen]; + System.arraycopy(retCC, 0, buf, 0, retLen); + retCC = buf; + } + } + return new String(retCC, 0, retLen); + } + + /** + * Appends the URL escape sequence for the specified char to the specified StringBuffer. + */ + private static int escape(char[] cc, char c, int index) { + cc[index++] = '%'; + cc[index++] = Character.forDigit((c >> 4) & 0xF, 16); + cc[index++] = Character.forDigit(c & 0xF, 16); + return index; + } + + /** + * Un-escape and return the character at position i in string s. + */ + private static byte unescape(String s, int i) { + return (byte) Integer.parseInt(s.substring(i + 1, i + 3), 16); + } + + /** + * Returns a new String constructed from the specified String by replacing the URL escape sequences and UTF8 encoding + * with the characters they represent. + */ + public static String decode(String s) { + int n = s.length(); + if ((n == 0) || (s.indexOf('%') < 0)) + return s; + + StringBuilder sb = new StringBuilder(n); + ByteBuffer bb = ByteBuffer.allocate(n); + CharBuffer cb = CharBuffer.allocate(n); + CharsetDecoder dec = ThreadLocalCoders.decoderFor("UTF-8").onMalformedInput(CodingErrorAction.REPORT) + .onUnmappableCharacter(CodingErrorAction.REPORT); + + char c = s.charAt(0); + for (int i = 0; i < n;) { + assert c == s.charAt(i); + if (c != '%') { + sb.append(c); + if (++i >= n) + break; + c = s.charAt(i); + continue; + } + bb.clear(); + int ui = i; + for (;;) { + assert (n - i >= 2); + try { + bb.put(unescape(s, i)); + } catch (NumberFormatException e) { + throw new IllegalArgumentException(); + } + i += 3; + if (i >= n) + break; + c = s.charAt(i); + if (c != '%') + break; + } + bb.flip(); + cb.clear(); + dec.reset(); + CoderResult cr = dec.decode(bb, cb, true); + if (cr.isError()) + throw new IllegalArgumentException("Error decoding percent encoded characters"); + cr = dec.flush(cb); + if (cr.isError()) + throw new IllegalArgumentException("Error decoding percent encoded characters"); + sb.append(cb.flip().toString()); + } + + return sb.toString(); + } + + /** + * Returns a canonical version of the specified string. + */ + public String canonizeString(String file) { + int i = 0; + int lim = file.length(); + + // Remove embedded /../ + while ((i = file.indexOf("/../")) >= 0) { + if ((lim = file.lastIndexOf('/', i - 1)) >= 0) { + file = file.substring(0, lim) + file.substring(i + 3); + } else { + file = file.substring(i + 3); + } + } + // Remove embedded /./ + while ((i = file.indexOf("/./")) >= 0) { + file = file.substring(0, i) + file.substring(i + 2); + } + // Remove trailing .. + while (file.endsWith("/..")) { + i = file.indexOf("/.."); + if ((lim = file.lastIndexOf('/', i - 1)) >= 0) { + file = file.substring(0, lim + 1); + } else { + file = file.substring(0, i); + } + } + // Remove trailing . + if (file.endsWith("/.")) + file = file.substring(0, file.length() - 1); + + return file; + } + + public static URL fileToEncodedURL(File file) throws MalformedURLException { + String path = file.getAbsolutePath(); + path = ParseUtil.encodePath(path); + if (!path.startsWith("/")) { + path = "/" + path; + } + if (!path.endsWith("/") && file.isDirectory()) { + path = path + "/"; + } + return new URL("file", "", path); + } + + public static java.net.URI toURI(URL url) { + String protocol = url.getProtocol(); + String auth = url.getAuthority(); + String path = url.getPath(); + String query = url.getQuery(); + String ref = url.getRef(); + if (path != null && !(path.startsWith("/"))) + path = "/" + path; + + // + // In java.net.URI class, a port number of -1 implies the default + // port number. So get it stripped off before creating URI instance. + // + if (auth != null && auth.endsWith(":-1")) + auth = auth.substring(0, auth.length() - 3); + + java.net.URI uri; + try { + uri = createURI(protocol, auth, path, query, ref); + } catch (java.net.URISyntaxException e) { + uri = null; + } + return uri; + } + + // + // createURI() and its auxiliary code are cloned from java.net.URI. + // Most of the code are just copy and paste, except that quote() + // has been modified to avoid double-escape. + // + // Usually it is unacceptable, but we're forced to do it because + // otherwise we need to change public API, namely java.net.URI's + // multi-argument constructors. It turns out that the changes cause + // incompatibilities so can't be done. + // + private static URI createURI(String scheme, String authority, String path, String query, String fragment) throws URISyntaxException { + String s = toString(scheme, null, authority, null, null, -1, path, query, fragment); + checkPath(s, scheme, path); + return new URI(s); + } + + private static String toString(String scheme, String opaquePart, String authority, String userInfo, String host, int port, String path, + String query, String fragment) { + StringBuffer sb = new StringBuffer(); + if (scheme != null) { + sb.append(scheme); + sb.append(':'); + } + appendSchemeSpecificPart(sb, opaquePart, authority, userInfo, host, port, path, query); + appendFragment(sb, fragment); + return sb.toString(); + } + + private static void appendSchemeSpecificPart(StringBuffer sb, String opaquePart, String authority, String userInfo, String host, + int port, String path, String query) { + if (opaquePart != null) { + /* + * check if SSP begins with an IPv6 address because we must not quote a literal IPv6 address + */ + if (opaquePart.startsWith("//[")) { + int end = opaquePart.indexOf("]"); + if (end != -1 && opaquePart.indexOf(":") != -1) { + String doquote, dontquote; + if (end == opaquePart.length()) { + dontquote = opaquePart; + doquote = ""; + } else { + dontquote = opaquePart.substring(0, end + 1); + doquote = opaquePart.substring(end + 1); + } + sb.append(dontquote); + sb.append(quote(doquote, L_URIC, H_URIC)); + } + } else { + sb.append(quote(opaquePart, L_URIC, H_URIC)); + } + } else { + appendAuthority(sb, authority, userInfo, host, port); + if (path != null) + sb.append(quote(path, L_PATH, H_PATH)); + if (query != null) { + sb.append('?'); + sb.append(quote(query, L_URIC, H_URIC)); + } + } + } + + private static void appendAuthority(StringBuffer sb, String authority, String userInfo, String host, int port) { + if (host != null) { + sb.append("//"); + if (userInfo != null) { + sb.append(quote(userInfo, L_USERINFO, H_USERINFO)); + sb.append('@'); + } + boolean needBrackets = ((host.indexOf(':') >= 0) && !host.startsWith("[") && !host.endsWith("]")); + if (needBrackets) + sb.append('['); + sb.append(host); + if (needBrackets) + sb.append(']'); + if (port != -1) { + sb.append(':'); + sb.append(port); + } + } else if (authority != null) { + sb.append("//"); + if (authority.startsWith("[")) { + int end = authority.indexOf("]"); + if (end != -1 && authority.indexOf(":") != -1) { + String doquote, dontquote; + if (end == authority.length()) { + dontquote = authority; + doquote = ""; + } else { + dontquote = authority.substring(0, end + 1); + doquote = authority.substring(end + 1); + } + sb.append(dontquote); + sb.append(quote(doquote, L_REG_NAME | L_SERVER, H_REG_NAME | H_SERVER)); + } + } else { + sb.append(quote(authority, L_REG_NAME | L_SERVER, H_REG_NAME | H_SERVER)); + } + } + } + + private static void appendFragment(StringBuffer sb, String fragment) { + if (fragment != null) { + sb.append('#'); + sb.append(quote(fragment, L_URIC, H_URIC)); + } + } + + // Quote any characters in s that are not permitted + // by the given mask pair + // + private static String quote(String s, long lowMask, long highMask) { + int n = s.length(); + StringBuffer sb = null; + boolean allowNonASCII = ((lowMask & L_ESCAPED) != 0); + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (c < '\u0080') { + if (!match(c, lowMask, highMask) && !isEscaped(s, i)) { + if (sb == null) { + sb = new StringBuffer(); + sb.append(s.substring(0, i)); + } + appendEscape(sb, (byte) c); + } else { + if (sb != null) + sb.append(c); + } + } else if (allowNonASCII && (Character.isSpaceChar(c) || Character.isISOControl(c))) { + if (sb == null) { + sb = new StringBuffer(); + sb.append(s.substring(0, i)); + } + appendEncoded(sb, c); + } else { + if (sb != null) + sb.append(c); + } + } + return (sb == null) ? s : sb.toString(); + } + + // + // To check if the given string has an escaped triplet + // at the given position + // + private static boolean isEscaped(String s, int pos) { + if (s == null || (s.length() <= (pos + 2))) + return false; + + return s.charAt(pos) == '%' && match(s.charAt(pos + 1), L_HEX, H_HEX) && match(s.charAt(pos + 2), L_HEX, H_HEX); + } + + private static void appendEncoded(StringBuffer sb, char c) { + ByteBuffer bb = null; + try { + bb = ThreadLocalCoders.encoderFor("UTF-8").encode(CharBuffer.wrap("" + c)); + } catch (CharacterCodingException x) { + assert false; + } + while (bb.hasRemaining()) { + int b = bb.get() & 0xff; + if (b >= 0x80) + appendEscape(sb, (byte) b); + else + sb.append((char) b); + } + } + + private final static char[] hexDigits = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; + + private static void appendEscape(StringBuffer sb, byte b) { + sb.append('%'); + sb.append(hexDigits[(b >> 4) & 0x0f]); + sb.append(hexDigits[(b >> 0) & 0x0f]); + } + + // Tell whether the given character is permitted by the given mask pair + private static boolean match(char c, long lowMask, long highMask) { + if (c < 64) + return ((1L << c) & lowMask) != 0; + if (c < 128) + return ((1L << (c - 64)) & highMask) != 0; + return false; + } + + // If a scheme is given then the path, if given, must be absolute + // + private static void checkPath(String s, String scheme, String path) throws URISyntaxException { + if (scheme != null) { + if ((path != null) && ((path.length() > 0) && (path.charAt(0) != '/'))) + throw new URISyntaxException(s, "Relative path in absolute URI"); + } + } + + // -- Character classes for parsing -- + + // Compute a low-order mask for the characters + // between first and last, inclusive + private static long lowMask(char first, char last) { + long m = 0; + int f = Math.max(Math.min(first, 63), 0); + int l = Math.max(Math.min(last, 63), 0); + for (int i = f; i <= l; i++) + m |= 1L << i; + return m; + } + + // Compute the low-order mask for the characters in the given string + private static long lowMask(String chars) { + int n = chars.length(); + long m = 0; + for (int i = 0; i < n; i++) { + char c = chars.charAt(i); + if (c < 64) + m |= (1L << c); + } + return m; + } + + // Compute a high-order mask for the characters + // between first and last, inclusive + private static long highMask(char first, char last) { + long m = 0; + int f = Math.max(Math.min(first, 127), 64) - 64; + int l = Math.max(Math.min(last, 127), 64) - 64; + for (int i = f; i <= l; i++) + m |= 1L << i; + return m; + } + + // Compute the high-order mask for the characters in the given string + private static long highMask(String chars) { + int n = chars.length(); + long m = 0; + for (int i = 0; i < n; i++) { + char c = chars.charAt(i); + if ((c >= 64) && (c < 128)) + m |= (1L << (c - 64)); + } + return m; + } + + // Character-class masks + + // digit = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | + // "8" | "9" + private static final long L_DIGIT = lowMask('0', '9'); + + private static final long H_DIGIT = 0L; + + // hex = digit | "A" | "B" | "C" | "D" | "E" | "F" | + // "a" | "b" | "c" | "d" | "e" | "f" + private static final long L_HEX = L_DIGIT; + + private static final long H_HEX = highMask('A', 'F') | highMask('a', 'f'); + + // upalpha = "A" | "B" | "C" | "D" | "E" | "F" | "G" | "H" | "I" | + // "J" | "K" | "L" | "M" | "N" | "O" | "P" | "Q" | "R" | + // "S" | "T" | "U" | "V" | "W" | "X" | "Y" | "Z" + private static final long L_UPALPHA = 0L; + + private static final long H_UPALPHA = highMask('A', 'Z'); + + // lowalpha = "a" | "b" | "c" | "d" | "e" | "f" | "g" | "h" | "i" | + // "j" | "k" | "l" | "m" | "n" | "o" | "p" | "q" | "r" | + // "s" | "t" | "u" | "v" | "w" | "x" | "y" | "z" + private static final long L_LOWALPHA = 0L; + + private static final long H_LOWALPHA = highMask('a', 'z'); + + // alpha = lowalpha | upalpha + private static final long L_ALPHA = L_LOWALPHA | L_UPALPHA; + + private static final long H_ALPHA = H_LOWALPHA | H_UPALPHA; + + // alphanum = alpha | digit + private static final long L_ALPHANUM = L_DIGIT | L_ALPHA; + + private static final long H_ALPHANUM = H_DIGIT | H_ALPHA; + + // mark = "-" | "_" | "." | "!" | "~" | "*" | "'" | + // "(" | ")" + private static final long L_MARK = lowMask("-_.!~*'()"); + + private static final long H_MARK = highMask("-_.!~*'()"); + + // unreserved = alphanum | mark + private static final long L_UNRESERVED = L_ALPHANUM | L_MARK; + + private static final long H_UNRESERVED = H_ALPHANUM | H_MARK; + + // reserved = ";" | "/" | "?" | ":" | "@" | "&" | "=" | "+" | + // "$" | "," | "[" | "]" + // Added per RFC2732: "[", "]" + private static final long L_RESERVED = lowMask(";/?:@&=+$,[]"); + + private static final long H_RESERVED = highMask(";/?:@&=+$,[]"); + + // The zero'th bit is used to indicate that escape pairs and non-US-ASCII + // characters are allowed; this is handled by the scanEscape method below. + private static final long L_ESCAPED = 1L; + + private static final long H_ESCAPED = 0L; + + // Dash, for use in domainlabel and toplabel + private static final long L_DASH = lowMask("-"); + + private static final long H_DASH = highMask("-"); + + // uric = reserved | unreserved | escaped + private static final long L_URIC = L_RESERVED | L_UNRESERVED | L_ESCAPED; + + private static final long H_URIC = H_RESERVED | H_UNRESERVED | H_ESCAPED; + + // pchar = unreserved | escaped | + // ":" | "@" | "&" | "=" | "+" | "$" | "," + private static final long L_PCHAR = L_UNRESERVED | L_ESCAPED | lowMask(":@&=+$,"); + + private static final long H_PCHAR = H_UNRESERVED | H_ESCAPED | highMask(":@&=+$,"); + + // All valid path characters + private static final long L_PATH = L_PCHAR | lowMask(";/"); + + private static final long H_PATH = H_PCHAR | highMask(";/"); + + // userinfo = *( unreserved | escaped | + // ";" | ":" | "&" | "=" | "+" | "$" | "," ) + private static final long L_USERINFO = L_UNRESERVED | L_ESCAPED | lowMask(";:&=+$,"); + + private static final long H_USERINFO = H_UNRESERVED | H_ESCAPED | highMask(";:&=+$,"); + + // reg_name = 1*( unreserved | escaped | "$" | "," | + // ";" | ":" | "@" | "&" | "=" | "+" ) + private static final long L_REG_NAME = L_UNRESERVED | L_ESCAPED | lowMask("$,;:@&=+"); + + private static final long H_REG_NAME = H_UNRESERVED | H_ESCAPED | highMask("$,;:@&=+"); + + // All valid characters for server-based authorities + private static final long L_SERVER = L_USERINFO | L_ALPHANUM | L_DASH | lowMask(".:@[]"); + + private static final long H_SERVER = H_USERINFO | H_ALPHANUM | H_DASH | highMask(".:@[]"); +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java similarity index 51% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java index 9988ed18dd..1bc4d02f8e 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ByteBuffered.java @@ -20,33 +20,27 @@ import java.io.IOException; /** - * This is an interface to adapt existing APIs to use {@link java.nio.ByteBuffer - * ByteBuffers} as the underlying data format. Only the initial - * producer and final consumer have to be changed. + * This is an interface to adapt existing APIs to use {@link java.nio.ByteBuffer ByteBuffers} as the underlying + * data format. Only the initial producer and final consumer have to be changed. *

* - * For example, the Zip/Jar code supports {@link java.io.InputStream - * InputStreams}. To make the Zip code use - * {@link java.nio.MappedByteBuffer MappedByteBuffers} as the - * underlying data structure, it can create a class of InputStream that wraps - * the ByteBuffer, and implements the ByteBuffered interface. A co-operating - * class several layers away can ask the InputStream if it is an instance of - * ByteBuffered, then call the {@link #getByteBuffer()} method. + * For example, the Zip/Jar code supports {@link java.io.InputStream InputStreams}. To make the Zip code use + * {@link java.nio.MappedByteBuffer MappedByteBuffers} as the underlying data structure, it can create a class + * of InputStream that wraps the ByteBuffer, and implements the ByteBuffered interface. A co-operating class several + * layers away can ask the InputStream if it is an instance of ByteBuffered, then call the {@link #getByteBuffer()} + * method. */ public interface ByteBuffered { - /** - * Returns the ByteBuffer behind this object, if this particular - * instance has one. An implementation of getByteBuffer() is allowed - * to return null for any reason. - * - * @return The ByteBuffer, if this particular instance has one, or - * null otherwise. - * - * @throws IOException - * If the ByteBuffer is no longer valid. - * - * @since 1.5 - */ - public ByteBuffer getByteBuffer() throws IOException; + /** + * Returns the ByteBuffer behind this object, if this particular instance has one. An implementation of + * getByteBuffer() is allowed to return null for any reason. + * + * @return The ByteBuffer, if this particular instance has one, or null otherwise. + * + * @throws IOException If the ByteBuffer is no longer valid. + * + * @since 1.5 + */ + public ByteBuffer getByteBuffer() throws IOException; } diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java similarity index 96% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java index 314e67b02b..d4a24c1872 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/ch/Interruptible.java @@ -18,6 +18,6 @@ public interface Interruptible { - public void interrupt(); + public void interrupt(); } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java new file mode 100644 index 0000000000..2e3783f1fc --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/nio/cs/ThreadLocalCoders.java @@ -0,0 +1,129 @@ +/* + * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.nio.cs; + +import java.nio.*; +import java.nio.charset.*; + +/** + * Utility class for caching per-thread decoders and encoders. + */ + +public class ThreadLocalCoders { + + private static final int CACHE_SIZE = 3; + + private static abstract class Cache { + + // Thread-local reference to array of cached objects, in LRU order + private ThreadLocal cache = new ThreadLocal(); + + private final int size; + + Cache(int size) { + this.size = size; + } + + abstract Object create(Object name); + + private void moveToFront(Object[] oa, int i) { + Object ob = oa[i]; + for (int j = i; j > 0; j--) + oa[j] = oa[j - 1]; + oa[0] = ob; + } + + abstract boolean hasName(Object ob, Object name); + + Object forName(Object name) { + Object[] oa = (Object[]) cache.get(); + if (oa == null) { + oa = new Object[size]; + cache.set(oa); + } else { + for (int i = 0; i < oa.length; i++) { + Object ob = oa[i]; + if (ob == null) + continue; + if (hasName(ob, name)) { + if (i > 0) + moveToFront(oa, i); + return ob; + } + } + } + + // Create a new object + Object ob = create(name); + oa[oa.length - 1] = ob; + moveToFront(oa, oa.length - 1); + return ob; + } + + } + + private static Cache decoderCache = new Cache(CACHE_SIZE) { + boolean hasName(Object ob, Object name) { + if (name instanceof String) + return (((CharsetDecoder) ob).charset().name().equals(name)); + if (name instanceof Charset) + return ((CharsetDecoder) ob).charset().equals(name); + return false; + } + + Object create(Object name) { + if (name instanceof String) + return Charset.forName((String) name).newDecoder(); + if (name instanceof Charset) + return ((Charset) name).newDecoder(); + assert false; + return null; + } + }; + + public static CharsetDecoder decoderFor(Object name) { + CharsetDecoder cd = (CharsetDecoder) decoderCache.forName(name); + cd.reset(); + return cd; + } + + private static Cache encoderCache = new Cache(CACHE_SIZE) { + boolean hasName(Object ob, Object name) { + if (name instanceof String) + return (((CharsetEncoder) ob).charset().name().equals(name)); + if (name instanceof Charset) + return ((CharsetEncoder) ob).charset().equals(name); + return false; + } + + Object create(Object name) { + if (name instanceof String) + return Charset.forName((String) name).newEncoder(); + if (name instanceof Charset) + return ((Charset) name).newEncoder(); + assert false; + return null; + } + }; + + public static CharsetEncoder encoderFor(Object name) { + CharsetEncoder ce = (CharsetEncoder) encoderCache.forName(name); + ce.reset(); + return ce; + } + +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java new file mode 100644 index 0000000000..515e3a228b --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/ConstantPool.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.reflect; + +import java.lang.reflect.*; + +/** + * Provides reflective access to the constant pools of classes. Currently this is needed to provide reflective access to + * annotations but may be used by other internal subsystems in the future. + */ + +public class ConstantPool { + // Number of entries in this constant pool (= maximum valid constant pool + // index) + public int getSize() { + return getSize0(constantPoolOop); + } + + public Class getClassAt(int index) { + return getClassAt0(constantPoolOop, index); + } + + public Class getClassAtIfLoaded(int index) { + return getClassAtIfLoaded0(constantPoolOop, index); + } + + // Returns either a Method or Constructor. + // Static initializers are returned as Method objects. + public Member getMethodAt(int index) { + return getMethodAt0(constantPoolOop, index); + } + + public Member getMethodAtIfLoaded(int index) { + return getMethodAtIfLoaded0(constantPoolOop, index); + } + + public Field getFieldAt(int index) { + return getFieldAt0(constantPoolOop, index); + } + + public Field getFieldAtIfLoaded(int index) { + return getFieldAtIfLoaded0(constantPoolOop, index); + } + + // Fetches the class name, member (field, method or interface + // method) name, and type descriptor as an array of three Strings + public String[] getMemberRefInfoAt(int index) { + return getMemberRefInfoAt0(constantPoolOop, index); + } + + public int getIntAt(int index) { + return getIntAt0(constantPoolOop, index); + } + + public long getLongAt(int index) { + return getLongAt0(constantPoolOop, index); + } + + public float getFloatAt(int index) { + return getFloatAt0(constantPoolOop, index); + } + + public double getDoubleAt(int index) { + return getDoubleAt0(constantPoolOop, index); + } + + public String getStringAt(int index) { + return getStringAt0(constantPoolOop, index); + } + + public String getUTF8At(int index) { + return getUTF8At0(constantPoolOop, index); + } + + // --------------------------------------------------------------------------- + // Internals only below this point + // + + static { + Reflection.registerFieldsToFilter(ConstantPool.class, new String[] { "constantPoolOop" }); + } + + // HotSpot-internal constant pool object (set by the VM, name known to the VM) + private Object constantPoolOop; + + private native int getSize0(Object constantPoolOop); + + private native Class getClassAt0(Object constantPoolOop, int index); + + private native Class getClassAtIfLoaded0(Object constantPoolOop, int index); + + private native Member getMethodAt0(Object constantPoolOop, int index); + + private native Member getMethodAtIfLoaded0(Object constantPoolOop, int index); + + private native Field getFieldAt0(Object constantPoolOop, int index); + + private native Field getFieldAtIfLoaded0(Object constantPoolOop, int index); + + private native String[] getMemberRefInfoAt0(Object constantPoolOop, int index); + + private native int getIntAt0(Object constantPoolOop, int index); + + private native long getLongAt0(Object constantPoolOop, int index); + + private native float getFloatAt0(Object constantPoolOop, int index); + + private native double getDoubleAt0(Object constantPoolOop, int index); + + private native String getStringAt0(Object constantPoolOop, int index); + + private native String getUTF8At0(Object constantPoolOop, int index); +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java new file mode 100644 index 0000000000..1338ebfa9e --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/Reflection.java @@ -0,0 +1,291 @@ +/* + * Copyright (c) 2001, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.reflect; + +import java.lang.reflect.*; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * Common utility routines used by both java.lang and java.lang.reflect + */ + +public class Reflection { + + /** + * Used to filter out fields and methods from certain classes from public view, where they are sensitive or they may + * contain VM-internal objects. These Maps are updated very rarely. Rather than synchronize on each access, we use + * copy-on-write + */ + private static volatile Map fieldFilterMap; + + private static volatile Map methodFilterMap; + + static { + Map map = new HashMap(); + map.put(Reflection.class, new String[] { "fieldFilterMap", "methodFilterMap" }); + map.put(System.class, new String[] { "security" }); + fieldFilterMap = map; + + methodFilterMap = new HashMap(); + } + + /** + * Returns the class of the method realFramesToSkip frames up the stack (zero-based), ignoring frames + * associated with java.lang.reflect.Method.invoke() and its implementation. The first frame is that associated with + * this method, so getCallerClass(0) returns the Class object for sun.reflect.Reflection. Frames associated + * with java.lang.reflect.Method.invoke() and its implementation are completely ignored and do not count toward the + * number of "real" frames skipped. + */ + public static native Class getCallerClass(int realFramesToSkip); + + /** + * Retrieves the access flags written to the class file. For inner classes these flags may differ from those returned by + * Class.getModifiers(), which searches the InnerClasses attribute to find the source-level access flags. This is used + * instead of Class.getModifiers() for run-time access checks due to compatibility reasons; see 4471811. Only the values + * of the low 13 bits (i.e., a mask of 0x1FFF) are guaranteed to be valid. + */ + private static native int getClassAccessFlags(Class c); + + /** + * A quick "fast-path" check to try to avoid getCallerClass() calls. + */ + public static boolean quickCheckMemberAccess(Class memberClass, int modifiers) { + return Modifier.isPublic(getClassAccessFlags(memberClass) & modifiers); + } + + public static void ensureMemberAccess(Class currentClass, Class memberClass, Object target, int modifiers) + throws IllegalAccessException { + if (currentClass == null || memberClass == null) { + throw new InternalError(); + } + + if (!verifyMemberAccess(currentClass, memberClass, target, modifiers)) { + throw new IllegalAccessException("Class " + currentClass.getName() + " can not access a member of class " + + memberClass.getName() + " with modifiers \"" + Modifier.toString(modifiers) + "\""); + } + } + + public static boolean verifyMemberAccess(Class currentClass, + // Declaring class of field + // or method + Class memberClass, + // May be NULL in case of statics + Object target, int modifiers) { + // Verify that currentClass can access a field, method, or + // constructor of memberClass, where that member's access bits are + // "modifiers". + + boolean gotIsSameClassPackage = false; + boolean isSameClassPackage = false; + + if (currentClass == memberClass) { + // Always succeeds + return true; + } + + if (!Modifier.isPublic(getClassAccessFlags(memberClass))) { + isSameClassPackage = isSameClassPackage(currentClass, memberClass); + gotIsSameClassPackage = true; + if (!isSameClassPackage) { + return false; + } + } + + // At this point we know that currentClass can access memberClass. + + if (Modifier.isPublic(modifiers)) { + return true; + } + + boolean successSoFar = false; + + if (Modifier.isProtected(modifiers)) { + // See if currentClass is a subclass of memberClass + if (isSubclassOf(currentClass, memberClass)) { + successSoFar = true; + } + } + + if (!successSoFar && !Modifier.isPrivate(modifiers)) { + if (!gotIsSameClassPackage) { + isSameClassPackage = isSameClassPackage(currentClass, memberClass); + gotIsSameClassPackage = true; + } + + if (isSameClassPackage) { + successSoFar = true; + } + } + + if (!successSoFar) { + return false; + } + + if (Modifier.isProtected(modifiers)) { + // Additional test for protected members: JLS 6.6.2 + Class targetClass = (target == null ? memberClass : target.getClass()); + if (targetClass != currentClass) { + if (!gotIsSameClassPackage) { + isSameClassPackage = isSameClassPackage(currentClass, memberClass); + gotIsSameClassPackage = true; + } + if (!isSameClassPackage) { + if (!isSubclassOf(targetClass, currentClass)) { + return false; + } + } + } + } + + return true; + } + + private static boolean isSameClassPackage(Class c1, Class c2) { + return isSameClassPackage(c1.getClassLoader(), c1.getName(), c2.getClassLoader(), c2.getName()); + } + + /** + * Returns true if two classes are in the same package; classloader and classname information is enough to determine a + * class's package + */ + private static boolean isSameClassPackage(ClassLoader loader1, String name1, ClassLoader loader2, String name2) { + if (loader1 != loader2) { + return false; + } else { + int lastDot1 = name1.lastIndexOf('.'); + int lastDot2 = name2.lastIndexOf('.'); + if ((lastDot1 == -1) || (lastDot2 == -1)) { + // One of the two doesn't have a package. Only return true + // if the other one also doesn't have a package. + return (lastDot1 == lastDot2); + } else { + int idx1 = 0; + int idx2 = 0; + + // Skip over '['s + if (name1.charAt(idx1) == '[') { + do { + idx1++; + } while (name1.charAt(idx1) == '['); + if (name1.charAt(idx1) != 'L') { + // Something is terribly wrong. Shouldn't be here. + throw new InternalError("Illegal class name " + name1); + } + } + if (name2.charAt(idx2) == '[') { + do { + idx2++; + } while (name2.charAt(idx2) == '['); + if (name2.charAt(idx2) != 'L') { + // Something is terribly wrong. Shouldn't be here. + throw new InternalError("Illegal class name " + name2); + } + } + + // Check that package part is identical + int length1 = lastDot1 - idx1; + int length2 = lastDot2 - idx2; + + if (length1 != length2) { + return false; + } + return name1.regionMatches(false, idx1, name2, idx2, length1); + } + } + } + + static boolean isSubclassOf(Class queryClass, Class ofClass) { + while (queryClass != null) { + if (queryClass == ofClass) { + return true; + } + queryClass = queryClass.getSuperclass(); + } + return false; + } + + // fieldNames must contain only interned Strings + public static synchronized void registerFieldsToFilter(Class containingClass, String... fieldNames) { + fieldFilterMap = registerFilter(fieldFilterMap, containingClass, fieldNames); + } + + // methodNames must contain only interned Strings + public static synchronized void registerMethodsToFilter(Class containingClass, String... methodNames) { + methodFilterMap = registerFilter(methodFilterMap, containingClass, methodNames); + } + + private static Map registerFilter(Map map, Class containingClass, String... names) { + if (map.get(containingClass) != null) { + throw new IllegalArgumentException("Filter already registered: " + containingClass); + } + map = new HashMap(map); + map.put(containingClass, names); + return map; + } + + public static Field[] filterFields(Class containingClass, Field[] fields) { + if (fieldFilterMap == null) { + // Bootstrapping + return fields; + } + return (Field[]) filter(fields, fieldFilterMap.get(containingClass)); + } + + public static Method[] filterMethods(Class containingClass, Method[] methods) { + if (methodFilterMap == null) { + // Bootstrapping + return methods; + } + return (Method[]) filter(methods, methodFilterMap.get(containingClass)); + } + + private static Member[] filter(Member[] members, String[] filteredNames) { + if ((filteredNames == null) || (members.length == 0)) { + return members; + } + int numNewMembers = 0; + for (Member member : members) { + boolean shouldSkip = false; + for (String filteredName : filteredNames) { + if (member.getName() == filteredName) { + shouldSkip = true; + break; + } + } + if (!shouldSkip) { + ++numNewMembers; + } + } + Member[] newMembers = (Member[]) Array.newInstance(members[0].getClass(), numNewMembers); + int destIdx = 0; + for (Member member : members) { + boolean shouldSkip = false; + for (String filteredName : filteredNames) { + if (member.getName() == filteredName) { + shouldSkip = true; + break; + } + } + if (!shouldSkip) { + newMembers[destIdx++] = member; + } + } + return newMembers; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java new file mode 100644 index 0000000000..c2973633be --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/reflect/annotation/AnnotationType.java @@ -0,0 +1,189 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.reflect.annotation; + +import java.lang.annotation.*; +import java.lang.reflect.*; +import java.util.*; +import java.security.AccessController; +import java.security.PrivilegedAction; + +/** + * Represents an annotation type at run time. Used to type-check annotations and apply member defaults. + * + * @author Josh Bloch + * @since 1.5 + */ +public class AnnotationType { + /** + * Member name -> type mapping. Note that primitive types are represented by the class objects for the corresponding + * wrapper types. This matches the return value that must be used for a dynamic proxy, allowing for a simple isInstance + * test. + */ + private final Map memberTypes = new HashMap(); + + /** + * Member name -> default value mapping. + */ + private final Map memberDefaults = new HashMap(); + + /** + * Member name -> Method object mapping. This (and its assoicated accessor) are used only to generate + * AnnotationTypeMismatchExceptions. + */ + private final Map members = new HashMap(); + + /** + * The retention policy for this annotation type. + */ + private RetentionPolicy retention = RetentionPolicy.RUNTIME;; + + /** + * Whether this annotation type is inherited. + */ + private boolean inherited = false; + + /** + * Returns an AnnotationType instance for the specified annotation type. + * + * @throw IllegalArgumentException if the specified class object for does not represent a valid annotation type + */ + public static synchronized AnnotationType getInstance(Class annotationClass) { + AnnotationType result = com.sun.ts.lib.util.sec.misc.SharedSecrets.getJavaLangAccess().getAnnotationType(annotationClass); + if (result == null) + result = new AnnotationType((Class) annotationClass); + + return result; + } + + /** + * Sole constructor. + * + * @param annotationClass the class object for the annotation type + * @throw IllegalArgumentException if the specified class object for does not represent a valid annotation type + */ + private AnnotationType(final Class annotationClass) { + if (!annotationClass.isAnnotation()) + throw new IllegalArgumentException("Not an annotation type"); + + Method[] methods = AccessController.doPrivileged(new PrivilegedAction() { + public Method[] run() { + // Initialize memberTypes and defaultValues + return annotationClass.getDeclaredMethods(); + } + }); + + for (Method method : methods) { + if (method.getParameterTypes().length != 0) + throw new IllegalArgumentException(method + " has params"); + String name = method.getName(); + Class type = method.getReturnType(); + memberTypes.put(name, invocationHandlerReturnType(type)); + members.put(name, method); + + Object defaultValue = method.getDefaultValue(); + if (defaultValue != null) + memberDefaults.put(name, defaultValue); + + members.put(name, method); + } + + com.sun.ts.lib.util.sec.misc.SharedSecrets.getJavaLangAccess().setAnnotationType(annotationClass, this); + + // Initialize retention, & inherited fields. Special treatment + // of the corresponding annotation types breaks infinite recursion. + if (annotationClass != Retention.class && annotationClass != Inherited.class) { + Retention ret = annotationClass.getAnnotation(Retention.class); + retention = (ret == null ? RetentionPolicy.CLASS : ret.value()); + inherited = annotationClass.isAnnotationPresent(Inherited.class); + } + } + + /** + * Returns the type that must be returned by the invocation handler of a dynamic proxy in order to have the dynamic + * proxy return the specified type (which is assumed to be a legal member type for an annotation). + */ + public static Class invocationHandlerReturnType(Class type) { + // Translate primitives to wrappers + if (type == byte.class) + return Byte.class; + if (type == char.class) + return Character.class; + if (type == double.class) + return Double.class; + if (type == float.class) + return Float.class; + if (type == int.class) + return Integer.class; + if (type == long.class) + return Long.class; + if (type == short.class) + return Short.class; + if (type == boolean.class) + return Boolean.class; + + // Otherwise, just return declared type + return type; + } + + /** + * Returns member types for this annotation type (member name -> type mapping). + */ + public Map memberTypes() { + return memberTypes; + } + + /** + * Returns members of this annotation type (member name -> associated Method object mapping). + */ + public Map members() { + return members; + } + + /** + * Returns the default values for this annotation type (Member name -> default value mapping). + */ + public Map memberDefaults() { + return memberDefaults; + } + + /** + * Returns the retention policy for this annotation type. + */ + public RetentionPolicy retention() { + return retention; + } + + /** + * Returns true if this this annotation type is inherited. + */ + public boolean isInherited() { + return inherited; + } + + /** + * For debugging. + */ + public String toString() { + StringBuffer s = new StringBuffer("Annotation Type:" + "\n"); + s.append(" Member types: " + memberTypes + "\n"); + s.append(" Member defaults: " + memberDefaults + "\n"); + s.append(" Retention policy: " + retention + "\n"); + s.append(" Inherited: " + inherited); + return s.toString(); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java new file mode 100644 index 0000000000..1de43a0040 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/action/GetPropertyAction.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.action; + +/** + * A convenience class for retrieving the string value of a system property as a privileged action. + * + *

+ * An instance of this class can be used as the argument of AccessController.doPrivileged. + * + *

+ * The following code retrieves the value of the system property named "prop" as a privileged action: + *

+ * + *

+ * String s = java.security.AccessController.doPrivileged(new GetPropertyAction("prop"));
+ * 
+ * + * @author Roland Schemers + * @see java.security.PrivilegedAction + * @see java.security.AccessController + * @since 1.2 + */ + +public class GetPropertyAction implements java.security.PrivilegedAction { + private String theProp; + + private String defaultVal; + + /** + * Constructor that takes the name of the system property whose string value needs to be determined. + * + * @param theProp the name of the system property. + */ + public GetPropertyAction(String theProp) { + this.theProp = theProp; + } + + /** + * Constructor that takes the name of the system property and the default value of that property. + * + * @param theProp the name of the system property. + * @param defaulVal the default value. + */ + public GetPropertyAction(String theProp, String defaultVal) { + this.theProp = theProp; + this.defaultVal = defaultVal; + } + + /** + * Determines the string value of the system property whose name was specified in the constructor. + * + * @return the string value of the system property, or the default value if there is no property with that key. + */ + public String run() { + String value = System.getProperty(theProp); + return (value == null) ? defaultVal : value; + } +} diff --git a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java similarity index 50% rename from libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java rename to tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java index 857fce24f6..c27e69c8df 100644 --- a/libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/auth/PrincipalComparator.java @@ -17,38 +17,31 @@ package com.sun.ts.lib.util.sec.security.auth; /** - * An object that implements the java.security.Principal interface - * typically also implements this interface to provide a means for comparing - * that object to a specified Subject. + * An object that implements the java.security.Principal interface typically also implements this interface + * to provide a means for comparing that object to a specified Subject. * *

- * The comparison is achieved via the implies method. The - * implementation of the implies method determines whether this - * object "implies" the specified Subject. One example application - * of this method may be for a "group" object to imply a particular - * Subject if that Subject belongs to the group. - * Another example application of this method would be for "role" object to - * imply a particular Subject if that Subject is - * currently acting in that role. + * The comparison is achieved via the implies method. The implementation of the implies method + * determines whether this object "implies" the specified Subject. One example application of this method + * may be for a "group" object to imply a particular Subject if that Subject belongs to the + * group. Another example application of this method would be for "role" object to imply a particular + * Subject if that Subject is currently acting in that role. * *

- * Although classes that implement this interface typically also implement the - * java.security.Principal interface, it is not required. In other - * words, classes may implement the java.security.Principal - * interface by itself, the PrincipalComparator interface by - * itself, or both at the same time. + * Although classes that implement this interface typically also implement the java.security.Principal + * interface, it is not required. In other words, classes may implement the java.security.Principal + * interface by itself, the PrincipalComparator interface by itself, or both at the same time. * * @see java.security.Principal * @see javax.security.auth.Subject */ public interface PrincipalComparator { - /** - * Check if the specified Subject is implied by this object. - * - *

- * - * @return true if the specified Subject is implied by this - * object, or false otherwise. - */ - boolean implies(javax.security.auth.Subject subject); + /** + * Check if the specified Subject is implied by this object. + * + *

+ * + * @return true if the specified Subject is implied by this object, or false otherwise. + */ + boolean implies(javax.security.auth.Subject subject); } diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java new file mode 100644 index 0000000000..0e9cba95bc --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/IdentityDatabase.java @@ -0,0 +1,377 @@ +/* + * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.provider; + +import java.io.*; +import java.util.*; +import java.security.*; + +/** + * An implementation of IdentityScope as a persistent identity database. + * + * @see Identity + * @see Key + * + * @author Benjamin Renaud + */ +public class IdentityDatabase extends IdentityScope implements Serializable { + + /** use serialVersionUID from JDK 1.1. for interoperability */ + private static final long serialVersionUID = 4923799573357658384L; + + /* Are we debugging? */ + private static final boolean debug = false; + + /* Are we printing out error messages? */ + private static final boolean error = true; + + /* The source file, if any, for this database. */ + File sourceFile; + + /* The private representation of the database. */ + Hashtable identities; + + IdentityDatabase() throws InvalidParameterException { + this("restoring..."); + } + + /** + * Construct a new, empty database with a specified source file. + * + * @param file the source file. + */ + public IdentityDatabase(File file) throws InvalidParameterException { + this(file.getName()); + sourceFile = file; + } + + /** + * Construct a new, empty database. + */ + public IdentityDatabase(String name) throws InvalidParameterException { + super(name); + identities = new Hashtable(); + } + + /** + * Initialize an identity database from a stream. The stream should contain data to initialized a serialized + * IdentityDatabase object. + * + * @param is the input stream from which to restore the database. + * + * @exception IOException if a stream IO exception occurs + */ + public static IdentityDatabase fromStream(InputStream is) throws IOException { + IdentityDatabase db = null; + try { + ObjectInputStream ois = new ObjectInputStream(is); + db = (IdentityDatabase) ois.readObject(); + } catch (ClassNotFoundException e) { + // this can't happen. + debug("This should not be happening.", e); + error("The version of the database is obsolete. Cannot initialize."); + + } catch (InvalidClassException e) { + // this may happen in developers workspaces happen. + debug("This should not be happening.", e); + error("Unable to initialize system identity scope: " + " InvalidClassException. \nThis is most likely due to " + + "a serialization versioning problem: a class used in " + "key management was obsoleted"); + + } catch (StreamCorruptedException e) { + debug("The serialization stream is corrupted. Unable to load.", e); + error("Unable to initialize system identity scope." + " StreamCorruptedException."); + } + + if (db == null) { + db = new IdentityDatabase("uninitialized"); + } + + return db; + } + + /** + * Initialize an IdentityDatabase from file. + * + * @param f the filename where the identity database is stored. + * + * @exception IOException a file-related exception occurs (e.g. the directory of the file passed does not exists, etc. + * + * @IOException if a file IO exception occurs. + */ + public static IdentityDatabase fromFile(File f) throws IOException { + FileInputStream fis = new FileInputStream(f); + IdentityDatabase edb = fromStream(fis); + edb.sourceFile = f; + return edb; + } + + /** + * @return the number of identities in the database. + */ + public int size() { + return identities.size(); + } + + /** + * @param name the name of the identity to be retrieved. + * + * @return the identity named name, or null if there are no identities named name in the database. + */ + public Identity getIdentity(String name) { + Identity id = identities.get(name); + if (id instanceof Signer) { + localCheck("get.signer"); + } + return id; + } + + /** + * Get an identity by key. + * + * @param name the key of the identity to be retrieved. + * + * @return the identity with a given key, or null if there are no identities with that key in the database. + */ + public Identity getIdentity(PublicKey key) { + if (key == null) { + return null; + } + Enumeration e = identities(); + while (e.hasMoreElements()) { + Identity i = e.nextElement(); + PublicKey k = i.getPublicKey(); + if (k != null && keyEqual(k, key)) { + if (i instanceof Signer) { + localCheck("get.signer"); + } + return i; + } + } + return null; + } + + private boolean keyEqual(Key key1, Key key2) { + if (key1 == key2) { + return true; + } else { + return MessageDigest.isEqual(key1.getEncoded(), key2.getEncoded()); + } + } + + /** + * Adds an identity to the database. + * + * @param identity the identity to be added. + * + * @exception KeyManagementException if a name or key clash occurs, or if another exception occurs. + */ + public void addIdentity(Identity identity) throws KeyManagementException { + localCheck("add.identity"); + Identity byName = getIdentity(identity.getName()); + Identity byKey = getIdentity(identity.getPublicKey()); + String msg = null; + + if (byName != null) { + msg = "name conflict"; + } + if (byKey != null) { + msg = "key conflict"; + } + if (msg != null) { + throw new KeyManagementException(msg); + } + identities.put(identity.getName(), identity); + } + + /** + * Removes an identity to the database. + */ + public void removeIdentity(Identity identity) throws KeyManagementException { + localCheck("remove.identity"); + String name = identity.getName(); + if (identities.get(name) == null) { + throw new KeyManagementException("there is no identity named " + name + " in " + this); + } + identities.remove(name); + } + + /** + * @return an enumeration of all identities in the database. + */ + public Enumeration identities() { + return identities.elements(); + } + + /** + * Set the source file for this database. + */ + void setSourceFile(File f) { + sourceFile = f; + } + + /** + * @return the source file for this database. + */ + File getSourceFile() { + return sourceFile; + } + + /** + * Save the database in its current state to an output stream. + * + * @param os the output stream to which the database should be serialized. + * + * @exception IOException if an IO exception is raised by stream operations. + */ + public void save(OutputStream os) throws IOException { + try { + ObjectOutputStream oos = new ObjectOutputStream(os); + oos.writeObject(this); + oos.flush(); + } catch (InvalidClassException e) { + debug("This should not be happening.", e); + return; + } + } + + /** + * Save the database to a file. + * + * @exception IOException if an IO exception is raised by stream operations. + */ + void save(File f) throws IOException { + setSourceFile(f); + FileOutputStream fos = new FileOutputStream(f); + save(fos); + } + + /** + * Saves the database to the default source file. + * + * @exception KeyManagementException when there is no default source file specified for this database. + */ + public void save() throws IOException { + if (sourceFile == null) { + throw new IOException("this database has no source file"); + } + save(sourceFile); + } + + /** + * This method returns the file from which to initialize the system database. + */ + private static File systemDatabaseFile() { + + // First figure out where the identity database is hiding, if anywhere. + String dbPath = Security.getProperty("identity.database"); + // if nowhere, it's the canonical place. + if (dbPath == null) { + dbPath = System.getProperty("user.home") + File.separatorChar + "identitydb.obj"; + } + return new File(dbPath); + } + + /* This block initializes the system database, if there is one. */ + static { + java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + public Void run() { + initializeSystem(); + return null; + } + }); + } + + /** + * This method initializes the system's identity database. The canonical location is /identitydatabase.obj. + * This is settable through the identity.database property. + */ + private static void initializeSystem() { + + IdentityDatabase systemDatabase; + File dbFile = systemDatabaseFile(); + + // Second figure out if it's there, and if it isn't, create one. + try { + if (dbFile.exists()) { + debug("loading system database from file: " + dbFile); + systemDatabase = fromFile(dbFile); + } else { + systemDatabase = new IdentityDatabase(dbFile); + } + IdentityScope.setSystemScope(systemDatabase); + debug("System database initialized: " + systemDatabase); + } catch (IOException e) { + debug("Error initializing identity database: " + dbFile, e); + return; + } catch (InvalidParameterException e) { + debug("Error trying to instantiate a system identities db in " + dbFile, e); + return; + } + } + + /* + * private static File securityPropFile(String filename) { // maybe check for a system property which will specify where + * to // look. String sep = File.separator; return new File(System.getProperty("java.home") + sep + "lib" + sep + + * "security" + sep + filename); } + */ + + public String toString() { + return "sun.security.provider.IdentityDatabase, source file: " + sourceFile; + } + + private static void debug(String s) { + if (debug) { + System.err.println(s); + } + } + + private static void debug(String s, Throwable t) { + if (debug) { + t.printStackTrace(); + System.err.println(s); + } + } + + private static void error(String s) { + if (error) { + System.err.println(s); + } + } + + void localCheck(String directive) { + } + + /** + * Returns a parsable name for identity: identityName.scopeName + */ + String localFullName() { + String parsable = getName(); + if (getScope() != null) { + parsable += "." + getScope().getName(); + } + return parsable; + } + + /** + * Serialization write. + */ + private synchronized void writeObject(java.io.ObjectOutputStream stream) throws IOException { + localCheck("serialize.identity.database"); + stream.writeObject(identities); + stream.writeObject(sourceFile); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java new file mode 100644 index 0000000000..bf153ca81c --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyFile.java @@ -0,0 +1,2175 @@ +/* + * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.provider; + +import java.io.*; +import java.lang.RuntimePermission; +import java.lang.reflect.*; +import java.lang.ref.*; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URI; +import java.util.*; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.List; +import java.util.StringTokenizer; +import java.util.PropertyPermission; +import java.util.ArrayList; +import java.util.ListIterator; +import java.util.WeakHashMap; +import java.text.MessageFormat; +//import com.sun.security.auth.PrincipalComparator; +import com.sun.ts.lib.util.sec.security.auth.PrincipalComparator; +import java.security.*; +import java.security.cert.Certificate; +import java.security.cert.X509Certificate; +import javax.security.auth.PrivateCredentialPermission; +import javax.security.auth.Subject; +import javax.security.auth.x500.X500Principal; +import java.io.FilePermission; +import java.net.SocketPermission; +import java.net.NetPermission; +import java.util.PropertyPermission; +import java.util.concurrent.atomic.AtomicReference; +import java.awt.AWTPermission; +/* +import javax.security.auth.AuthPermission; +import javax.security.auth.kerberos.ServicePermission; +import javax.security.auth.kerberos.DelegationPermission; +import java.io.SerializablePermission; +import java.util.logging.LoggingPermission; +import java.sql.SQLPermission; +import java.lang.reflect.ReflectPermission; +import javax.sound.sampled.AudioPermission; +import javax.net.ssl.SSLPermission; +*/ +import com.sun.ts.lib.util.sec.misc.JavaSecurityProtectionDomainAccess; +import static com.sun.ts.lib.util.sec.misc.JavaSecurityProtectionDomainAccess.ProtectionDomainCache; +import com.sun.ts.lib.util.sec.misc.SharedSecrets; +import com.sun.ts.lib.util.sec.security.util.Password; +import com.sun.ts.lib.util.sec.security.util.PolicyUtil; +import com.sun.ts.lib.util.sec.security.util.PropertyExpander; +import com.sun.ts.lib.util.sec.security.util.Debug; +import com.sun.ts.lib.util.sec.security.util.ResourcesMgr; +import com.sun.ts.lib.util.sec.security.util.SecurityConstants; +import com.sun.ts.lib.util.sec.net.www.ParseUtil; + +/** + * This class represents a default implementation for java.security.Policy. + * + * Note: For backward compatibility with JAAS 1.0 it loads both java.auth.policy and java.policy. However it is + * recommended that java.auth.policy be not used and the java.policy contain all grant entries including that contain + * principal-based entries. + * + * + *

+ * This object stores the policy for entire Java runtime, and is the amalgamation of multiple static policy + * configurations that resides in files. The algorithm for locating the policy file(s) and reading their information + * into this Policy object is: + * + *

    + *
  1. Loop through the java.security.Security properties, policy.url.1, policy.url.2, ..., + * policy.url.X" and auth.policy.url.1, auth.policy.url.2, ..., auth.policy.url.X". These + * properties are set in the Java security properties file, which is located in the file named + * <JAVA_HOME>/lib/security/java.security. <JAVA_HOME> refers to the value of the java.home system property, + * and specifies the directory where the JRE is installed. Each property value specifies a URL pointing to + * a policy file to be loaded. Read in and load each policy. + * + * auth.policy.url is supported only for backward compatibility. + * + *
  2. The java.lang.System property java.security.policy may also be set to a URL + * pointing to another policy file (which is the case when a user uses the -D switch at runtime). If this property is + * defined, and its use is allowed by the security property file (the Security property, + * policy.allowSystemProperty is set to true), also load that policy. + * + *
  3. The java.lang.System property java.security.auth.policy may also be set to a URL + * pointing to another policy file (which is the case when a user uses the -D switch at runtime). If this property is + * defined, and its use is allowed by the security property file (the Security property, + * policy.allowSystemProperty is set to true), also load that policy. + * + * java.security.auth.policy is supported only for backward compatibility. + * + * If the java.security.policy or java.security.auth.policy property is defined using "==" (rather than + * "="), then ignore all other specified policies and only load this policy. + *
+ * + * Each policy file consists of one or more grant entries, each of which consists of a number of permission entries. + * + *
+ *   grant signedBy "alias", codeBase "URL",
+ *         principal principalClass "principalName",
+ *         principal principalClass "principalName",
+ *         ... {
+ *
+ *     permission Type "name "action",
+ *         signedBy "alias";
+ *     permission Type "name "action",
+ *         signedBy "alias";
+ *     ....
+ *   };
+ * 
+ * + * All non-bold items above must appear as is (although case doesn't matter and some are optional, as noted below). + * principal entries are optional and need not be present. Italicized items represent variable values. + * + *

+ * A grant entry must begin with the word grant. The signedBy,codeBase and + * principal name/value pairs are optional. If they are not present, then any signer (including unsigned + * code) will match, and any codeBase will match. Note that the principalClass may be set to the wildcard value, + * *, which allows it to match any Principal class. In addition, the principalName may also be set + * to the wildcard value, *, allowing it to match any Principal name. When setting the principalName + * to the *, do not surround the * with quotes. + * + *

+ * A permission entry must begin with the word permission. The word Type in the + * template above is a specific permission type, such as java.io.FilePermission or + * java.lang.RuntimePermission. + * + *

+ * The "action" is required for many permission types, such as java.io.FilePermission (where it + * specifies what type of file access that is permitted). It is not required for categories such as + * java.lang.RuntimePermission where it is not necessary - you either have the permission specified by the + * "name" value following the type name or you don't. + * + *

+ * The signedBy name/value pair for a permission entry is optional. If present, it indicates a signed + * permission. That is, the permission class itself must be signed by the given alias in order for it to be granted. For + * example, suppose you have the following grant entry: + * + *

+ *   grant principal foo.com.Principal "Duke" {
+ *     permission Foo "foobar", signedBy "FooSoft";
+ *   }
+ * 
+ * + *

+ * Then this permission of type Foo is granted if the Foo.class permission has been signed by the + * "FooSoft" alias, or if XXX Foo.class is a system class (i.e., is found on the CLASSPATH). + * + * + *

+ * Items that appear in an entry must appear in the specified order (permission, Type, + * "name", and "action"). An entry is terminated with a semicolon. + * + *

+ * Case is unimportant for the identifiers (permission, signedBy, codeBase, etc.) + * but is significant for the Type or for any string that is passed in as a value. + *

+ * + *

+ * An example of two entries in a policy configuration file is + * + *

+ *   // if the code is comes from "foo.com" and is running as "Duke",
+ *   // grant it read/write to all files in /tmp.
+ *
+ *   grant codeBase "foo.com", principal foo.com.Principal "Duke" {
+ *              permission java.io.FilePermission "/tmp/*", "read,write";
+ *   };
+ *
+ *   // grant any code running as "Duke" permission to read
+ *   // the "java.vendor" Property.
+ *
+ *   grant principal foo.com.Principal "Duke" {
+ *         permission java.util.PropertyPermission "java.vendor";
+ *
+ *
+ * 
+ * + * This Policy implementation supports special handling of any permission that contains the string, "${{self}}", + * as part of its target name. When such a permission is evaluated (such as during a security check), ${{self}} + * is replaced with one or more Principal class/name pairs. The exact replacement performed depends upon the contents of + * the grant clause to which the permission belongs. + *

+ * + * If the grant clause does not contain any principal information, the permission will be ignored (permissions + * containing ${{self}} in their target names are only valid in the context of a principal-based grant clause). + * For example, BarPermission will always be ignored in the following grant clause: + * + *

+ *    grant codebase "www.foo.com", signedby "duke" {
+ *      permission BarPermission "... ${{self}} ...";
+ *    };
+ * 
+ * + * If the grant clause contains principal information, ${{self}} will be replaced with that same principal + * information. For example, ${{self}} in BarPermission will be replaced by + * javax.security.auth.x500.X500Principal "cn=Duke" in the following grant clause: + * + *
+ *    grant principal javax.security.auth.x500.X500Principal "cn=Duke" {
+ *      permission BarPermission "... ${{self}} ...";
+ *    };
+ * 
+ * + * If there is a comma-separated list of principals in the grant clause, then ${{self}} will be replaced by the + * same comma-separated list or principals. In the case where both the principal class and name are wildcarded in the + * grant clause, ${{self}} is replaced with all the principals associated with the Subject in the + * current AccessControlContext. + * + * + *

+ * For PrivateCredentialPermissions, you can also use "self" instead of "${{self}}". However the use of + * "self" is deprecated in favour of "${{self}}". + * + * @see java.security.CodeSource + * @see java.security.Permissions + * @see java.security.ProtectionDomain + */ +public class PolicyFile extends java.security.Policy { + + private static final Debug debug = Debug.getInstance("policy"); + + private static final String NONE = "NONE"; + + private static final String P11KEYSTORE = "PKCS11"; + + private static final String SELF = "${{self}}"; + + private static final String X500PRINCIPAL = "javax.security.auth.x500.X500Principal"; + + private static final String POLICY = "java.security.policy"; + + private static final String SECURITY_MANAGER = "java.security.manager"; + + private static final String POLICY_URL = "policy.url."; + + private static final String AUTH_POLICY = "java.security.auth.policy"; + + private static final String AUTH_POLICY_URL = "auth.policy.url."; + + private static final int DEFAULT_CACHE_SIZE = 1; + + /** the scope to check */ + private static IdentityScope scope = null; + + // contains the policy grant entries, PD cache, and alias mapping + private AtomicReference policyInfo = new AtomicReference(); + + private boolean constructed = false; + + private boolean expandProperties = true; + + private boolean ignoreIdentityScope = false; + + private boolean allowSystemProperties = true; + + private boolean notUtf8 = false; + + private URL url; + + // for use with the reflection API + + private static final Class[] PARAMS0 = {}; + + private static final Class[] PARAMS1 = { String.class }; + + private static final Class[] PARAMS2 = { String.class, String.class }; + + /** + * Initializes the Policy object and reads the default policy configuration file(s) into the Policy object. + */ + public PolicyFile() { + init((URL) null); + } + + /** + * Initializes the Policy object and reads the default policy from the specified URL only. + */ + public PolicyFile(URL url) { + this.url = url; + init(url); + } + + /** + * Initializes the Policy object and reads the default policy configuration file(s) into the Policy object. + * + * The algorithm for locating the policy file(s) and reading their information into the Policy object is: + * + *

+     *   loop through the Security Properties named "policy.url.1",
+     *  ""policy.url.2", "auth.policy.url.1",  "auth.policy.url.2" etc, until
+     *   you don't find one. Each of these specify a policy file.
+     *
+     *   if none of these could be loaded, use a builtin static policy
+     *      equivalent to the default lib/security/java.policy file.
+     *
+     *   if the system property "java.policy" or "java.auth.policy" is defined
+     * (which is the
+     *      case when the user uses the -D switch at runtime), and
+     *     its use is allowed by the security property file,
+     *     also load it.
+     * 
+ * + * Each policy file consists of one or more grant entries, each of which consists of a number of permission entries. + * + *
+     *   grant signedBy "alias", codeBase "URL" {
+     *     permission Type "name", "action",
+     *         signedBy "alias";
+     *     ....
+     *     permission Type "name", "action",
+     *         signedBy "alias";
+     *   };
+     *
+     * 
+ * + * All non-italicized items above must appear as is (although case doesn't matter and some are optional, as noted + * below). Italicized items represent variable values. + * + *

+ * A grant entry must begin with the word grant. The signedBy and codeBase + * name/value pairs are optional. If they are not present, then any signer (including unsigned code) will match, and any + * codeBase will match. + * + *

+ * A permission entry must begin with the word permission. The word Type in the + * template above would actually be a specific permission type, such as java.io.FilePermission or + * java.lang.RuntimePermission. + * + *

+ * The "action" is required for many permission types, such as java.io.FilePermission (where it + * specifies what type of file access is permitted). It is not required for categories such as + * java.lang.RuntimePermission where it is not necessary - you either have the permission specified by the + * "name" value following the type name or you don't. + * + *

+ * The signedBy name/value pair for a permission entry is optional. If present, it indicates a signed + * permission. That is, the permission class itself must be signed by the given alias in order for it to be granted. For + * example, suppose you have the following grant entry: + * + *

+     *   grant {
+     *     permission Foo "foobar", signedBy "FooSoft";
+     *   }
+     * 
+ * + *

+ * Then this permission of type Foo is granted if the Foo.class permission has been signed by the + * "FooSoft" alias, or if Foo.class is a system class (i.e., is found on the CLASSPATH). + * + *

+ * Items that appear in an entry must appear in the specified order (permission, Type, + * "name", and "action"). An entry is terminated with a semicolon. + * + *

+ * Case is unimportant for the identifiers (permission, signedBy, codeBase, etc.) + * but is significant for the Type or for any string that is passed in as a value. + *

+ * + *

+ * An example of two entries in a policy configuration file is + * + *

+     *   //  if the code is signed by "Duke", grant it read/write to all
+     *   // files in /tmp.
+     *
+     *   grant signedBy "Duke" {
+     *          permission java.io.FilePermission "/tmp/*", "read,write";
+     *   };
+     * 

+ * // grant everyone the following permission + * + * grant { + * permission java.util.PropertyPermission "java.vendor"; + * }; + *

+ */ + private void init(URL url) { + // Properties are set once for each init(); ignore changes between + // between diff invocations of initPolicyFile(policy, url, info). + String numCacheStr = AccessController.doPrivileged(new PrivilegedAction() { + public String run() { + expandProperties = "true".equalsIgnoreCase(Security.getProperty("policy.expandProperties")); + ignoreIdentityScope = "true".equalsIgnoreCase(Security.getProperty("policy.ignoreIdentityScope")); + allowSystemProperties = "true".equalsIgnoreCase(Security.getProperty("policy.allowSystemProperty")); + notUtf8 = "false".equalsIgnoreCase(System.getProperty("sun.security.policy.utf8")); + return System.getProperty("sun.security.policy.numcaches"); + } + }); + + int numCaches; + if (numCacheStr != null) { + try { + numCaches = Integer.parseInt(numCacheStr); + } catch (NumberFormatException e) { + numCaches = DEFAULT_CACHE_SIZE; + } + } else { + numCaches = DEFAULT_CACHE_SIZE; + } + // System.out.println("number caches=" + numCaches); + PolicyInfo newInfo = new PolicyInfo(numCaches); + initPolicyFile(newInfo, url); + policyInfo.set(newInfo); + } + + private void initPolicyFile(final PolicyInfo newInfo, final URL url) { + + if (url != null) { + + /** + * If the caller specified a URL via Policy.getInstance, we only read from that URL + */ + + if (debug != null) { + debug.println("reading " + url); + } + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + if (init(url, newInfo) == false) { + // use static policy if all else fails + initStaticPolicy(newInfo); + } + return null; + } + }); + + } else { + + /** + * Caller did not specify URL via Policy.getInstance. Read from URLs listed in the java.security properties file. + * + * We call initPolicyFile with POLICY , POLICY_URL and then call it with AUTH_POLICY and AUTH_POLICY_URL So first we + * will process the JAVA standard policy and then process the JAVA AUTH Policy. This is for backward compatibility as + * well as to handle cases where the user has a single unified policyfile with both java policy entries and auth entries + */ + + boolean loaded_one = initPolicyFile(POLICY, POLICY_URL, newInfo); + // To maintain strict backward compatibility + // we load the static policy only if POLICY load failed + if (!loaded_one) { + // use static policy if all else fails + initStaticPolicy(newInfo); + } + + initPolicyFile(AUTH_POLICY, AUTH_POLICY_URL, newInfo); + } + } + + private boolean initPolicyFile(final String propname, final String urlname, final PolicyInfo newInfo) { + Boolean loadedPolicy = AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { + boolean loaded_policy = false; + + if (allowSystemProperties) { + String extra_policy = System.getProperty(propname); + if (extra_policy != null) { + boolean overrideAll = false; + if (extra_policy.startsWith("=")) { + overrideAll = true; + extra_policy = extra_policy.substring(1); + } + try { + extra_policy = PropertyExpander.expand(extra_policy); + URL policyURL; + + File policyFile = new File(extra_policy); + if (policyFile.exists()) { + policyURL = ParseUtil.fileToEncodedURL(new File(policyFile.getCanonicalPath())); + } else { + policyURL = new URL(extra_policy); + } + if (debug != null) + debug.println("reading " + policyURL); + if (init(policyURL, newInfo)) + loaded_policy = true; + } catch (Exception e) { + // ignore. + if (debug != null) { + debug.println("caught exception: " + e); + } + } + if (overrideAll) { + if (debug != null) { + debug.println("overriding other policies!"); + } + return Boolean.valueOf(loaded_policy); + } + } + } + + int n = 1; + String policy_uri; + + while ((policy_uri = Security.getProperty(urlname + n)) != null) { + try { + URL policy_url = null; + String expanded_uri = PropertyExpander.expand(policy_uri).replace(File.separatorChar, '/'); + + if (policy_uri.startsWith("file:${java.home}/") || policy_uri.startsWith("file:${user.home}/")) { + + // this special case accommodates + // the situation java.home/user.home + // expand to a single slash, resulting in + // a file://foo URI + policy_url = new File(expanded_uri.substring(5)).toURI().toURL(); + } else { + policy_url = new URI(expanded_uri).toURL(); + } + + if (debug != null) + debug.println("reading " + policy_url); + if (init(policy_url, newInfo)) + loaded_policy = true; + } catch (Exception e) { + if (debug != null) { + debug.println("error reading policy " + e); + e.printStackTrace(); + } + // ignore that policy + } + n++; + } + return Boolean.valueOf(loaded_policy); + } + }); + + return loadedPolicy.booleanValue(); + } + + /** + * Reads a policy configuration into the Policy object using a Reader object. + * + * @param policyFile the policy Reader object. + */ + private boolean init(URL policy, PolicyInfo newInfo) { + boolean success = false; + PolicyParser pp = new PolicyParser(expandProperties); + InputStreamReader isr = null; + try { + + // read in policy using UTF-8 by default + // + // check non-standard system property to see if + // the default encoding should be used instead + + if (notUtf8) { + isr = new InputStreamReader(PolicyUtil.getInputStream(policy)); + } else { + isr = new InputStreamReader(PolicyUtil.getInputStream(policy), "UTF-8"); + } + + pp.read(isr); + + KeyStore keyStore = null; + try { + keyStore = PolicyUtil.getKeyStore(policy, pp.getKeyStoreUrl(), pp.getKeyStoreType(), pp.getKeyStoreProvider(), + pp.getStorePassURL(), debug); + } catch (Exception e) { + // ignore, treat it like we have no keystore + if (debug != null) { + e.printStackTrace(); + } + } + + Enumeration enum_ = pp.grantElements(); + while (enum_.hasMoreElements()) { + PolicyParser.GrantEntry ge = enum_.nextElement(); + addGrantEntry(ge, keyStore, newInfo); + } + } catch (PolicyParser.ParsingException pe) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString(POLICY + ": error parsing policy:\n\tmessage")); + Object[] source = { policy, pe.getLocalizedMessage() }; + System.err.println(form.format(source)); + if (debug != null) + pe.printStackTrace(); + + } catch (Exception e) { + if (debug != null) { + debug.println("error parsing " + policy); + debug.println(e.toString()); + e.printStackTrace(); + } + } finally { + if (isr != null) { + try { + isr.close(); + success = true; + } catch (IOException e) { + // ignore the exception + } + } else { + success = true; + } + } + + return success; + } + + private void initStaticPolicy(final PolicyInfo newInfo) { + AccessController.doPrivileged(new PrivilegedAction() { + public Void run() { + PolicyEntry pe = new PolicyEntry(new CodeSource(null, (Certificate[]) null)); + pe.add(SecurityConstants.LOCAL_LISTEN_PERMISSION); + pe.add(new PropertyPermission("java.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vendor", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vendor.url", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.class.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("os.name", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("os.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("os.arch", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("file.separator", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("path.separator", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("line.separator", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.specification.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.specification.vendor", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.specification.name", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.specification.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.specification.vendor", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.specification.name", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.version", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.vendor", SecurityConstants.PROPERTY_READ_ACTION)); + pe.add(new PropertyPermission("java.vm.name", SecurityConstants.PROPERTY_READ_ACTION)); + + // No need to sync because noone has access to newInfo yet + newInfo.policyEntries.add(pe); + + return null; + } + }); + } + + /** + * Given a GrantEntry, create a codeSource. + * + * @return null if signedBy alias is not recognized + */ + private CodeSource getCodeSource(PolicyParser.GrantEntry ge, KeyStore keyStore, PolicyInfo newInfo) + throws java.net.MalformedURLException { + Certificate[] certs = null; + if (ge.signedBy != null) { + certs = getCertificates(keyStore, ge.signedBy, newInfo); + if (certs == null) { + // we don't have a key for this alias, + // just return + if (debug != null) { + debug.println(" -- No certs for alias '" + ge.signedBy + "' - ignoring entry"); + } + return null; + } + } + + URL location; + + if (ge.codeBase != null) + location = new URL(ge.codeBase); + else + location = null; + + return (canonicalizeCodebase(new CodeSource(location, certs), false)); + } + + /** + * Add one policy entry to the list. + */ + private void addGrantEntry(PolicyParser.GrantEntry ge, KeyStore keyStore, PolicyInfo newInfo) { + + if (debug != null) { + debug.println("Adding policy entry: "); + debug.println(" signedBy " + ge.signedBy); + debug.println(" codeBase " + ge.codeBase); + if (ge.principals != null && ge.principals.size() > 0) { + ListIterator li = ge.principals.listIterator(); + while (li.hasNext()) { + PolicyParser.PrincipalEntry pppe = li.next(); + debug.println(" " + pppe.toString()); + } + } + } + + try { + CodeSource codesource = getCodeSource(ge, keyStore, newInfo); + // skip if signedBy alias was unknown... + if (codesource == null) + return; + + // perform keystore alias principal replacement. + // for example, if alias resolves to X509 certificate, + // replace principal with: + // -- skip if alias is unknown + if (replacePrincipals(ge.principals, keyStore) == false) + return; + PolicyEntry entry = new PolicyEntry(codesource, ge.principals); + Enumeration enum_ = ge.permissionElements(); + while (enum_.hasMoreElements()) { + PolicyParser.PermissionEntry pe = enum_.nextElement(); + + try { + // perform ${{ ... }} expansions within permission name + expandPermissionName(pe, keyStore); + + // XXX special case PrivateCredentialPermission-SELF + Permission perm; + if (pe.permission.equals("javax.security.auth.PrivateCredentialPermission") && pe.name.endsWith(" self")) { + pe.name = pe.name.substring(0, pe.name.indexOf("self")) + SELF; + } + // check for self + if (pe.name != null && pe.name.indexOf(SELF) != -1) { + // Create a "SelfPermission" , it could be an + // an unresolved permission which will be resolved + // when implies is called + // Add it to entry + Certificate certs[]; + if (pe.signedBy != null) { + certs = getCertificates(keyStore, pe.signedBy, newInfo); + } else { + certs = null; + } + perm = new SelfPermission(pe.permission, pe.name, pe.action, certs); + } else { + perm = getInstance(pe.permission, pe.name, pe.action); + } + entry.add(perm); + if (debug != null) { + debug.println(" " + perm); + } + } catch (ClassNotFoundException cnfe) { + Certificate certs[]; + if (pe.signedBy != null) { + certs = getCertificates(keyStore, pe.signedBy, newInfo); + } else { + certs = null; + } + + // only add if we had no signer or we had a + // a signer and found the keys for it. + if (certs != null || pe.signedBy == null) { + Permission perm = new UnresolvedPermission(pe.permission, pe.name, pe.action, certs); + entry.add(perm); + if (debug != null) { + debug.println(" " + perm); + } + } + } catch (java.lang.reflect.InvocationTargetException ite) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString(POLICY + ": error adding Permission, perm:\n\tmessage")); + Object[] source = { pe.permission, ite.getTargetException().toString() }; + System.err.println(form.format(source)); + } catch (Exception e) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString(POLICY + ": error adding Permission, perm:\n\tmessage")); + Object[] source = { pe.permission, e.toString() }; + System.err.println(form.format(source)); + } + } + + // No need to sync because noone has access to newInfo yet + newInfo.policyEntries.add(entry); + } catch (Exception e) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString(POLICY + ": error adding Entry:\n\tmessage")); + Object[] source = { e.toString() }; + System.err.println(form.format(source)); + } + if (debug != null) + debug.println(); + } + + /** + * Returns a new Permission object of the given Type. The Permission is created by getting the Class object using the + * Class.forName method, and using the reflection API to invoke the (String name, String actions) + * constructor on the object. + * + * @param type the type of Permission being created. + * @param name the name of the Permission being created. + * @param actions the actions of the Permission being created. + * + * @exception ClassNotFoundException if the particular Permission class could not be found. + * + * @exception IllegalAccessException if the class or initializer is not accessible. + * + * @exception InstantiationException if getInstance tries to instantiate an abstract class or an interface, or if the + * instantiation fails for some other reason. + * + * @exception NoSuchMethodException if the (String, String) constructor is not found. + * + * @exception InvocationTargetException if the underlying Permission constructor throws an exception. + * + */ + + private static final Permission getInstance(String type, String name, String actions) throws ClassNotFoundException, + InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException { + // XXX we might want to keep a hash of created factories... + Class pc = Class.forName(type); + Permission answer = getKnownInstance(pc, name, actions); + if (answer != null) { + return answer; + } + + if (name == null && actions == null) { + try { + Constructor c = pc.getConstructor(PARAMS0); + return (Permission) c.newInstance(new Object[] {}); + } catch (NoSuchMethodException ne) { + try { + Constructor c = pc.getConstructor(PARAMS1); + return (Permission) c.newInstance(new Object[] { name }); + } catch (NoSuchMethodException ne1) { + Constructor c = pc.getConstructor(PARAMS2); + return (Permission) c.newInstance(new Object[] { name, actions }); + } + } + } else { + if (name != null && actions == null) { + try { + Constructor c = pc.getConstructor(PARAMS1); + return (Permission) c.newInstance(new Object[] { name }); + } catch (NoSuchMethodException ne) { + Constructor c = pc.getConstructor(PARAMS2); + return (Permission) c.newInstance(new Object[] { name, actions }); + } + } else { + Constructor c = pc.getConstructor(PARAMS2); + return (Permission) c.newInstance(new Object[] { name, actions }); + } + } + } + + /** + * Creates one of the well-known permissions directly instead of via reflection. Keep list short to not penalize + * non-JDK-defined permissions. + */ + private static final Permission getKnownInstance(Class claz, String name, String actions) { + // XXX shorten list to most popular ones? + if (claz.equals(FilePermission.class)) { + return new FilePermission(name, actions); + } else if (claz.equals(SocketPermission.class)) { + return new SocketPermission(name, actions); + } else if (claz.equals(RuntimePermission.class)) { + return new RuntimePermission(name, actions); + } else if (claz.equals(PropertyPermission.class)) { + return new PropertyPermission(name, actions); + } else if (claz.equals(NetPermission.class)) { + return new NetPermission(name, actions); + } else if (claz.equals(AllPermission.class)) { + return SecurityConstants.ALL_PERMISSION; + } else if (claz.equals(AWTPermission.class)) { + return new AWTPermission(name, actions); + /* + * } else if (claz.equals(ReflectPermission.class)) { return new ReflectPermission(name, actions); } else if + * (claz.equals(SecurityPermission.class)) { return new SecurityPermission(name, actions); } else if + * (claz.equals(PrivateCredentialPermission.class)) { return new PrivateCredentialPermission(name, actions); } else if + * (claz.equals(AuthPermission.class)) { return new AuthPermission(name, actions); } else if + * (claz.equals(ServicePermission.class)) { return new ServicePermission(name, actions); } else if + * (claz.equals(DelegationPermission.class)) { return new DelegationPermission(name, actions); } else if + * (claz.equals(SerializablePermission.class)) { return new SerializablePermission(name, actions); } else if + * (claz.equals(AudioPermission.class)) { return new AudioPermission(name, actions); } else if + * (claz.equals(SSLPermission.class)) { return new SSLPermission(name, actions); } else if + * (claz.equals(LoggingPermission.class)) { return new LoggingPermission(name, actions); } else if + * (claz.equals(SQLPermission.class)) { return new SQLPermission(name, actions); + */ + } else { + return null; + } + } + + /** + * Fetch all certs associated with this alias. + */ + private Certificate[] getCertificates(KeyStore keyStore, String aliases, PolicyInfo newInfo) { + + List vcerts = null; + + StringTokenizer st = new StringTokenizer(aliases, ","); + int n = 0; + + while (st.hasMoreTokens()) { + String alias = st.nextToken().trim(); + n++; + Certificate cert = null; + // See if this alias's cert has already been cached + synchronized (newInfo.aliasMapping) { + cert = (Certificate) newInfo.aliasMapping.get(alias); + + if (cert == null && keyStore != null) { + + try { + cert = keyStore.getCertificate(alias); + } catch (KeyStoreException kse) { + // never happens, because keystore has already been loaded + // when we call this + } + if (cert != null) { + newInfo.aliasMapping.put(alias, cert); + newInfo.aliasMapping.put(cert, alias); + } + } + } + + if (cert != null) { + if (vcerts == null) + vcerts = new ArrayList(); + vcerts.add(cert); + } + } + + // make sure n == vcerts.size, since we are doing a logical *and* + if (vcerts != null && n == vcerts.size()) { + Certificate[] certs = new Certificate[vcerts.size()]; + vcerts.toArray(certs); + return certs; + } else { + return null; + } + } + + /** + * Refreshes the policy object by re-reading all the policy files. + */ + @Override + public void refresh() { + init(url); + } + + /** + * Evaluates the the global policy for the permissions granted to the ProtectionDomain and tests whether the permission + * is granted. + * + * @param domain the ProtectionDomain to test + * @param permission the Permission object to be tested for implication. + * + * @return true if "permission" is a proper subset of a permission granted to this ProtectionDomain. + * + * @see java.security.ProtectionDomain + */ + @Override + public boolean implies(ProtectionDomain pd, Permission p) { + PolicyInfo pi = policyInfo.get(); + ProtectionDomainCache pdMap = pi.getPdMapping(); + + PermissionCollection pc = pdMap.get(pd); + + if (pc != null) { + return pc.implies(p); + } + + pc = getPermissions(pd); + if (pc == null) { + return false; + } + + // cache mapping of protection domain to its PermissionCollection + pdMap.put(pd, pc); + return pc.implies(p); + } + + /** + * Examines this Policy and returns the permissions granted to the specified ProtectionDomain. + * This includes the permissions currently associated with the domain as well as the policy permissions granted to the + * domain's CodeSource, ClassLoader, and Principals. + * + *

+ * Note that this Policy implementation has special handling for PrivateCredentialPermissions. When this + * method encounters a PrivateCredentialPermission which specifies "self" as the Principal + * class and name, it does not add that Permission to the returned PermissionCollection. + * Instead, it builds a new PrivateCredentialPermission for each Principal associated with the + * provided Subject. Each new PrivateCredentialPermission contains the same Credential class + * as specified in the originally granted permission, as well as the Class and name for the respective + * Principal. + * + *

+ * + * @param domain the Permissions granted to this ProtectionDomain are returned. + * + * @return the Permissions granted to the provided ProtectionDomain. + */ + @Override + public PermissionCollection getPermissions(ProtectionDomain domain) { + Permissions perms = new Permissions(); + + if (domain == null) + return perms; + + // first get policy perms + getPermissions(perms, domain); + + // add static perms + // - adding static perms after policy perms is necessary + // to avoid a regression for 4301064 + PermissionCollection pc = domain.getPermissions(); + if (pc != null) { + synchronized (pc) { + Enumeration e = pc.elements(); + while (e.hasMoreElements()) { + perms.add(e.nextElement()); + } + } + } + + return perms; + } + + /** + * Examines this Policy and creates a PermissionCollection object with the set of permissions for the specified + * CodeSource. + * + * @param CodeSource the codesource associated with the caller. This encapsulates the original location of the code + * (where the code came from) and the public key(s) of its signer. + * + * @return the set of permissions according to the policy. + */ + @Override + public PermissionCollection getPermissions(CodeSource codesource) { + return getPermissions(new Permissions(), codesource); + } + + /** + * Examines the global policy and returns the provided Permissions object with additional permissions granted to the + * specified ProtectionDomain. + * + * @param perm the Permissions to populate + * @param pd the ProtectionDomain associated with the caller. + * + * @return the set of Permissions according to the policy. + */ + private PermissionCollection getPermissions(Permissions perms, ProtectionDomain pd) { + if (debug != null) { + debug.println("getPermissions:\n\t" + printPD(pd)); + } + + final CodeSource cs = pd.getCodeSource(); + if (cs == null) + return perms; + + CodeSource canonCodeSource = AccessController.doPrivileged(new java.security.PrivilegedAction() { + public CodeSource run() { + return canonicalizeCodebase(cs, true); + } + }); + return getPermissions(perms, canonCodeSource, pd.getPrincipals()); + } + + /** + * Examines the global policy and returns the provided Permissions object with additional permissions granted to the + * specified CodeSource. + * + * @param permissions the permissions to populate + * @param codesource the codesource associated with the caller. This encapsulates the original location of the code + * (where the code came from) and the public key(s) of its signer. + * + * @return the set of permissions according to the policy. + */ + private PermissionCollection getPermissions(Permissions perms, final CodeSource cs) { + + CodeSource canonCodeSource = AccessController.doPrivileged(new java.security.PrivilegedAction() { + public CodeSource run() { + return canonicalizeCodebase(cs, true); + } + }); + + return getPermissions(perms, canonCodeSource, null); + } + + private Permissions getPermissions(Permissions perms, final CodeSource cs, Principal[] principals) { + PolicyInfo pi = policyInfo.get(); + + for (PolicyEntry entry : pi.policyEntries) { + addPermissions(perms, cs, principals, entry); + } + + // Go through policyEntries gotten from identity db; sync required + // because checkForTrustedIdentity (below) might update list + synchronized (pi.identityPolicyEntries) { + for (PolicyEntry entry : pi.identityPolicyEntries) { + addPermissions(perms, cs, principals, entry); + } + } + + // now see if any of the keys are trusted ids. + if (!ignoreIdentityScope) { + Certificate certs[] = cs.getCertificates(); + if (certs != null) { + for (int k = 0; k < certs.length; k++) { + Object idMap = pi.aliasMapping.get(certs[k]); + if (idMap == null && checkForTrustedIdentity(certs[k], pi)) { + // checkForTrustedIdentity added it + // to the policy for us. next time + // around we'll find it. This time + // around we need to add it. + perms.add(SecurityConstants.ALL_PERMISSION); + } + } + } + } + return perms; + } + + private void addPermissions(Permissions perms, final CodeSource cs, Principal[] principals, final PolicyEntry entry) { + + if (debug != null) { + debug.println( + "evaluate codesources:\n" + "\tPolicy CodeSource: " + entry.getCodeSource() + "\n" + "\tActive CodeSource: " + cs); + } + + // check to see if the CodeSource implies + Boolean imp = AccessController.doPrivileged(new PrivilegedAction() { + public Boolean run() { + return new Boolean(entry.getCodeSource().implies(cs)); + } + }); + if (!imp.booleanValue()) { + if (debug != null) { + debug.println("evaluation (codesource) failed"); + } + + // CodeSource does not imply - return and try next policy entry + return; + } + + // check to see if the Principals imply + + List entryPs = entry.getPrincipals(); + if (debug != null) { + ArrayList accPs = new ArrayList(); + if (principals != null) { + for (int i = 0; i < principals.length; i++) { + accPs.add(new PolicyParser.PrincipalEntry(principals[i].getClass().getName(), principals[i].getName())); + } + } + debug.println("evaluate principals:\n" + "\tPolicy Principals: " + entryPs + "\n" + "\tActive Principals: " + accPs); + } + + if (entryPs == null || entryPs.size() == 0) { + + // policy entry has no principals - + // add perms regardless of principals in current ACC + + addPerms(perms, principals, entry); + if (debug != null) { + debug.println("evaluation (codesource/principals) passed"); + } + return; + + } else if (principals == null || principals.length == 0) { + + // current thread has no principals but this policy entry + // has principals - perms are not added + + if (debug != null) { + debug.println("evaluation (principals) failed"); + } + return; + } + + // current thread has principals and this policy entry + // has principals. see if policy entry principals match + // principals in current ACC + + for (int i = 0; i < entryPs.size(); i++) { + PolicyParser.PrincipalEntry pppe = entryPs.get(i); + + // see if principal entry is a PrincipalComparator + + try { + Class pClass = Class.forName(pppe.principalClass, true, Thread.currentThread().getContextClassLoader()); + + if (!PrincipalComparator.class.isAssignableFrom(pClass)) { + + // common case - dealing with regular Principal class. + // see if policy entry principal is in current ACC + + if (!checkEntryPs(principals, pppe)) { + if (debug != null) { + debug.println("evaluation (principals) failed"); + } + + // policy entry principal not in current ACC - + // immediately return and go to next policy entry + return; + } + + } else { + + // dealing with a PrincipalComparator + + Constructor c = pClass.getConstructor(PARAMS1); + PrincipalComparator pc = (PrincipalComparator) c.newInstance(new Object[] { pppe.principalName }); + + if (debug != null) { + debug.println("found PrincipalComparator " + pc.getClass().getName()); + } + + // check if the PrincipalComparator + // implies the current thread's principals + + Set pSet = new HashSet(principals.length); + for (int j = 0; j < principals.length; j++) { + pSet.add(principals[j]); + } + Subject subject = new Subject(true, pSet, Collections.EMPTY_SET, Collections.EMPTY_SET); + + if (!pc.implies(subject)) { + if (debug != null) { + debug.println("evaluation (principal comparator) failed"); + } + + // policy principal does not imply the current Subject - + // immediately return and go to next policy entry + return; + } + } + } catch (Exception e) { + // fall back to regular principal comparison. + // see if policy entry principal is in current ACC + + if (debug != null) { + e.printStackTrace(); + } + + if (!checkEntryPs(principals, pppe)) { + if (debug != null) { + debug.println("evaluation (principals) failed"); + } + + // policy entry principal not in current ACC - + // immediately return and go to next policy entry + return; + } + } + + // either the principal information matched, + // or the PrincipalComparator.implies succeeded. + // continue loop and test the next policy principal + } + + // all policy entry principals were found in the current ACC - + // grant the policy permissions + + if (debug != null) { + debug.println("evaluation (codesource/principals) passed"); + } + addPerms(perms, principals, entry); + } + + private void addPerms(Permissions perms, Principal[] accPs, PolicyEntry entry) { + for (int i = 0; i < entry.permissions.size(); i++) { + Permission p = entry.permissions.get(i); + if (debug != null) { + debug.println(" granting " + p); + } + + if (p instanceof SelfPermission) { + // handle "SELF" permissions + expandSelf((SelfPermission) p, entry.getPrincipals(), accPs, perms); + } else { + perms.add(p); + } + } + } + + /** + * This method returns, true, if the principal in the policy entry, pppe, is part of the current thread's principal + * array, pList. This method also returns, true, if the policy entry's principal is appropriately wildcarded. + * + * Note that the provided pppe argument may have wildcards (*) for both the Principal class and + * name. + * + * @param pList an array of principals from the current thread's AccessControlContext. + * + * @param pppe a Principal specified in a policy grant entry. + * + * @return true if the current thread's pList "contains" the principal in the policy entry, pppe. This method also + * returns true if the policy entry's principal appropriately wildcarded. + */ + private boolean checkEntryPs(Principal[] pList, PolicyParser.PrincipalEntry pppe) { + + for (int i = 0; i < pList.length; i++) { + + if (pppe.principalClass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) + || pppe.principalClass.equals(pList[i].getClass().getName())) { + + if (pppe.principalName.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME) || pppe.principalName.equals(pList[i].getName())) { + + return true; + } + } + } + return false; + } + + /** + *

+ * + * @param sp the SelfPermission that needs to be expanded + *

+ * + * @param entryPs list of principals for the Policy entry. + * + * @param pdp Principal array from the current ProtectionDomain. + * + * @param perms the PermissionCollection where the individual Permissions will be added after expansion. + */ + + private void expandSelf(SelfPermission sp, List entryPs, Principal[] pdp, Permissions perms) { + + if (entryPs == null || entryPs.size() == 0) { + // No principals in the grant to substitute + if (debug != null) { + debug.println("Ignoring permission " + sp.getSelfType() + " with target name (" + sp.getSelfName() + "). " + + "No Principal(s) specified " + "in the grant clause. " + "SELF-based target names are " + + "only valid in the context " + "of a Principal-based grant entry."); + } + return; + } + int startIndex = 0; + int v; + StringBuilder sb = new StringBuilder(); + while ((v = sp.getSelfName().indexOf(SELF, startIndex)) != -1) { + + // add non-SELF string + sb.append(sp.getSelfName().substring(startIndex, v)); + + // expand SELF + ListIterator pli = entryPs.listIterator(); + while (pli.hasNext()) { + PolicyParser.PrincipalEntry pppe = pli.next(); + String[][] principalInfo = getPrincipalInfo(pppe, pdp); + for (int i = 0; i < principalInfo.length; i++) { + if (i != 0) { + sb.append(", "); + } + sb.append(principalInfo[i][0] + " " + "\"" + principalInfo[i][1] + "\""); + } + if (pli.hasNext()) { + sb.append(", "); + } + } + startIndex = v + SELF.length(); + } + // add remaining string (might be the entire string) + sb.append(sp.getSelfName().substring(startIndex)); + + if (debug != null) { + debug.println(" expanded:\n\t" + sp.getSelfName() + "\n into:\n\t" + sb.toString()); + } + try { + // first try to instantiate the permission + perms.add(getInstance(sp.getSelfType(), sb.toString(), sp.getSelfActions())); + } catch (ClassNotFoundException cnfe) { + // ok, the permission is not in the bootclasspath. + // before we add an UnresolvedPermission, check to see + // whether this perm already belongs to the collection. + // if so, use that perm's ClassLoader to create a new + // one. + Class pc = null; + synchronized (perms) { + Enumeration e = perms.elements(); + while (e.hasMoreElements()) { + Permission pElement = e.nextElement(); + if (pElement.getClass().getName().equals(sp.getSelfType())) { + pc = pElement.getClass(); + break; + } + } + } + if (pc == null) { + // create an UnresolvedPermission + perms.add(new UnresolvedPermission(sp.getSelfType(), sb.toString(), sp.getSelfActions(), sp.getCerts())); + } else { + try { + // we found an instantiated permission. + // use its class loader to instantiate a new permission. + Constructor c; + // name parameter can not be null + if (sp.getSelfActions() == null) { + try { + c = pc.getConstructor(PARAMS1); + perms.add((Permission) c.newInstance(new Object[] { sb.toString() })); + } catch (NoSuchMethodException ne) { + c = pc.getConstructor(PARAMS2); + perms.add((Permission) c.newInstance(new Object[] { sb.toString(), sp.getSelfActions() })); + } + } else { + c = pc.getConstructor(PARAMS2); + perms.add((Permission) c.newInstance(new Object[] { sb.toString(), sp.getSelfActions() })); + } + } catch (Exception nme) { + if (debug != null) { + debug.println("self entry expansion " + " instantiation failed: " + nme.toString()); + } + } + } + } catch (Exception e) { + if (debug != null) { + debug.println(e.toString()); + } + } + } + + /** + * return the principal class/name pair in the 2D array. array[x][y]: x corresponds to the array length. if (y == 0), + * it's the principal class. if (y == 1), it's the principal name. + */ + private String[][] getPrincipalInfo(PolicyParser.PrincipalEntry pe, Principal[] pdp) { + + // there are 3 possibilities: + // 1) the entry's Principal class and name are not wildcarded + // 2) the entry's Principal name is wildcarded only + // 3) the entry's Principal class and name are wildcarded + + if (!pe.principalClass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) + && !pe.principalName.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME)) { + + // build an info array for the principal + // from the Policy entry + String[][] info = new String[1][2]; + info[0][0] = pe.principalClass; + info[0][1] = pe.principalName; + return info; + + } else if (!pe.principalClass.equals(PolicyParser.PrincipalEntry.WILDCARD_CLASS) + && pe.principalName.equals(PolicyParser.PrincipalEntry.WILDCARD_NAME)) { + + // build an info array for every principal + // in the current domain which has a principal class + // that is equal to policy entry principal class name + List plist = new ArrayList(); + for (int i = 0; i < pdp.length; i++) { + if (pe.principalClass.equals(pdp[i].getClass().getName())) + plist.add(pdp[i]); + } + String[][] info = new String[plist.size()][2]; + int i = 0; + java.util.Iterator pIterator = plist.iterator(); + while (pIterator.hasNext()) { + Principal p = pIterator.next(); + info[i][0] = p.getClass().getName(); + info[i][1] = p.getName(); + i++; + } + return info; + + } else { + + // build an info array for every + // one of the current Domain's principals + + String[][] info = new String[pdp.length][2]; + + for (int i = 0; i < pdp.length; i++) { + info[i][0] = pdp[i].getClass().getName(); + info[i][1] = pdp[i].getName(); + } + return info; + } + } + + /* + * Returns the signer certificates from the list of certificates associated with the given code source. + * + * The signer certificates are those certificates that were used to verifysigned code originating from the codesource + * location. + * + * This method assumes that in the given code source, each signer certificate is followed by its supporting certificate + * chain (which may be empty), and that the signer certificate and its supporting certificate chain are ordered + * bottom-to-top (i.e., with the signer certificate first and the (root) certificate authority last). + */ + protected Certificate[] getSignerCertificates(CodeSource cs) { + Certificate[] certs = null; + if ((certs = cs.getCertificates()) == null) + return null; + for (int i = 0; i < certs.length; i++) { + if (!(certs[i] instanceof X509Certificate)) + return cs.getCertificates(); + } + + // Do we have to do anything? + int i = 0; + int count = 0; + while (i < certs.length) { + count++; + while (((i + 1) < certs.length) + && ((X509Certificate) certs[i]).getIssuerDN().equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { + i++; + } + i++; + } + if (count == certs.length) + // Done + return certs; + + ArrayList userCertList = new ArrayList(); + i = 0; + while (i < certs.length) { + userCertList.add(certs[i]); + while (((i + 1) < certs.length) + && ((X509Certificate) certs[i]).getIssuerDN().equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { + i++; + } + i++; + } + Certificate[] userCerts = new Certificate[userCertList.size()]; + userCertList.toArray(userCerts); + return userCerts; + } + + private CodeSource canonicalizeCodebase(CodeSource cs, boolean extractSignerCerts) { + + String path = null; + + CodeSource canonCs = cs; + URL u = cs.getLocation(); + if (u != null && u.getProtocol().equals("file")) { + boolean isLocalFile = false; + String host = u.getHost(); + isLocalFile = (host == null || host.equals("") || host.equals("~") || host.equalsIgnoreCase("localhost")); + + if (isLocalFile) { + path = u.getFile().replace('/', File.separatorChar); + path = ParseUtil.decode(path); + } + } + + if (path != null) { + try { + URL csUrl = null; + path = canonPath(path); + csUrl = ParseUtil.fileToEncodedURL(new File(path)); + + if (extractSignerCerts) { + canonCs = new CodeSource(csUrl, getSignerCertificates(cs)); + } else { + canonCs = new CodeSource(csUrl, cs.getCertificates()); + } + } catch (IOException ioe) { + // leave codesource as it is, unless we have to extract its + // signer certificates + if (extractSignerCerts) { + canonCs = new CodeSource(cs.getLocation(), getSignerCertificates(cs)); + } + } + } else { + if (extractSignerCerts) { + canonCs = new CodeSource(cs.getLocation(), getSignerCertificates(cs)); + } + } + return canonCs; + } + + // public for java.io.FilePermission + public static String canonPath(String path) throws IOException { + if (path.endsWith("*")) { + path = path.substring(0, path.length() - 1) + "-"; + path = new File(path).getCanonicalPath(); + return path.substring(0, path.length() - 1) + "*"; + } else { + return new File(path).getCanonicalPath(); + } + } + + private String printPD(ProtectionDomain pd) { + Principal[] principals = pd.getPrincipals(); + String pals = ""; + if (principals != null && principals.length > 0) { + StringBuilder palBuf = new StringBuilder("(principals "); + for (int i = 0; i < principals.length; i++) { + palBuf.append(principals[i].getClass().getName() + " \"" + principals[i].getName() + "\""); + if (i < principals.length - 1) + palBuf.append(", "); + else + palBuf.append(")"); + } + pals = palBuf.toString(); + } + return "PD CodeSource: " + pd.getCodeSource() + "\n\t" + "PD ClassLoader: " + pd.getClassLoader() + "\n\t" + "PD Principals: " + + pals; + } + + /** + * return true if no replacement was performed, or if replacement succeeded. + */ + private boolean replacePrincipals(List principals, KeyStore keystore) { + + if (principals == null || principals.size() == 0 || keystore == null) + return true; + + ListIterator i = principals.listIterator(); + while (i.hasNext()) { + PolicyParser.PrincipalEntry pppe = i.next(); + if (pppe.principalClass.equals(PolicyParser.REPLACE_NAME)) { + + // perform replacement + // (only X509 replacement is possible now) + String name; + if ((name = getDN(pppe.principalName, keystore)) == null) { + return false; + } + + if (debug != null) { + debug.println(" Replacing \"" + pppe.principalName + "\" with " + X500PRINCIPAL + "/\"" + name + "\""); + } + + pppe.principalClass = X500PRINCIPAL; + pppe.principalName = name; + } + } + // return true if no replacement was performed, + // or if replacement succeeded + return true; + } + + private void expandPermissionName(PolicyParser.PermissionEntry pe, KeyStore keystore) throws Exception { + // short cut the common case + if (pe.name == null || pe.name.indexOf("${{", 0) == -1) { + return; + } + + int startIndex = 0; + int b, e; + StringBuilder sb = new StringBuilder(); + while ((b = pe.name.indexOf("${{", startIndex)) != -1) { + e = pe.name.indexOf("}}", b); + if (e < 1) { + break; + } + sb.append(pe.name.substring(startIndex, b)); + + // get the value in ${{...}} + String value = pe.name.substring(b + 3, e); + + // parse up to the first ':' + int colonIndex; + String prefix = value; + String suffix; + if ((colonIndex = value.indexOf(":")) != -1) { + prefix = value.substring(0, colonIndex); + } + + // handle different prefix possibilities + if (prefix.equalsIgnoreCase("self")) { + // do nothing - handled later + sb.append(pe.name.substring(b, e + 2)); + startIndex = e + 2; + continue; + } else if (prefix.equalsIgnoreCase("alias")) { + // get the suffix and perform keystore alias replacement + if (colonIndex == -1) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString("alias name not provided (pe.name)")); + Object[] source = { pe.name }; + throw new Exception(form.format(source)); + } + suffix = value.substring(colonIndex + 1); + if ((suffix = getDN(suffix, keystore)) == null) { + MessageFormat form = new MessageFormat(ResourcesMgr.getString("unable to perform substitution on alias, suffix")); + Object[] source = { value.substring(colonIndex + 1) }; + throw new Exception(form.format(source)); + } + + sb.append(X500PRINCIPAL + " \"" + suffix + "\""); + startIndex = e + 2; + } else { + MessageFormat form = new MessageFormat(ResourcesMgr.getString("substitution value, prefix, unsupported")); + Object[] source = { prefix }; + throw new Exception(form.format(source)); + } + } + + // copy the rest of the value + sb.append(pe.name.substring(startIndex)); + + // replace the name with expanded value + if (debug != null) { + debug.println(" Permission name expanded from:\n\t" + pe.name + "\nto\n\t" + sb.toString()); + } + pe.name = sb.toString(); + } + + private String getDN(String alias, KeyStore keystore) { + Certificate cert = null; + try { + cert = keystore.getCertificate(alias); + } catch (Exception e) { + if (debug != null) { + debug.println(" Error retrieving certificate for '" + alias + "': " + e.toString()); + } + return null; + } + + if (cert == null || !(cert instanceof X509Certificate)) { + if (debug != null) { + debug.println(" -- No certificate for '" + alias + "' - ignoring entry"); + } + return null; + } else { + X509Certificate x509Cert = (X509Certificate) cert; + + // 4702543: X500 names with an EmailAddress + // were encoded incorrectly. create new + // X500Principal name with correct encoding + + X500Principal p = new X500Principal(x509Cert.getSubjectX500Principal().toString()); + return p.getName(); + } + } + + /** + * Checks public key. If it is marked as trusted in the identity database, add it to the policy with the AllPermission. + */ + private boolean checkForTrustedIdentity(final Certificate cert, PolicyInfo myInfo) { + if (cert == null) + return false; + + // see if we are ignoring the identity scope or not + if (ignoreIdentityScope) + return false; + + // try to initialize scope + synchronized (PolicyFile.class) { + if (scope == null) { + IdentityScope is = IdentityScope.getSystemScope(); + + if (is instanceof com.sun.ts.lib.util.sec.security.provider.IdentityDatabase) { + scope = is; + } else { + // leave scope null + } + } + } + + if (scope == null) { + ignoreIdentityScope = true; + return false; + } + + // need privileged block for getIdentity in case we are trying + // to get a signer + final Identity id = AccessController.doPrivileged(new java.security.PrivilegedAction() { + public Identity run() { + return scope.getIdentity(cert.getPublicKey()); + } + }); + + if (isTrusted(id)) { + if (debug != null) { + debug.println("Adding policy entry for trusted Identity: "); + // needed for identity toString! + AccessController.doPrivileged(new java.security.PrivilegedAction() { + public Void run() { + debug.println(" identity = " + id); + return null; + } + }); + debug.println(""); + } + + // add it to the policy for future reference + Certificate certs[] = new Certificate[] { cert }; + PolicyEntry pe = new PolicyEntry(new CodeSource(null, certs)); + pe.add(SecurityConstants.ALL_PERMISSION); + + myInfo.identityPolicyEntries.add(pe); + + // add it to the mapping as well so + // we don't have to go through this again + myInfo.aliasMapping.put(cert, id.getName()); + + return true; + } + return false; + } + + private static boolean isTrusted(Identity id) { + if (id instanceof SystemIdentity) { + SystemIdentity sysid = (SystemIdentity) id; + if (sysid.isTrusted()) { + return true; + } + } else if (id instanceof SystemSigner) { + SystemSigner sysid = (SystemSigner) id; + if (sysid.isTrusted()) { + return true; + } + } + return false; + } + + /** + * Each entry in the policy configuration file is represented by a PolicyEntry object. + *

+ * + * A PolicyEntry is a (CodeSource,Permission) pair. The CodeSource contains the (URL, PublicKey) that together identify + * where the Java bytecodes come from and who (if anyone) signed them. The URL could refer to localhost. The URL could + * also be null, meaning that this policy entry is given to all comers, as long as they match the signer field. The + * signer could be null, meaning the code is not signed. + *

+ * + * The Permission contains the (Type, Name, Action) triplet. + *

+ * + * For now, the Policy object retrieves the public key from the X.509 certificate on disk that corresponds to the + * signedBy alias specified in the Policy config file. For reasons of efficiency, the Policy object keeps a hashtable of + * certs already read in. This could be replaced by a secure internal key store. + * + *

+ * For example, the entry + * + *

+     *          permission java.io.File "/tmp", "read,write",
+     *          signedBy "Duke";
+     * 
+ * + * is represented internally + * + *
+     *
+     * FilePermission f = new FilePermission("/tmp", "read,write");
+     * PublicKey p = publickeys.get("Duke");
+     * URL u = InetAddress.getLocalHost();
+     * CodeBase c = new CodeBase(p, u);
+     * pe = new PolicyEntry(f, c);
+     * 
+ * + * @author Marianne Mueller + * @author Roland Schemers + * @see java.security.CodeSource + * @see java.security.Policy + * @see java.security.Permissions + * @see java.security.ProtectionDomain + */ + private static class PolicyEntry { + + private final CodeSource codesource; + + final List permissions; + + private final List principals; + + /** + * Given a Permission and a CodeSource, create a policy entry. + * + * XXX Decide if/how to add validity fields and "purpose" fields to XXX policy entries + * + * @param cs the CodeSource, which encapsulates the URL and the public key attributes from the policy config file. + * Validity checks are performed on the public key before PolicyEntry is called. + * + */ + PolicyEntry(CodeSource cs, List principals) { + this.codesource = cs; + this.permissions = new ArrayList(); + this.principals = principals; // can be null + } + + PolicyEntry(CodeSource cs) { + this(cs, null); + } + + List getPrincipals() { + return principals; // can be null + } + + /** + * add a Permission object to this entry. No need to sync add op because perms are added to entry only while entry is + * being initialized + */ + void add(Permission p) { + permissions.add(p); + } + + /** + * Return the CodeSource for this policy entry + */ + CodeSource getCodeSource() { + return codesource; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append(ResourcesMgr.getString("(")); + sb.append(getCodeSource()); + sb.append("\n"); + for (int j = 0; j < permissions.size(); j++) { + Permission p = permissions.get(j); + sb.append(ResourcesMgr.getString(" ")); + sb.append(ResourcesMgr.getString(" ")); + sb.append(p); + sb.append(ResourcesMgr.getString("\n")); + } + sb.append(ResourcesMgr.getString(")")); + sb.append(ResourcesMgr.getString("\n")); + return sb.toString(); + } + } + + private static class SelfPermission extends Permission { + + private static final long serialVersionUID = -8315562579967246806L; + + /** + * The class name of the Permission class that will be created when this self permission is expanded . + * + * @serial + */ + private String type; + + /** + * The permission name. + * + * @serial + */ + private String name; + + /** + * The actions of the permission. + * + * @serial + */ + private String actions; + + /** + * The certs of the permission. + * + * @serial + */ + private Certificate certs[]; + + /** + * Creates a new SelfPermission containing the permission information needed later to expand the self + * + * @param type the class name of the Permission class that will be created when this permission is expanded and if + * necessary resolved. + * @param name the name of the permission. + * @param actions the actions of the permission. + * @param certs the certificates the permission's class was signed with. This is a list of certificate chains, where + * each chain is composed of a signer certificate and optionally its supporting certificate chain. Each chain is ordered + * bottom-to-top (i.e., with the signer certificate first and the (root) certificate authority last). + */ + public SelfPermission(String type, String name, String actions, Certificate certs[]) { + super(type); + if (type == null) { + throw new NullPointerException(ResourcesMgr.getString("type can't be null")); + } + this.type = type; + this.name = name; + this.actions = actions; + if (certs != null) { + // Extract the signer certs from the list of certificates. + for (int i = 0; i < certs.length; i++) { + if (!(certs[i] instanceof X509Certificate)) { + // there is no concept of signer certs, so we store the + // entire cert array + this.certs = certs.clone(); + break; + } + } + + if (this.certs == null) { + // Go through the list of certs and see if all the certs are + // signer certs. + int i = 0; + int count = 0; + while (i < certs.length) { + count++; + while (((i + 1) < certs.length) + && ((X509Certificate) certs[i]).getIssuerDN().equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { + i++; + } + i++; + } + if (count == certs.length) { + // All the certs are signer certs, so we store the + // entire array + this.certs = certs.clone(); + } + + if (this.certs == null) { + // extract the signer certs + ArrayList signerCerts = new ArrayList(); + i = 0; + while (i < certs.length) { + signerCerts.add(certs[i]); + while (((i + 1) < certs.length) + && ((X509Certificate) certs[i]).getIssuerDN().equals(((X509Certificate) certs[i + 1]).getSubjectDN())) { + i++; + } + i++; + } + this.certs = new Certificate[signerCerts.size()]; + signerCerts.toArray(this.certs); + } + } + } + } + + /** + * This method always returns false for SelfPermission permissions. That is, an SelfPermission never considered to imply + * another permission. + * + * @param p the permission to check against. + * + * @return false. + */ + @Override + public boolean implies(Permission p) { + return false; + } + + /** + * Checks two SelfPermission objects for equality. + * + * Checks that obj is an SelfPermission, and has the same type (class) name, permission name, actions, and + * certificates as this object. + * + * @param obj the object we are testing for equality with this object. + * + * @return true if obj is an SelfPermission, and has the same type (class) name, permission name, actions, and + * certificates as this object. + */ + @Override + public boolean equals(Object obj) { + if (obj == this) + return true; + + if (!(obj instanceof SelfPermission)) + return false; + SelfPermission that = (SelfPermission) obj; + + if (!(this.type.equals(that.type) && this.name.equals(that.name) && this.actions.equals(that.actions))) + return false; + + if (this.certs.length != that.certs.length) + return false; + + int i, j; + boolean match; + + for (i = 0; i < this.certs.length; i++) { + match = false; + for (j = 0; j < that.certs.length; j++) { + if (this.certs[i].equals(that.certs[j])) { + match = true; + break; + } + } + if (!match) + return false; + } + + for (i = 0; i < that.certs.length; i++) { + match = false; + for (j = 0; j < this.certs.length; j++) { + if (that.certs[i].equals(this.certs[j])) { + match = true; + break; + } + } + if (!match) + return false; + } + return true; + } + + /** + * Returns the hash code value for this object. + * + * @return a hash code value for this object. + */ + @Override + public int hashCode() { + int hash = type.hashCode(); + if (name != null) + hash ^= name.hashCode(); + if (actions != null) + hash ^= actions.hashCode(); + return hash; + } + + /** + * Returns the canonical string representation of the actions, which currently is the empty string "", since there are + * no actions for an SelfPermission. That is, the actions for the permission that will be created when this + * SelfPermission is resolved may be non-null, but an SelfPermission itself is never considered to have any actions. + * + * @return the empty string "". + */ + @Override + public String getActions() { + return ""; + } + + public String getSelfType() { + return type; + } + + public String getSelfName() { + return name; + } + + public String getSelfActions() { + return actions; + } + + public Certificate[] getCerts() { + return certs; + } + + /** + * Returns a string describing this SelfPermission. The convention is to specify the class name, the permission name, + * and the actions, in the following format: '(unresolved "ClassName" "name" "actions")'. + * + * @return information about this SelfPermission. + */ + @Override + public String toString() { + return "(SelfPermission " + type + " " + name + " " + actions + ")"; + } + } + + /** + * holds policy information that we need to synch on + */ + private static class PolicyInfo { + private static final boolean verbose = false; + + // Stores grant entries in the policy + final List policyEntries; + + // Stores grant entries gotten from identity database + // Use separate lists to avoid sync on policyEntries + final List identityPolicyEntries; + + // Maps aliases to certs + final Map aliasMapping; + + // Maps ProtectionDomain to PermissionCollection + private final ProtectionDomainCache[] pdMapping; + + private java.util.Random random; + + PolicyInfo(int numCaches) { + policyEntries = new ArrayList(); + identityPolicyEntries = Collections.synchronizedList(new ArrayList(2)); + aliasMapping = Collections.synchronizedMap(new HashMap(11)); + + pdMapping = new ProtectionDomainCache[numCaches]; + JavaSecurityProtectionDomainAccess jspda = SharedSecrets.getJavaSecurityProtectionDomainAccess(); + for (int i = 0; i < numCaches; i++) { + pdMapping[i] = jspda.getProtectionDomainCache(); + } + if (numCaches > 1) { + random = new java.util.Random(); + } + } + + ProtectionDomainCache getPdMapping() { + if (pdMapping.length == 1) { + return pdMapping[0]; + } else { + int i = java.lang.Math.abs(random.nextInt() % pdMapping.length); + return pdMapping[i]; + } + } + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java new file mode 100644 index 0000000000..5562689f0f --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/PolicyParser.java @@ -0,0 +1,1102 @@ +/* + * Copyright (c) 1997, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.provider; + +import java.io.*; +import java.lang.RuntimePermission; +import java.net.SocketPermission; +import java.net.URL; +import java.util.Enumeration; +import java.util.Hashtable; +import java.util.LinkedList; +import java.util.ListIterator; +import java.util.Vector; +import java.util.StringTokenizer; +import java.text.MessageFormat; +import javax.security.auth.x500.X500Principal; + +import java.security.GeneralSecurityException; +import com.sun.ts.lib.util.sec.security.util.Debug; +import com.sun.ts.lib.util.sec.security.util.PropertyExpander; +import com.sun.ts.lib.util.sec.security.util.ResourcesMgr; + +/** + * The policy for a Java runtime (specifying which permissions are available for code from various principals) is + * represented as a separate persistent configuration. The configuration may be stored as a flat ASCII file, as a + * serialized binary file of the Policy class, or as a database. + *

+ * + *

+ * The Java runtime creates one global Policy object, which is used to represent the static policy configuration file. + * It is consulted by a ProtectionDomain when the protection domain initializes its set of permissions. + *

+ * + *

+ * The Policy init method parses the policy configuration file, and then populates the Policy object. The + * Policy object is agnostic in that it is not involved in making policy decisions. It is merely the Java runtime + * representation of the persistent policy configuration file. + *

+ * + *

+ * When a protection domain needs to initialize its set of permissions, it executes code such as the following to ask + * the global Policy object to populate a Permissions object with the appropriate permissions: + * + *

+ *  policy = Policy.getPolicy();
+ *  Permissions perms = policy.getPermissions(protectiondomain)
+ * 
+ * + *

+ * The protection domain contains CodeSource object, which encapsulates its codebase (URL) and public key attributes. It + * also contains the principals associated with the domain. The Policy object evaluates the global policy in light of + * who the principal is and what the code source is and returns an appropriate Permissions object. + * + * @author Roland Schemers + * @author Ram Marti + * + * @since 1.2 + */ + +public class PolicyParser { + + // needs to be public for PolicyTool + public static final String REPLACE_NAME = "PolicyParser.REPLACE_NAME"; + + private Vector grantEntries; + + // Convenience variables for parsing + private static final Debug debug = Debug.getInstance("parser", "\t[Policy Parser]"); + + private StreamTokenizer st; + + private int lookahead; + + private boolean expandProp = false; + + private String keyStoreUrlString = null; // unexpanded + + private String keyStoreType = null; + + private String keyStoreProvider = null; + + private String storePassURL = null; + + private String expand(String value) throws PropertyExpander.ExpandException { + return expand(value, false); + } + + private String expand(String value, boolean encodeURL) throws PropertyExpander.ExpandException { + if (!expandProp) { + return value; + } else { + return PropertyExpander.expand(value, encodeURL); + } + } + + /** + * Creates a PolicyParser object. + */ + + public PolicyParser() { + grantEntries = new Vector(); + } + + public PolicyParser(boolean expandProp) { + this(); + this.expandProp = expandProp; + } + + /** + * Reads a policy configuration into the Policy object using a Reader object. + *

+ * + * @param policy the policy Reader object. + * + * @exception ParsingException if the policy configuration contains a syntax error. + * + * @exception IOException if an error occurs while reading the policy configuration. + */ + + public void read(Reader policy) throws ParsingException, IOException { + if (!(policy instanceof BufferedReader)) { + policy = new BufferedReader(policy); + } + + /** + * Configure the stream tokenizer: Recognize strings between "..." Don't convert words to lowercase Recognize both + * C-style and C++-style comments Treat end-of-line as white space, not as a token + */ + st = new StreamTokenizer(policy); + + st.resetSyntax(); + st.wordChars('a', 'z'); + st.wordChars('A', 'Z'); + st.wordChars('.', '.'); + st.wordChars('0', '9'); + st.wordChars('_', '_'); + st.wordChars('$', '$'); + st.wordChars(128 + 32, 255); + st.whitespaceChars(0, ' '); + st.commentChar('/'); + st.quoteChar('\''); + st.quoteChar('"'); + st.lowerCaseMode(false); + st.ordinaryChar('/'); + st.slashSlashComments(true); + st.slashStarComments(true); + + /** + * The main parsing loop. The loop is executed once for each entry in the config file. The entries are delimited by + * semicolons. Once we've read in the information for an entry, go ahead and try to add it to the policy vector. + * + */ + + lookahead = st.nextToken(); + while (lookahead != StreamTokenizer.TT_EOF) { + if (peek("grant")) { + GrantEntry ge = parseGrantEntry(); + // could be null if we couldn't expand a property + if (ge != null) + add(ge); + } else if (peek("keystore") && keyStoreUrlString == null) { + // only one keystore entry per policy file, others will be + // ignored + parseKeyStoreEntry(); + } else if (peek("keystorePasswordURL") && storePassURL == null) { + // only one keystore passwordURL per policy file, others will be + // ignored + parseStorePassURL(); + } else { + // error? + } + match(";"); + } + + if (keyStoreUrlString == null && storePassURL != null) { + throw new ParsingException( + ResourcesMgr.getString("keystorePasswordURL can not be specified without also " + "specifying keystore")); + } + } + + public void add(GrantEntry ge) { + grantEntries.addElement(ge); + } + + public void replace(GrantEntry origGe, GrantEntry newGe) { + grantEntries.setElementAt(newGe, grantEntries.indexOf(origGe)); + } + + public boolean remove(GrantEntry ge) { + return grantEntries.removeElement(ge); + } + + /** + * Returns the (possibly expanded) keystore location, or null if the expansion fails. + */ + public String getKeyStoreUrl() { + try { + if (keyStoreUrlString != null && keyStoreUrlString.length() != 0) { + return expand(keyStoreUrlString, true).replace(File.separatorChar, '/'); + } + } catch (PropertyExpander.ExpandException peee) { + if (debug != null) { + debug.println(peee.toString()); + } + return null; + } + return null; + } + + public void setKeyStoreUrl(String url) { + keyStoreUrlString = url; + } + + public String getKeyStoreType() { + return keyStoreType; + } + + public void setKeyStoreType(String type) { + keyStoreType = type; + } + + public String getKeyStoreProvider() { + return keyStoreProvider; + } + + public void setKeyStoreProvider(String provider) { + keyStoreProvider = provider; + } + + public String getStorePassURL() { + try { + if (storePassURL != null && storePassURL.length() != 0) { + return expand(storePassURL, true).replace(File.separatorChar, '/'); + } + } catch (PropertyExpander.ExpandException peee) { + if (debug != null) { + debug.println(peee.toString()); + } + return null; + } + return null; + } + + public void setStorePassURL(String storePassURL) { + this.storePassURL = storePassURL; + } + + /** + * Enumerate all the entries in the global policy object. This method is used by policy admin tools. The tools should + * use the Enumeration methods on the returned object to fetch the elements sequentially. + */ + public Enumeration grantElements() { + return grantEntries.elements(); + } + + /** + * write out the policy + */ + + public void write(Writer policy) { + PrintWriter out = new PrintWriter(new BufferedWriter(policy)); + + Enumeration enum_ = grantElements(); + + out.println("/* AUTOMATICALLY GENERATED ON " + (new java.util.Date()) + "*/"); + out.println("/* DO NOT EDIT */"); + out.println(); + + // write the (unexpanded) keystore entry as the first entry of the + // policy file + if (keyStoreUrlString != null) { + writeKeyStoreEntry(out); + } + if (storePassURL != null) { + writeStorePassURL(out); + } + + // write "grant" entries + while (enum_.hasMoreElements()) { + GrantEntry ge = enum_.nextElement(); + ge.write(out); + out.println(); + } + out.flush(); + } + + /** + * parses a keystore entry + */ + private void parseKeyStoreEntry() throws ParsingException, IOException { + match("keystore"); + keyStoreUrlString = match("quoted string"); + + // parse keystore type + if (!peek(",")) { + return; // default type + } + match(","); + + if (peek("\"")) { + keyStoreType = match("quoted string"); + } else { + throw new ParsingException(st.lineno(), ResourcesMgr.getString("expected keystore type")); + } + + // parse keystore provider + if (!peek(",")) { + return; // provider optional + } + match(","); + + if (peek("\"")) { + keyStoreProvider = match("quoted string"); + } else { + throw new ParsingException(st.lineno(), ResourcesMgr.getString("expected keystore provider")); + } + } + + private void parseStorePassURL() throws ParsingException, IOException { + match("keyStorePasswordURL"); + storePassURL = match("quoted string"); + } + + /** + * writes the (unexpanded) keystore entry + */ + private void writeKeyStoreEntry(PrintWriter out) { + out.print("keystore \""); + out.print(keyStoreUrlString); + out.print('"'); + if (keyStoreType != null && keyStoreType.length() > 0) + out.print(", \"" + keyStoreType + "\""); + if (keyStoreProvider != null && keyStoreProvider.length() > 0) + out.print(", \"" + keyStoreProvider + "\""); + out.println(";"); + out.println(); + } + + private void writeStorePassURL(PrintWriter out) { + out.print("keystorePasswordURL \""); + out.print(storePassURL); + out.print('"'); + out.println(";"); + out.println(); + } + + /** + * parse a Grant entry + */ + private GrantEntry parseGrantEntry() throws ParsingException, IOException { + GrantEntry e = new GrantEntry(); + LinkedList principals = null; + boolean ignoreEntry = false; + + match("grant"); + + while (!peek("{")) { + + if (peekAndMatch("Codebase")) { + if (e.codeBase != null) + throw new ParsingException(st.lineno(), ResourcesMgr.getString("multiple Codebase expressions")); + e.codeBase = match("quoted string"); + peekAndMatch(","); + } else if (peekAndMatch("SignedBy")) { + if (e.signedBy != null) + throw new ParsingException(st.lineno(), ResourcesMgr.getString("multiple SignedBy expressions")); + e.signedBy = match("quoted string"); + + // verify syntax of the aliases + StringTokenizer aliases = new StringTokenizer(e.signedBy, ",", true); + int actr = 0; + int cctr = 0; + while (aliases.hasMoreTokens()) { + String alias = aliases.nextToken().trim(); + if (alias.equals(",")) + cctr++; + else if (alias.length() > 0) + actr++; + } + if (actr <= cctr) + throw new ParsingException(st.lineno(), ResourcesMgr.getString("SignedBy has empty alias")); + + peekAndMatch(","); + } else if (peekAndMatch("Principal")) { + if (principals == null) { + principals = new LinkedList(); + } + + String principalClass; + String principalName; + + if (peek("\"")) { + // both the principalClass and principalName + // will be replaced later + principalClass = REPLACE_NAME; + principalName = match("principal type"); + } else { + // check for principalClass wildcard + if (peek("*")) { + match("*"); + principalClass = PrincipalEntry.WILDCARD_CLASS; + } else { + principalClass = match("principal type"); + } + + // check for principalName wildcard + if (peek("*")) { + match("*"); + principalName = PrincipalEntry.WILDCARD_NAME; + } else { + principalName = match("quoted string"); + } + + // disallow WILDCARD_CLASS && actual name + if (principalClass.equals(PrincipalEntry.WILDCARD_CLASS) && !principalName.equals(PrincipalEntry.WILDCARD_NAME)) { + if (debug != null) { + debug.println("disallowing principal that " + "has WILDCARD class but no WILDCARD name"); + } + throw new ParsingException(st.lineno(), + ResourcesMgr.getString("can not specify Principal with a " + "wildcard class without a wildcard name")); + } + } + + try { + principalName = expand(principalName); + + if (principalClass.equals("javax.security.auth.x500.X500Principal") + && !principalName.equals(PrincipalEntry.WILDCARD_NAME)) { + + // 4702543: X500 names with an EmailAddress + // were encoded incorrectly. construct a new + // X500Principal with correct encoding. + + X500Principal p = new X500Principal((new X500Principal(principalName)).toString()); + principalName = p.getName(); + } + + principals.add(new PrincipalEntry(principalClass, principalName)); + } catch (PropertyExpander.ExpandException peee) { + // ignore the entire policy entry + // but continue parsing all the info + // so we can get to the next entry + if (debug != null) { + debug.println("principal name expansion failed: " + principalName); + } + ignoreEntry = true; + } + peekAndMatch(","); + + } else { + throw new ParsingException(st.lineno(), ResourcesMgr.getString("expected codeBase or SignedBy or " + "Principal")); + } + } + + if (principals != null) + e.principals = principals; + match("{"); + + while (!peek("}")) { + if (peek("Permission")) { + try { + PermissionEntry pe = parsePermissionEntry(); + e.add(pe); + } catch (PropertyExpander.ExpandException peee) { + // ignore. The add never happened + if (debug != null) { + debug.println(peee.toString()); + } + skipEntry(); // BugId 4219343 + } + match(";"); + } else { + throw new ParsingException(st.lineno(), ResourcesMgr.getString("expected permission entry")); + } + } + match("}"); + + try { + if (e.signedBy != null) + e.signedBy = expand(e.signedBy); + if (e.codeBase != null) { + + e.codeBase = expand(e.codeBase, true).replace(File.separatorChar, '/'); + } + } catch (PropertyExpander.ExpandException peee) { + if (debug != null) { + debug.println(peee.toString()); + } + return null; + } + + return (ignoreEntry == true) ? null : e; + } + + /** + * parse a Permission entry + */ + private PermissionEntry parsePermissionEntry() throws ParsingException, IOException, PropertyExpander.ExpandException { + PermissionEntry e = new PermissionEntry(); + + // Permission + match("Permission"); + e.permission = match("permission type"); + + if (peek("\"")) { + // Permission name + e.name = expand(match("quoted string")); + } + + if (!peek(",")) { + return e; + } + match(","); + + if (peek("\"")) { + e.action = expand(match("quoted string")); + if (!peek(",")) { + return e; + } + match(","); + } + + if (peekAndMatch("SignedBy")) { + e.signedBy = expand(match("quoted string")); + } + return e; + } + + // package-private: used by PolicyFile for static policy + static String[] parseExtDirs(String codebase, int start) { + return null; + } + + private boolean peekAndMatch(String expect) throws ParsingException, IOException { + if (peek(expect)) { + match(expect); + return true; + } else { + return false; + } + } + + private boolean peek(String expect) { + boolean found = false; + + switch (lookahead) { + + case StreamTokenizer.TT_WORD: + if (expect.equalsIgnoreCase(st.sval)) + found = true; + break; + case ',': + if (expect.equalsIgnoreCase(",")) + found = true; + break; + case '{': + if (expect.equalsIgnoreCase("{")) + found = true; + break; + case '}': + if (expect.equalsIgnoreCase("}")) + found = true; + break; + case '"': + if (expect.equalsIgnoreCase("\"")) + found = true; + break; + case '*': + if (expect.equalsIgnoreCase("*")) + found = true; + break; + default: + + } + return found; + } + + private String match(String expect) throws ParsingException, IOException { + String value = null; + + switch (lookahead) { + case StreamTokenizer.TT_NUMBER: + throw new ParsingException(st.lineno(), expect, ResourcesMgr.getString("number ") + String.valueOf(st.nval)); + case StreamTokenizer.TT_EOF: + MessageFormat form = new MessageFormat(ResourcesMgr.getString("expected [expect], read [end of file]")); + Object[] source = { expect }; + throw new ParsingException(form.format(source)); + case StreamTokenizer.TT_WORD: + if (expect.equalsIgnoreCase(st.sval)) { + lookahead = st.nextToken(); + } else if (expect.equalsIgnoreCase("permission type")) { + value = st.sval; + lookahead = st.nextToken(); + } else if (expect.equalsIgnoreCase("principal type")) { + value = st.sval; + lookahead = st.nextToken(); + } else { + throw new ParsingException(st.lineno(), expect, st.sval); + } + break; + case '"': + if (expect.equalsIgnoreCase("quoted string")) { + value = st.sval; + lookahead = st.nextToken(); + } else if (expect.equalsIgnoreCase("permission type")) { + value = st.sval; + lookahead = st.nextToken(); + } else if (expect.equalsIgnoreCase("principal type")) { + value = st.sval; + lookahead = st.nextToken(); + } else { + throw new ParsingException(st.lineno(), expect, st.sval); + } + break; + case ',': + if (expect.equalsIgnoreCase(",")) + lookahead = st.nextToken(); + else + throw new ParsingException(st.lineno(), expect, ","); + break; + case '{': + if (expect.equalsIgnoreCase("{")) + lookahead = st.nextToken(); + else + throw new ParsingException(st.lineno(), expect, "{"); + break; + case '}': + if (expect.equalsIgnoreCase("}")) + lookahead = st.nextToken(); + else + throw new ParsingException(st.lineno(), expect, "}"); + break; + case ';': + if (expect.equalsIgnoreCase(";")) + lookahead = st.nextToken(); + else + throw new ParsingException(st.lineno(), expect, ";"); + break; + case '*': + if (expect.equalsIgnoreCase("*")) + lookahead = st.nextToken(); + else + throw new ParsingException(st.lineno(), expect, "*"); + break; + default: + throw new ParsingException(st.lineno(), expect, new String(new char[] { (char) lookahead })); + } + return value; + } + + /** + * skip all tokens for this entry leaving the delimiter ";" in the stream. + */ + private void skipEntry() throws ParsingException, IOException { + while (lookahead != ';') { + switch (lookahead) { + case StreamTokenizer.TT_NUMBER: + throw new ParsingException(st.lineno(), ";", ResourcesMgr.getString("number ") + String.valueOf(st.nval)); + case StreamTokenizer.TT_EOF: + throw new ParsingException(ResourcesMgr.getString("expected [;], read [end of file]")); + default: + lookahead = st.nextToken(); + } + } + } + + /** + * Each grant entry in the policy configuration file is represented by a GrantEntry object. + *

+ * + *

+ * For example, the entry + * + *

+     *      grant signedBy "Duke" {
+     *          permission java.io.FilePermission "/tmp", "read,write";
+     *      };
+     *
+     * 
+ * + * is represented internally + * + *
+     *
+     * pe = new PermissionEntry("java.io.FilePermission", "/tmp", "read,write");
+     *
+     * ge = new GrantEntry("Duke", null);
+     *
+     * ge.add(pe);
+     *
+     * 
+ * + * @author Roland Schemers + * + * version 1.19, 05/21/98 + */ + + public static class GrantEntry { + + public String signedBy; + + public String codeBase; + + public LinkedList principals; + + public Vector permissionEntries; + + public GrantEntry() { + principals = new LinkedList(); + permissionEntries = new Vector(); + } + + public GrantEntry(String signedBy, String codeBase) { + this.codeBase = codeBase; + this.signedBy = signedBy; + principals = new LinkedList(); + permissionEntries = new Vector(); + } + + public void add(PermissionEntry pe) { + permissionEntries.addElement(pe); + } + + public boolean remove(PrincipalEntry pe) { + return principals.remove(pe); + } + + public boolean remove(PermissionEntry pe) { + return permissionEntries.removeElement(pe); + } + + public boolean contains(PrincipalEntry pe) { + return principals.contains(pe); + } + + public boolean contains(PermissionEntry pe) { + return permissionEntries.contains(pe); + } + + /** + * Enumerate all the permission entries in this GrantEntry. + */ + public Enumeration permissionElements() { + return permissionEntries.elements(); + } + + public void write(PrintWriter out) { + out.print("grant"); + if (signedBy != null) { + out.print(" signedBy \""); + out.print(signedBy); + out.print('"'); + if (codeBase != null) + out.print(", "); + } + if (codeBase != null) { + out.print(" codeBase \""); + out.print(codeBase); + out.print('"'); + if (principals != null && principals.size() > 0) + out.print(",\n"); + } + if (principals != null && principals.size() > 0) { + ListIterator pli = principals.listIterator(); + while (pli.hasNext()) { + out.print(" "); + PrincipalEntry pe = pli.next(); + pe.write(out); + if (pli.hasNext()) + out.print(",\n"); + } + } + out.println(" {"); + Enumeration enum_ = permissionEntries.elements(); + while (enum_.hasMoreElements()) { + PermissionEntry pe = enum_.nextElement(); + out.write(" "); + pe.write(out); + } + out.println("};"); + } + + public Object clone() { + GrantEntry ge = new GrantEntry(); + ge.codeBase = this.codeBase; + ge.signedBy = this.signedBy; + ge.principals = new LinkedList(this.principals); + ge.permissionEntries = new Vector(this.permissionEntries); + return ge; + } + } + + /** + * Principal info (class and name) in a grant entry + */ + public static class PrincipalEntry { + + public static final String WILDCARD_CLASS = "WILDCARD_PRINCIPAL_CLASS"; + + public static final String WILDCARD_NAME = "WILDCARD_PRINCIPAL_NAME"; + + String principalClass; + + String principalName; + + /** + * A PrincipalEntry consists of the Principal class and Principal name. + * + *

+ * + * @param principalClass the Principal class. + *

+ * + * @param principalName the Principal name. + *

+ */ + public PrincipalEntry(String principalClass, String principalName) { + if (principalClass == null || principalName == null) + throw new NullPointerException(ResourcesMgr.getString("null principalClass or principalName")); + this.principalClass = principalClass; + this.principalName = principalName; + } + + public String getPrincipalClass() { + return principalClass; + } + + public String getPrincipalName() { + return principalName; + } + + public String getDisplayClass() { + if (principalClass.equals(WILDCARD_CLASS)) { + return "*"; + } else if (principalClass.equals(REPLACE_NAME)) { + return ""; + } else + return principalClass; + } + + public String getDisplayName() { + return getDisplayName(false); + } + + public String getDisplayName(boolean addQuote) { + if (principalName.equals(WILDCARD_NAME)) { + return "*"; + } else { + if (addQuote) + return "\"" + principalName + "\""; + else + return principalName; + } + } + + public String toString() { + if (!principalClass.equals(REPLACE_NAME)) { + return getDisplayClass() + "/" + getDisplayName(); + } else { + return getDisplayName(); + } + } + + /** + * Test for equality between the specified object and this object. Two PrincipalEntries are equal if their + * PrincipalClass and PrincipalName values are equal. + * + *

+ * + * @param obj the object to test for equality with this object. + * + * @return true if the objects are equal, false otherwise. + */ + public boolean equals(Object obj) { + if (this == obj) + return true; + + if (!(obj instanceof PrincipalEntry)) + return false; + + PrincipalEntry that = (PrincipalEntry) obj; + if (this.principalClass.equals(that.principalClass) && this.principalName.equals(that.principalName)) { + return true; + } + + return false; + } + + /** + * Return a hashcode for this PrincipalEntry. + * + *

+ * + * @return a hashcode for this PrincipalEntry. + */ + public int hashCode() { + return principalClass.hashCode(); + } + + public void write(PrintWriter out) { + out.print("principal " + getDisplayClass() + " " + getDisplayName(true)); + } + } + + /** + * Each permission entry in the policy configuration file is represented by a PermissionEntry object. + *

+ * + *

+ * For example, the entry + * + *

+     *          permission java.io.FilePermission "/tmp", "read,write";
+     * 
+ * + * is represented internally + * + *
+     *
+     * pe = new PermissionEntry("java.io.FilePermission", "/tmp", "read,write");
+     * 
+ * + * @author Roland Schemers + * + * version 1.19, 05/21/98 + */ + + public static class PermissionEntry { + + public String permission; + + public String name; + + public String action; + + public String signedBy; + + public PermissionEntry() { + } + + public PermissionEntry(String permission, String name, String action) { + this.permission = permission; + this.name = name; + this.action = action; + } + + /** + * Calculates a hash code value for the object. Objects which are equal will also have the same hashcode. + */ + public int hashCode() { + int retval = permission.hashCode(); + if (name != null) + retval ^= name.hashCode(); + if (action != null) + retval ^= action.hashCode(); + return retval; + } + + public boolean equals(Object obj) { + if (obj == this) + return true; + + if (!(obj instanceof PermissionEntry)) + return false; + + PermissionEntry that = (PermissionEntry) obj; + + if (this.permission == null) { + if (that.permission != null) + return false; + } else { + if (!this.permission.equals(that.permission)) + return false; + } + + if (this.name == null) { + if (that.name != null) + return false; + } else { + if (!this.name.equals(that.name)) + return false; + } + + if (this.action == null) { + if (that.action != null) + return false; + } else { + if (!this.action.equals(that.action)) + return false; + } + + if (this.signedBy == null) { + if (that.signedBy != null) + return false; + } else { + if (!this.signedBy.equals(that.signedBy)) + return false; + } + + // everything matched -- the 2 objects are equal + return true; + } + + public void write(PrintWriter out) { + out.print("permission "); + out.print(permission); + if (name != null) { + out.print(" \""); + + // ATTENTION: regex with double escaping, + // the normal forms look like: + // $name =~ s/\\/\\\\/g; and + // $name =~ s/\"/\\\"/g; + // and then in a java string, it's escaped again + + out.print(name.replaceAll("\\\\", "\\\\\\\\").replaceAll("\\\"", "\\\\\\\"")); + out.print('"'); + } + if (action != null) { + out.print(", \""); + out.print(action); + out.print('"'); + } + if (signedBy != null) { + out.print(", signedBy \""); + out.print(signedBy); + out.print('"'); + } + out.println(";"); + } + } + + public static class ParsingException extends GeneralSecurityException { + + private static final long serialVersionUID = -4330692689482574072L; + + private String i18nMessage; + + /** + * Constructs a ParsingException with the specified detail message. A detail message is a String that describes this + * particular exception, which may, for example, specify which algorithm is not available. + * + * @param msg the detail message. + */ + public ParsingException(String msg) { + super(msg); + i18nMessage = msg; + } + + public ParsingException(int line, String msg) { + super("line " + line + ": " + msg); + MessageFormat form = new MessageFormat(ResourcesMgr.getString("line number: msg")); + Object[] source = { new Integer(line), msg }; + i18nMessage = form.format(source); + } + + public ParsingException(int line, String expect, String actual) { + super("line " + line + ": expected [" + expect + "], found [" + actual + "]"); + MessageFormat form = new MessageFormat(ResourcesMgr.getString("line number: expected [expect], found [actual]")); + Object[] source = { new Integer(line), expect, actual }; + i18nMessage = form.format(source); + } + + public String getLocalizedMessage() { + return i18nMessage; + } + } + + public static void main(String arg[]) throws Exception { + FileReader fr = null; + FileWriter fw = null; + try { + PolicyParser pp = new PolicyParser(true); + fr = new FileReader(arg[0]); + pp.read(fr); + fw = new FileWriter(arg[1]); + pp.write(fw); + } finally { + if (fr != null) { + fr.close(); + } + + if (fw != null) { + fw.close(); + } + } + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java new file mode 100644 index 0000000000..6e7ea3d6c1 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemIdentity.java @@ -0,0 +1,95 @@ +/* + * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.provider; + +import java.io.Serializable; +import java.util.Enumeration; +import java.security.*; + +/** + * An identity with a very simple trust mechanism. + * + * @author Benjamin Renaud + */ + +public class SystemIdentity extends Identity implements Serializable { + + /** use serialVersionUID from JDK 1.1. for interoperability */ + private static final long serialVersionUID = 9060648952088498478L; + + /* This should be changed to ACL */ + boolean trusted = false; + + /* Free form additional information about this identity. */ + private String info; + + public SystemIdentity(String name, IdentityScope scope) throws InvalidParameterException, KeyManagementException { + super(name, scope); + } + + /** + * Is this identity trusted by sun.* facilities? + */ + public boolean isTrusted() { + return trusted; + } + + /** + * Set the trust status of this identity. + */ + protected void setTrusted(boolean trusted) { + this.trusted = trusted; + } + + void setIdentityInfo(String info) { + super.setInfo(info); + } + + String getIndentityInfo() { + return super.getInfo(); + } + + /** + * Call back method into a protected method for package friends. + */ + void setIdentityPublicKey(PublicKey key) throws KeyManagementException { + setPublicKey(key); + } + + /** + * Call back method into a protected method for package friends. + */ + void addIdentityCertificate(Certificate cert) throws KeyManagementException { + addCertificate(cert); + } + + void clearCertificates() throws KeyManagementException { + Certificate[] certs = certificates(); + for (int i = 0; i < certs.length; i++) { + removeCertificate(certs[i]); + } + } + + public String toString() { + String trustedString = "not trusted"; + if (trusted) { + trustedString = "trusted"; + } + return super.toString() + "[" + trustedString + "]"; + } + +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java new file mode 100644 index 0000000000..07f170389f --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/provider/SystemSigner.java @@ -0,0 +1,103 @@ +/* + * Copyright (c) 1996, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.provider; + +import java.util.*; +import java.security.*; + +/** + * SunSecurity signer. Like SystemIdentity, it has a trust bit, which can be set by SunSecurity classes, and a set of + * accessors for other classes in sun.security.*. + * + * @author Benjamin Renaud + */ + +public class SystemSigner extends Signer { + + /** use serialVersionUID from JDK 1.1. for interoperability */ + private static final long serialVersionUID = -2127743304301557711L; + + /* Is this signer trusted */ + private boolean trusted = false; + + /** + * Construct a signer with a given name. + */ + public SystemSigner(String name) { + super(name); + } + + /** + * Construct a signer with a name and a scope. + * + * @param name the signer's name. + * + * @param scope the scope for this signer. + */ + public SystemSigner(String name, IdentityScope scope) throws KeyManagementException { + + super(name, scope); + } + + /* Set the trust status of this signer */ + void setTrusted(boolean trusted) { + this.trusted = trusted; + } + + /** + * Returns true if this signer is trusted. + */ + public boolean isTrusted() { + return trusted; + } + + /* friendly callback for set keys */ + void setSignerKeyPair(KeyPair pair) throws InvalidParameterException, KeyException { + setKeyPair(pair); + } + + /* friendly callback for getting private keys */ + PrivateKey getSignerPrivateKey() { + return getPrivateKey(); + } + + void setSignerInfo(String s) { + setInfo(s); + } + + /** + * Call back method into a protected method for package friends. + */ + void addSignerCertificate(Certificate cert) throws KeyManagementException { + addCertificate(cert); + } + + void clearCertificates() throws KeyManagementException { + Certificate[] certs = certificates(); + for (int i = 0; i < certs.length; i++) { + removeCertificate(certs[i]); + } + } + + public String toString() { + String trustedString = "not trusted"; + if (trusted) { + trustedString = "trusted"; + } + return super.toString() + "[" + trustedString + "]"; + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java new file mode 100644 index 0000000000..1bf5e866ab --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Debug.java @@ -0,0 +1,266 @@ +/* + * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +import java.math.BigInteger; +import java.util.regex.Pattern; +import java.util.regex.Matcher; + +/** + * A utility class for debuging. + * + * @author Roland Schemers + */ +public class Debug { + + private String prefix; + + private static String args; + + static { + args = java.security.AccessController + .doPrivileged(new com.sun.ts.lib.util.sec.security.action.GetPropertyAction("java.security.debug")); + + String args2 = java.security.AccessController + .doPrivileged(new com.sun.ts.lib.util.sec.security.action.GetPropertyAction("java.security.auth.debug")); + + if (args == null) { + args = args2; + } else { + if (args2 != null) + args = args + "," + args2; + } + + if (args != null) { + args = marshal(args); + if (args.equals("help")) { + Help(); + } + } + } + + public static void Help() { + System.err.println(); + System.err.println("all turn on all debugging"); + System.err.println("access print all checkPermission results"); + System.err.println("combiner SubjectDomainCombiner debugging"); + System.err.println("gssloginconfig"); + System.err.println("configfile JAAS ConfigFile loading"); + System.err.println("configparser JAAS ConfigFile parsing"); + System.err.println(" GSS LoginConfigImpl debugging"); + System.err.println("jar jar verification"); + System.err.println("logincontext login context results"); + System.err.println("policy loading and granting"); + System.err.println("provider security provider debugging"); + System.err.println("scl permissions SecureClassLoader assigns"); + System.err.println(); + System.err.println("The following can be used with access:"); + System.err.println(); + System.err.println("stack include stack trace"); + System.err.println("domain dump all domains in context"); + System.err.println("failure before throwing exception, dump stack"); + System.err.println(" and domain that didn't have permission"); + System.err.println(); + System.err.println("The following can be used with stack and domain:"); + System.err.println(); + System.err.println("permission="); + System.err.println(" only dump output if specified permission"); + System.err.println(" is being checked"); + System.err.println("codebase="); + System.err.println(" only dump output if specified codebase"); + System.err.println(" is being checked"); + + System.err.println(); + System.err.println("Note: Separate multiple options with a comma"); + System.exit(0); + } + + /** + * Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be the same as option. + */ + + public static Debug getInstance(String option) { + return getInstance(option, option); + } + + /** + * Get a Debug object corresponding to whether or not the given option is set. Set the prefix to be prefix. + */ + public static Debug getInstance(String option, String prefix) { + if (isOn(option)) { + Debug d = new Debug(); + d.prefix = prefix; + return d; + } else { + return null; + } + } + + /** + * True if the system property "security.debug" contains the string "option". + */ + public static boolean isOn(String option) { + if (args == null) + return false; + else { + if (args.indexOf("all") != -1) + return true; + else + return (args.indexOf(option) != -1); + } + } + + /** + * print a message to stderr that is prefixed with the prefix created from the call to getInstance. + */ + + public void println(String message) { + System.err.println(prefix + ": " + message); + } + + /** + * print a blank line to stderr that is prefixed with the prefix. + */ + + public void println() { + System.err.println(prefix + ":"); + } + + /** + * print a message to stderr that is prefixed with the prefix. + */ + + public static void println(String prefix, String message) { + System.err.println(prefix + ": " + message); + } + + /** + * return a hexadecimal printed representation of the specified BigInteger object. the value is formatted to fit on + * lines of at least 75 characters, with embedded newlines. Words are separated for readability, with eight words (32 + * bytes) per line. + */ + public static String toHexString(BigInteger b) { + String hexValue = b.toString(16); + StringBuffer buf = new StringBuffer(hexValue.length() * 2); + + if (hexValue.startsWith("-")) { + buf.append(" -"); + hexValue = hexValue.substring(1); + } else { + buf.append(" "); // four spaces + } + if ((hexValue.length() % 2) != 0) { + // add back the leading 0 + hexValue = "0" + hexValue; + } + int i = 0; + while (i < hexValue.length()) { + // one byte at a time + buf.append(hexValue.substring(i, i + 2)); + i += 2; + if (i != hexValue.length()) { + if ((i % 64) == 0) { + buf.append("\n "); // line after eight words + } else if (i % 8 == 0) { + buf.append(" "); // space between words + } + } + } + return buf.toString(); + } + + /** + * change a string into lower case except permission classes and URLs. + */ + private static String marshal(String args) { + if (args != null) { + StringBuffer target = new StringBuffer(); + StringBuffer source = new StringBuffer(args); + + // obtain the "permission=" options + // the syntax of classname: IDENTIFIER.IDENTIFIER + // the regular express to match a class name: + // "[a-zA-Z_$][a-zA-Z0-9_$]*([.][a-zA-Z_$][a-zA-Z0-9_$]*)*" + String keyReg = "[Pp][Ee][Rr][Mm][Ii][Ss][Ss][Ii][Oo][Nn]="; + String keyStr = "permission="; + String reg = keyReg + "[a-zA-Z_$][a-zA-Z0-9_$]*([.][a-zA-Z_$][a-zA-Z0-9_$]*)*"; + Pattern pattern = Pattern.compile(reg); + Matcher matcher = pattern.matcher(source); + StringBuffer left = new StringBuffer(); + while (matcher.find()) { + String matched = matcher.group(); + target.append(matched.replaceFirst(keyReg, keyStr)); + target.append(" "); + + // delete the matched sequence + matcher.appendReplacement(left, ""); + } + matcher.appendTail(left); + source = left; + + // obtain the "codebase=" options + // the syntax of URL is too flexible, and here assumes that the + // URL contains no space, comma(','), and semicolon(';'). That + // also means those characters also could be used as separator + // after codebase option. + // However, the assumption is incorrect in some special situation + // when the URL contains comma or semicolon + keyReg = "[Cc][Oo][Dd][Ee][Bb][Aa][Ss][Ee]="; + keyStr = "codebase="; + reg = keyReg + "[^, ;]*"; + pattern = Pattern.compile(reg); + matcher = pattern.matcher(source); + left = new StringBuffer(); + while (matcher.find()) { + String matched = matcher.group(); + target.append(matched.replaceFirst(keyReg, keyStr)); + target.append(" "); + + // delete the matched sequence + matcher.appendReplacement(left, ""); + } + matcher.appendTail(left); + source = left; + + // convert the rest to lower-case characters + target.append(source.toString().toLowerCase()); + + return target.toString(); + } + + return null; + } + + private final static char[] hexDigits = "0123456789abcdef".toCharArray(); + + public static String toString(byte[] b) { + if (b == null) { + return "(null)"; + } + StringBuilder sb = new StringBuilder(b.length * 3); + for (int i = 0; i < b.length; i++) { + int k = b[i] & 0xff; + if (i != 0) { + sb.append(':'); + } + sb.append(hexDigits[k >>> 4]); + sb.append(hexDigits[k & 0xf]); + } + return sb.toString(); + } + +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java new file mode 100644 index 0000000000..f27ddd2ff1 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/Password.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2003, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +import java.io.*; +import java.nio.*; +import java.nio.charset.*; +import java.util.Arrays; + +/** + * A utility class for reading passwords + * + */ +public class Password { + /** Reads user password from given input stream. */ + public static char[] readPassword(InputStream in) throws IOException { + + char[] consoleEntered = null; + byte[] consoleBytes = null; + + try { + // Use the new java.io.Console class + Console con = null; + if (in == System.in && ((con = System.console()) != null)) { + consoleEntered = con.readPassword(); + // readPassword returns "" if you just print ENTER, + // to be compatible with old Password class, change to null + if (consoleEntered != null && consoleEntered.length == 0) { + return null; + } + consoleBytes = convertToBytes(consoleEntered); + in = new ByteArrayInputStream(consoleBytes); + } + + // Rest of the lines still necessary for KeyStoreLoginModule + // and when there is no console. + + char[] lineBuffer; + char[] buf; + int i; + + buf = lineBuffer = new char[128]; + + int room = buf.length; + int offset = 0; + int c; + + boolean done = false; + while (!done) { + switch (c = in.read()) { + case -1: + case '\n': + done = true; + break; + + case '\r': + int c2 = in.read(); + if ((c2 != '\n') && (c2 != -1)) { + if (!(in instanceof PushbackInputStream)) { + in = new PushbackInputStream(in); + } + ((PushbackInputStream) in).unread(c2); + } else { + done = true; + break; + } + + default: + if (--room < 0) { + buf = new char[offset + 128]; + room = buf.length - offset - 1; + System.arraycopy(lineBuffer, 0, buf, 0, offset); + Arrays.fill(lineBuffer, ' '); + lineBuffer = buf; + } + buf[offset++] = (char) c; + break; + } + } + + if (offset == 0) { + return null; + } + + char[] ret = new char[offset]; + System.arraycopy(buf, 0, ret, 0, offset); + Arrays.fill(buf, ' '); + + return ret; + } finally { + if (consoleEntered != null) { + Arrays.fill(consoleEntered, ' '); + } + if (consoleBytes != null) { + Arrays.fill(consoleBytes, (byte) 0); + } + } + } + + /** + * Change a password read from Console.readPassword() into its original bytes. + * + * @param pass a char[] + * @return its byte[] format, similar to new String(pass).getBytes() + */ + private static byte[] convertToBytes(char[] pass) { + if (enc == null) { + synchronized (Password.class) { + enc = com.sun.ts.lib.util.sec.misc.SharedSecrets.getJavaIOAccess().charset().newEncoder() + .onMalformedInput(CodingErrorAction.REPLACE).onUnmappableCharacter(CodingErrorAction.REPLACE); + } + } + byte[] ba = new byte[(int) (enc.maxBytesPerChar() * pass.length)]; + ByteBuffer bb = ByteBuffer.wrap(ba); + synchronized (enc) { + enc.reset().encode(CharBuffer.wrap(pass), bb, true); + } + if (bb.position() < ba.length) { + ba[bb.position()] = '\n'; + } + return ba; + } + + private static volatile CharsetEncoder enc; +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java new file mode 100644 index 0000000000..6e6b57e25b --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PolicyUtil.java @@ -0,0 +1,154 @@ +/* + * Copyright (c) 2004, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +import java.io.*; +import java.net.*; +import java.security.*; +import java.util.Arrays; + +import com.sun.ts.lib.util.sec.net.www.ParseUtil; + +/** + * A utility class for getting a KeyStore instance from policy information. In addition, a supporting getInputStream + * method. + * + */ +public class PolicyUtil { + + // standard PKCS11 KeyStore type + private static final String P11KEYSTORE = "PKCS11"; + + // reserved word + private static final String NONE = "NONE"; + + /* + * Fast path reading from file urls in order to avoid calling FileURLConnection.connect() which can be quite slow the + * first time it is called. We really should clean up FileURLConnection so that this is not a problem but in the + * meantime this fix helps reduce start up time noticeably for the new launcher. -- DAC + */ + public static InputStream getInputStream(URL url) throws IOException { + if ("file".equals(url.getProtocol())) { + String path = url.getFile().replace('/', File.separatorChar); + path = ParseUtil.decode(path); + return new FileInputStream(path); + } else { + return url.openStream(); + } + } + + /** + * this is intended for use by policytool and the policy parser to instantiate a KeyStore from the information in the + * GUI/policy file + */ + public static KeyStore getKeyStore(URL policyUrl, // URL of policy file + String keyStoreName, // input: keyStore URL + String keyStoreType, // input: keyStore type + String keyStoreProvider, // input: keyStore provider + String storePassURL, // input: keyStore password + Debug debug) throws KeyStoreException, MalformedURLException, IOException, NoSuchProviderException, NoSuchAlgorithmException, + java.security.cert.CertificateException { + + if (keyStoreName == null) { + throw new IllegalArgumentException("null KeyStore name"); + } + + char[] keyStorePassword = null; + try { + KeyStore ks; + if (keyStoreType == null) { + keyStoreType = KeyStore.getDefaultType(); + } + + if (P11KEYSTORE.equalsIgnoreCase(keyStoreType) && !NONE.equals(keyStoreName)) { + throw new IllegalArgumentException("Invalid value (" + keyStoreName + ") for keystore URL. If the keystore type is \"" + + P11KEYSTORE + "\", the keystore url must be \"" + NONE + "\""); + } + + if (keyStoreProvider != null) { + ks = KeyStore.getInstance(keyStoreType, keyStoreProvider); + } else { + ks = KeyStore.getInstance(keyStoreType); + } + + if (storePassURL != null) { + URL passURL; + try { + passURL = new URL(storePassURL); + // absolute URL + } catch (MalformedURLException e) { + // relative URL + if (policyUrl == null) { + throw e; + } + passURL = new URL(policyUrl, storePassURL); + } + + if (debug != null) { + debug.println("reading password" + passURL); + } + + InputStream in = null; + try { + in = passURL.openStream(); + keyStorePassword = Password.readPassword(in); + } finally { + if (in != null) { + in.close(); + } + } + } + + if (NONE.equals(keyStoreName)) { + ks.load(null, keyStorePassword); + return ks; + } else { + /* + * location of keystore is specified as absolute URL in policy file, or is relative to URL of policy file + */ + URL keyStoreUrl = null; + try { + keyStoreUrl = new URL(keyStoreName); + // absolute URL + } catch (MalformedURLException e) { + // relative URL + if (policyUrl == null) { + throw e; + } + keyStoreUrl = new URL(policyUrl, keyStoreName); + } + + if (debug != null) { + debug.println("reading keystore" + keyStoreUrl); + } + + InputStream inStream = null; + try { + inStream = new BufferedInputStream(getInputStream(keyStoreUrl)); + ks.load(inStream, keyStorePassword); + } finally { + inStream.close(); + } + return ks; + } + } finally { + if (keyStorePassword != null) { + Arrays.fill(keyStorePassword, ' '); + } + } + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java new file mode 100644 index 0000000000..fd1d797f57 --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/PropertyExpander.java @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1998, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +import java.net.URI; +import java.net.URISyntaxException; +import java.security.GeneralSecurityException; + +/** + * A utility class to expand properties embedded in a string. Strings of the form ${some.property.name} are expanded to + * be the value of the property. Also, the special ${/} property is expanded to be the same as file.separator. If a + * property is not set, a GeneralSecurityException will be thrown. + * + * @author Roland Schemers + */ +public class PropertyExpander { + + public static class ExpandException extends GeneralSecurityException { + + private static final long serialVersionUID = -7941948581406161702L; + + public ExpandException(String msg) { + super(msg); + } + } + + public static String expand(String value) throws ExpandException { + return expand(value, false); + } + + public static String expand(String value, boolean encodeURL) throws ExpandException { + if (value == null) + return null; + + int p = value.indexOf("${", 0); + + // no special characters + if (p == -1) + return value; + + StringBuffer sb = new StringBuffer(value.length()); + int max = value.length(); + int i = 0; // index of last character we copied + + scanner: while (p < max) { + if (p > i) { + // copy in anything before the special stuff + sb.append(value.substring(i, p)); + i = p; + } + int pe = p + 2; + + // do not expand ${{ ... }} + if (pe < max && value.charAt(pe) == '{') { + pe = value.indexOf("}}", pe); + if (pe == -1 || pe + 2 == max) { + // append remaining chars + sb.append(value.substring(p)); + break scanner; + } else { + // append as normal text + pe++; + sb.append(value.substring(p, pe + 1)); + } + } else { + while ((pe < max) && (value.charAt(pe) != '}')) { + pe++; + } + if (pe == max) { + // no matching '}' found, just add in as normal text + sb.append(value.substring(p, pe)); + break scanner; + } + String prop = value.substring(p + 2, pe); + if (prop.equals("/")) { + sb.append(java.io.File.separatorChar); + } else { + String val = System.getProperty(prop); + if (val != null) { + if (encodeURL) { + // encode 'val' unless it's an absolute URI + // at the beginning of the string buffer + try { + if (sb.length() > 0 || !(new URI(val)).isAbsolute()) { + val = com.sun.ts.lib.util.sec.net.www.ParseUtil.encodePath(val); + } + } catch (URISyntaxException use) { + val = com.sun.ts.lib.util.sec.net.www.ParseUtil.encodePath(val); + } + } + sb.append(val); + } else { + throw new ExpandException("unable to expand property " + prop); + } + } + } + i = pe + 1; + p = value.indexOf("${", i); + if (p == -1) { + // no more to expand. copy in any extra + if (i < max) { + sb.append(value.substring(i, max)); + } + // break out of loop + break scanner; + } + } + return sb.toString(); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java new file mode 100644 index 0000000000..77d6507b6f --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/ResourcesMgr.java @@ -0,0 +1,58 @@ +/* + * Copyright (c) 2000, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +/** + */ +public class ResourcesMgr { + + // intended for java.security, javax.security and sun.security resources + private static java.util.ResourceBundle bundle; + + // intended for com.sun.security resources + private static java.util.ResourceBundle altBundle; + + public static String getString(String s) { + + if (bundle == null) { + + // only load if/when needed + bundle = java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + public java.util.ResourceBundle run() { + return (java.util.ResourceBundle.getBundle("sun.security.util.Resources")); + } + }); + } + + return bundle.getString(s); + } + + public static String getString(String s, final String altBundleName) { + + if (altBundle == null) { + + // only load if/when needed + altBundle = java.security.AccessController.doPrivileged(new java.security.PrivilegedAction() { + public java.util.ResourceBundle run() { + return (java.util.ResourceBundle.getBundle(altBundleName)); + } + }); + } + + return altBundle.getString(s); + } +} diff --git a/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java new file mode 100644 index 0000000000..d2fc59e4dc --- /dev/null +++ b/tools/libutil/src/main/java/com/sun/ts/lib/util/sec/security/util/SecurityConstants.java @@ -0,0 +1,162 @@ +/* + * Copyright (c) 2003, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.util.sec.security.util; + +import java.awt.AWTPermission; +import java.lang.RuntimePermission; +import java.net.SocketPermission; +import java.net.NetPermission; +import java.security.SecurityPermission; +import java.security.AllPermission; +import javax.security.auth.AuthPermission; + +/** + * Permission constants and string constants used to create permissions used throughout the JDK. + */ +public final class SecurityConstants { + // Cannot create one of these + private SecurityConstants() { + } + + // Commonly used string constants for permission actions used by + // SecurityManager. Declare here for shortcut when checking permissions + // in FilePermission, SocketPermission, and PropertyPermission. + + public static final String FILE_DELETE_ACTION = "delete"; + + public static final String FILE_EXECUTE_ACTION = "execute"; + + public static final String FILE_READ_ACTION = "read"; + + public static final String FILE_WRITE_ACTION = "write"; + + public static final String SOCKET_RESOLVE_ACTION = "resolve"; + + public static final String SOCKET_CONNECT_ACTION = "connect"; + + public static final String SOCKET_LISTEN_ACTION = "listen"; + + public static final String SOCKET_ACCEPT_ACTION = "accept"; + + public static final String SOCKET_CONNECT_ACCEPT_ACTION = "connect,accept"; + + public static final String PROPERTY_RW_ACTION = "read,write"; + + public static final String PROPERTY_READ_ACTION = "read"; + + public static final String PROPERTY_WRITE_ACTION = "write"; + + // Permission constants used in the various checkPermission() calls in JDK. + + // java.lang.Class, java.lang.SecurityManager, java.lang.System, + // java.net.URLConnection, java.security.AllPermission, java.security.Policy, + // sun.security.provider.PolicyFile + public static final AllPermission ALL_PERMISSION = new AllPermission(); + + // java.lang.SecurityManager + public static final AWTPermission TOPLEVEL_WINDOW_PERMISSION = new AWTPermission("showWindowWithoutWarningBanner"); + + // java.lang.SecurityManager + public static final AWTPermission ACCESS_CLIPBOARD_PERMISSION = new AWTPermission("accessClipboard"); + + // java.lang.SecurityManager + public static final AWTPermission CHECK_AWT_EVENTQUEUE_PERMISSION = new AWTPermission("accessEventQueue"); + + // java.awt.Dialog + public static final AWTPermission TOOLKIT_MODALITY_PERMISSION = new AWTPermission("toolkitModality"); + + // java.awt.Robot + public static final AWTPermission READ_DISPLAY_PIXELS_PERMISSION = new AWTPermission("readDisplayPixels"); + + // java.awt.Robot + public static final AWTPermission CREATE_ROBOT_PERMISSION = new AWTPermission("createRobot"); + + // java.awt.MouseInfo + public static final AWTPermission WATCH_MOUSE_PERMISSION = new AWTPermission("watchMousePointer"); + + // java.awt.Window + public static final AWTPermission SET_WINDOW_ALWAYS_ON_TOP_PERMISSION = new AWTPermission("setWindowAlwaysOnTop"); + + // java.awt.Toolkit + public static final AWTPermission ALL_AWT_EVENTS_PERMISSION = new AWTPermission("listenToAllAWTEvents"); + + // java.awt.SystemTray + public static final AWTPermission ACCESS_SYSTEM_TRAY_PERMISSION = new AWTPermission("accessSystemTray"); + + // java.net.URL + public static final NetPermission SPECIFY_HANDLER_PERMISSION = new NetPermission("specifyStreamHandler"); + + // java.net.ProxySelector + public static final NetPermission SET_PROXYSELECTOR_PERMISSION = new NetPermission("setProxySelector"); + + // java.net.ProxySelector + public static final NetPermission GET_PROXYSELECTOR_PERMISSION = new NetPermission("getProxySelector"); + + // java.net.CookieHandler + public static final NetPermission SET_COOKIEHANDLER_PERMISSION = new NetPermission("setCookieHandler"); + + // java.net.CookieHandler + public static final NetPermission GET_COOKIEHANDLER_PERMISSION = new NetPermission("getCookieHandler"); + + // java.net.ResponseCache + public static final NetPermission SET_RESPONSECACHE_PERMISSION = new NetPermission("setResponseCache"); + + // java.net.ResponseCache + public static final NetPermission GET_RESPONSECACHE_PERMISSION = new NetPermission("getResponseCache"); + + // java.lang.SecurityManager, sun.applet.AppletPanel, sun.misc.Launcher + public static final RuntimePermission CREATE_CLASSLOADER_PERMISSION = new RuntimePermission("createClassLoader"); + + // java.lang.SecurityManager + public static final RuntimePermission CHECK_MEMBER_ACCESS_PERMISSION = new RuntimePermission("accessDeclaredMembers"); + + // java.lang.SecurityManager, sun.applet.AppletSecurity + public static final RuntimePermission MODIFY_THREAD_PERMISSION = new RuntimePermission("modifyThread"); + + // java.lang.SecurityManager, sun.applet.AppletSecurity + public static final RuntimePermission MODIFY_THREADGROUP_PERMISSION = new RuntimePermission("modifyThreadGroup"); + + // java.lang.Class + public static final RuntimePermission GET_PD_PERMISSION = new RuntimePermission("getProtectionDomain"); + + // java.lang.Class, java.lang.ClassLoader, java.lang.Thread + public static final RuntimePermission GET_CLASSLOADER_PERMISSION = new RuntimePermission("getClassLoader"); + + // java.lang.Thread + public static final RuntimePermission STOP_THREAD_PERMISSION = new RuntimePermission("stopThread"); + + // java.lang.Thread + public static final RuntimePermission GET_STACK_TRACE_PERMISSION = new RuntimePermission("getStackTrace"); + + // java.security.AccessControlContext + public static final SecurityPermission CREATE_ACC_PERMISSION = new SecurityPermission("createAccessControlContext"); + + // java.security.AccessControlContext + public static final SecurityPermission GET_COMBINER_PERMISSION = new SecurityPermission("getDomainCombiner"); + + // java.security.Policy, java.security.ProtectionDomain + public static final SecurityPermission GET_POLICY_PERMISSION = new SecurityPermission("getPolicy"); + + // java.lang.SecurityManager + public static final SocketPermission LOCAL_LISTEN_PERMISSION = new SocketPermission("localhost:1024-", SOCKET_LISTEN_ACTION); + + // javax.security.auth.Subject + public static final AuthPermission DO_AS_PERMISSION = new AuthPermission("doAs"); + + // javax.security.auth.Subject + public static final AuthPermission DO_AS_PRIVILEGED_PERMISSION = new AuthPermission("doAsPrivileged"); +} diff --git a/libutil/src/main/java/ee/tck/javadb/JavaDBController.java b/tools/libutil/src/main/java/ee/tck/javadb/JavaDBController.java similarity index 89% rename from libutil/src/main/java/ee/tck/javadb/JavaDBController.java rename to tools/libutil/src/main/java/ee/tck/javadb/JavaDBController.java index 0ba0565ef6..d146b1d323 100644 --- a/libutil/src/main/java/ee/tck/javadb/JavaDBController.java +++ b/tools/libutil/src/main/java/ee/tck/javadb/JavaDBController.java @@ -48,6 +48,7 @@ public JavaDBController() { /** * Use the provided values for the JavaDBController + * * @param dbName * @param server * @param port @@ -64,6 +65,7 @@ public JavaDBController(String dbName, String server, int port, String user, Str /** * Load the JavaDBController settings from the tsJte file + * * @param tsJte * @throws IOException */ @@ -76,13 +78,15 @@ public JavaDBController(Path tsJte) throws IOException { this.user = user; this.passwd = passwd; } - public void startJavaDB(Path derbyHome) throws Exception{ + + public void startJavaDB(Path derbyHome) throws Exception { System.setProperty("derby.system.home", derbyHome.toString()); InetAddress inetAddress = InetAddress.getByName(server); NetworkServerControl server = new NetworkServerControl(inetAddress, port); server.start(null); } - public void stopJavaDB() throws Exception{ + + public void stopJavaDB() throws Exception { InetAddress inetAddress = InetAddress.getByName(server); NetworkServerControl server = new NetworkServerControl(inetAddress, port); server.shutdown(); @@ -90,30 +94,31 @@ public void stopJavaDB() throws Exception{ /** * Check if the JavaDB server is running + * * @return true if the server is running and , false otherwise */ public boolean isJavaDBRunning() { java.util.Properties props = new java.util.Properties(); - String dbURL = "jdbc:derby://" + server + ":" + port + "/" + dbName + ";user=" + user + ";password=" + passwd+ ";create=true"; + String dbURL = "jdbc:derby://" + server + ":" + port + "/" + dbName + ";user=" + user + ";password=" + passwd + ";create=true"; props.setProperty("user", user); props.setProperty("password", passwd); boolean isRunning = false; - try(Connection conn = DriverManager.getConnection(dbURL, props)) { - /*interact with Derby*/ + try (Connection conn = DriverManager.getConnection(dbURL, props)) { + /* interact with Derby */ isRunning = conn.isValid(0); try (Statement s = conn.createStatement()) { try (ResultSet rs = s.executeQuery("values user")) { } catch (Exception e) { isRunning = false; - //e.printStackTrace(); + // e.printStackTrace(); } } catch (Exception e) { isRunning = false; - //e.printStackTrace(); + // e.printStackTrace(); } } catch (Exception e) { isRunning = false; - //e.printStackTrace(); + // e.printStackTrace(); } return isRunning; } diff --git a/libutil/src/main/resources/certificates/README b/tools/libutil/src/main/resources/certificates/README similarity index 100% rename from libutil/src/main/resources/certificates/README rename to tools/libutil/src/main/resources/certificates/README diff --git a/libutil/src/main/resources/certificates/clientcert.jks b/tools/libutil/src/main/resources/certificates/clientcert.jks similarity index 100% rename from libutil/src/main/resources/certificates/clientcert.jks rename to tools/libutil/src/main/resources/certificates/clientcert.jks diff --git a/libutil/src/main/resources/certificates/clientcert.p12 b/tools/libutil/src/main/resources/certificates/clientcert.p12 similarity index 100% rename from libutil/src/main/resources/certificates/clientcert.p12 rename to tools/libutil/src/main/resources/certificates/clientcert.p12 diff --git a/libutil/src/main/resources/certificates/cts_cert b/tools/libutil/src/main/resources/certificates/cts_cert similarity index 100% rename from libutil/src/main/resources/certificates/cts_cert rename to tools/libutil/src/main/resources/certificates/cts_cert diff --git a/runtime/pom.xml b/tools/pom.xml similarity index 56% rename from runtime/pom.xml rename to tools/pom.xml index 36d4817407..e978220303 100644 --- a/runtime/pom.xml +++ b/tools/pom.xml @@ -1,8 +1,6 @@ - + 4.0.0 - jakarta.tck + org.eclipse.ee4j project - 11.0.0-SNAPSHOT + 1.0.9 + - runtime - jar - - runtime - runtime + jakarta.tck + tools + 11.0.0-SNAPSHOT + pom - - - ${project.groupId} - libutil - - - jakarta.jms - jakarta.jms-api - - + This module contains the 4 libs that most TCK tests need (depend on) + + common + libutil + runtime + signaturetest + diff --git a/tools/runtime/pom.xml b/tools/runtime/pom.xml new file mode 100644 index 0000000000..98f4ca9c3a --- /dev/null +++ b/tools/runtime/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + + org.eclipse.ee4j + project + 1.0.9 + + + + jakarta.tck + runtime + 11.0.0-SNAPSHOT + jar + + runtime + runtime + https://github.com/jakartaee/platform-tck + + + UTF-8 + UTF-8 + + 11.0.0-SNAPSHOT + + + + + jakarta.tck + libutil + ${jakarta.tck.tools.version} + + + jakarta.jms + jakarta.jms-api + 3.1.0 + + + + + + + + maven-compiler-plugin + 3.13.0 + + 17 + -Xlint:all + + + + + maven-source-plugin + + + attach-sources + + jar-no-fork + + verify + + + + + + diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java new file mode 100644 index 0000000000..ec48955d49 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractDeliverable.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable; + +import com.sun.ts.lib.porting.DeploymentInfo; + +import java.util.Hashtable; +import java.util.Map; + +/** + * This class serves as an abstract implementation of the DeliverableInterface. It can be extended to customize values + * for a particular deliverable. + * + * @author Kyle Grucci + */ +public abstract class AbstractDeliverable implements DeliverableInterface { + protected Map htTSValidVehicles; + + protected Map htValidApps; + + protected Map htValidRunDirections; + + @Override + public boolean supportsAutoDeployment() { + return true; + } + + @Override + public boolean supportsAutoJMSAdmin() { + return true; + } + + @Override + public Map getValidVehicles() { + if (htTSValidVehicles == null) { + // TS hash table + htTSValidVehicles = new Hashtable(); + // add default values + htTSValidVehicles.put("tests.service_eetest.vehicles", new String[] { "ejb", "servlet", "jsp" }); + } + return htTSValidVehicles; + } + + @Override + public Map getInteropDirections() { + if (htValidRunDirections == null) { + htValidRunDirections = new Hashtable(); + // default for all tests + htValidRunDirections.put("tests.interop", "forward"); + } + return htValidRunDirections; + } + + @Override + public boolean supportsInterop() { + return true; + } + + @Override + public String getAdditionalClasspath(String distDir) { + return null; + } + + @Override + public DeploymentInfo getDeploymentInfo(String earFile, String[] sValidRuntimeInfoFilesArray) { + return null; + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java new file mode 100644 index 0000000000..af9079f3ef --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/AbstractPropertyManager.java @@ -0,0 +1,288 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable; + +import com.sun.ts.lib.util.TestUtil; + +import java.io.File; +import java.util.Properties; + +/** + * This class serves as a well known place for harness, util, and porting classes to retrieve property values. + * + * @created August 22, 2002 + * @author Kyle Grucci + * @deprecated + */ +@Deprecated(forRemoval = true) +public class AbstractPropertyManager implements PropertyManagerInterface { + + private Properties jteProperties; + + private String tmp = File.separator + "tmp"; + + protected static boolean bReversed; + + protected AbstractPropertyManager() { + } + + /** + * @exception PropertyNotSetException + */ + private void checkHarnessTempDir() throws PropertyNotSetException { + String tmpDir = getProperty("harness.temp.directory", null); + if (tmpDir == null) { + tmpDir = getProperty("TS_HOME", null) + this.tmp; + setProperty("harness.temp.directory", tmpDir); + } else { + if (!(tmpDir.endsWith(this.tmp) || tmpDir.endsWith(this.tmp + File.separator) || tmpDir.endsWith("/tmp") + || tmpDir.endsWith("/tmp/"))) { + tmpDir += this.tmp; + setProperty("harness.temp.directory", tmpDir); + } + } + } + + /** + * copies all entries from TestEnvironment and jteProperties to a new Properties, which is used for remote invocation of + * porting server. jteProperties has precedence over TestEnvironment. We set forward/reverse related properties in + * jteProperties and the same key in TestEnvironment may have old value. + * + * @return a new properties + */ + private Properties copyEntries() { + Properties props = new Properties(); + if (this.jteProperties != null) { + props.putAll(this.jteProperties); + } + if (TestUtil.harnessDebug) { + TestUtil.logHarnessDebug("AbstractPropertyManager copied all entries to a properties."); + } + + props.put("bin.dir", System.getProperty("bin.dir", "")); + return props; + } + + /** + * Sets a property in property manager. If the key already exists in the property manager, the old value is overriden by + * new value. + * + * @param sKey key of the property. + * @param sVal value of the property. + */ + @Override + public void setProperty(String sKey, String sVal) { + if (jteProperties == null) { + jteProperties = new Properties(); + } + if (sKey != null && sVal != null) { + jteProperties.setProperty(sKey, sVal); + } + } + + /** + * This method swaps all of the following interop values in TSPropertyManager... + * + * @param sDirection + */ + @Override + public void swapInteropPropertyValues(String sDirection) { + if (sDirection.equals("reverse")) { + if (bReversed) { + return; + } else { + reverseValues(); + } + } else { + if (!bReversed) { + return; + } else { + forwardValues(); + } + } + } + + protected void forwardValues() { + bReversed = false; + } + + protected void reverseValues() { + bReversed = true; + } + + /** + * gets a new properties containing all entries in the property manager. Any operation on the returned properties will + * have no effect on property manager + * + * @return The jteProperties value + */ + @Override + public Properties getJteProperties() { + return copyEntries(); + } + + /** + * This method is called by the test harness to retrieve all properties needed by a particular test. + * + * @param sPropKeys - Properties to retrieve + * @return Properties - property/value pairs + * @exception PropertyNotSetException + */ + @Override + public Properties getTestSpecificProperties(String[] sPropKeys) throws PropertyNotSetException { + Properties pTestProps = new Properties(); + String tmpKey = null; + + for (String sPropKey : sPropKeys) { + tmpKey = sPropKey; + if (tmpKey.equalsIgnoreCase("generateSQL")) { + pTestProps.put("generateSQL", "true"); + } else if (tmpKey.equalsIgnoreCase("all.props")) { + pTestProps = getJteProperties(); + pTestProps.put("generateSQL", "true"); + pTestProps.put("all.props", "true"); + return pTestProps; + } else { + pTestProps.put(tmpKey, getProperty(tmpKey)); + } + } + // set all props that all tests need + pTestProps.put("harness.log.port", getProperty("harness.log.port")); + pTestProps.put("harness.host", getProperty("harness.host")); + pTestProps.put("harness.log.traceflag", getProperty("harness.log.traceflag")); + pTestProps.put("harness.log.delayseconds", getProperty("harness.log.delayseconds")); + pTestProps.put("harness.temp.directory", getProperty("harness.temp.directory")); + pTestProps.put("harness.socket.retry.count", getProperty("harness.socket.retry.count")); + pTestProps.put("bin.dir", System.getProperty("bin.dir", "")); + + pTestProps.put("all.props", "false"); + return pTestProps; + } + + /** + * This method is called to get a property value + * + * @param sKey - Property to retrieve + * @return String - property value + * @exception PropertyNotSetException + */ + @Override + public String getProperty(String sKey) throws PropertyNotSetException { + String sVal = getProperty0(sKey); + if (sVal == null) { + throw new PropertyNotSetException("No value found for " + sKey + ". Please check your jte file for an appropiate value"); + } + return sVal; + } + + /** + * gets property value with default + * + * @param sKey - Property to retrieve + * @param def + * @return String - property value + */ + @Override + public String getProperty(String sKey, String def) { + String result = getProperty0(sKey); + if (result == null) { + result = def; + } + return result; + } + + /** + * Gets the defaultValue attribute of the AbstractPropertyManager object + * + * @param sKey + * @return The defaultValue value + */ + private String getDefaultValue(String sKey) { + String result = null; + if (sKey.startsWith("deployment_host.")) { + result = "local"; + if (TestUtil.harnessDebug) { + TestUtil.logHarnessDebug("WARNING: No value found for " + sKey + ", use default local"); + } + } else if (sKey.equals("undeploy_redeploy_apps")) { + result = "true"; + } + return result; + } + + /** + * retrieves property value from TestEnvironment, and converts it to a single string. If lookup returns null or empty + * string array, returns null. + * + * @param key + * @return The fromEnv value + */ + private String getFromEnv(String key) { + String result = null; + String[] values = null; + if (values != null) { + switch (values.length) { + case 0: + if (key.equals("s1as.admin.passwd") || key.equals("ri.admin.passwd") || key.equals("deployManagerpasswd.1") + || key.equals("deployManagerpasswd.2")) { + result = ""; + } + break; + case 1: + result = values[0].trim(); + break; + default: + result = ""; + for (String value : values) { + result += value + " "; + } + result = result.trim(); + } + } + return result; + } + + /** + * first tries properties, then env, and finally default values + * + * @param key + * @return The property0 value + */ + private String getProperty0(String key) { + String result = null; + if (jteProperties != null) { + result = jteProperties.getProperty(key); + } + if (result == null) { + result = getDefaultValue(key); + } + return result; + } + + /** + * Sets the jteProperties attribute of the AbstractPropertyManager object + * + * @param p The new jteProperties value + * @exception PropertyNotSetException + */ + protected final void setJteProperties(Properties p) throws PropertyNotSetException { + jteProperties = p; + jteProperties.put("bin.dir", System.getProperty("bin.dir", "")); + checkHarnessTempDir(); + } + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java new file mode 100644 index 0000000000..bd059b258a --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableFactory.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable; + +/** + * This is a factory class for creating instances of TSDeploymentInterface. The implementation classes used are + * determined by the values of the porting package properties in TS_HOME/bin/ts.jte. + * + * @author Kyle Grucci + */ + +public class DeliverableFactory { + private static DeliverableInterface di; + + public static DeliverableInterface getDeliverableInstance() throws Exception { + if (di == null) { + di = createInstance(); + } + return di; + } + + public static DeliverableInterface getDeliverableInstance(ClassLoader classLoader) throws Exception { + if (di == null) { + di = createInstance(classLoader); + } + return di; + } + + private static DeliverableInterface createInstance() throws Exception { + return createInstance(null); + } + + private static DeliverableInterface createInstance(ClassLoader classLoader) throws Exception { + try { + // get property value from within the ts specific properties file + String sClassName = System.getProperty("deliverable.class"); + // create and initialize a new instance of the Deployment class + Class c = null; + if (classLoader == null) { + c = Class.forName(sClassName); + } else { + c = Class.forName(sClassName, true, classLoader); + } + return (DeliverableInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java new file mode 100644 index 0000000000..e93b56d8b1 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/DeliverableInterface.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable; + +import com.sun.ts.lib.porting.DeploymentInfo; + +import java.util.Map; +import java.util.Properties; + +/** + * This interface serves as a place to retrieve deliverable specific information. Some example deliverables would be + * standalone TCKs, the CTS, the JDBC test suite, etc. + * + * @author Kyle Grucci + */ +public interface DeliverableInterface { + + /** + * This method is called to retrieve a reference to this Deliverable's PropertyManager. If the PropertyManager instance + * does not yet exist, one will be created from the Properties object. + * + * @param p - Properties specific to the currently running test + * @return PropertyManagerInterface impl. + */ + public PropertyManagerInterface createPropertyManager(Properties p) throws Exception; + + /** + * This method is called to retrieve a reference to this Deliverable's PropertyManager. + * + * @return PropertyManagerInterface impl. + */ + public PropertyManagerInterface getPropertyManager() throws Exception; + + /** + * This method is called to determine the vehicles to use for given test directories. + * + * @return A mapping between test directories and vehicles. + */ + public Map getValidVehicles(); + + /** + * This method is called to determine the direction to run any interop tests The default for any tests if forward. + * + * @return A mapping between test directories and directions. + */ + public Map getInteropDirections(); + + /** + * This method is called by the SuiteSynchronizer class to determine whether autodeployment is supported by this + * deliverable. + * + * @return True if supported, else false. + */ + public boolean supportsAutoDeployment(); + + /** + * This method is called by the SuiteSynchronizer class to determine whether interop tests are supported by this + * deliverable. + * + * @return True if supported, else false. + */ + public boolean supportsInterop(); + + /** + * This method is called by the SuiteSynchronizer class to determine whether JMS topic/queue/factory admin is supported + * by this deliverable. + * + * @return True if supported, else false. + */ + public boolean supportsAutoJMSAdmin(); + + /** + * This method is called by the TSScript class, which appends the returned string to the classpath specified in the + * testExecute commandline. + * + * @param distDir The dist directory for the currently running test. + * + * @return Returns a String which will be appended to the classpath specified in the testExecute commandline. + */ + public String getAdditionalClasspath(String distDir); + + /** + * This method is called by the SuiteSynchronizer class to get a DeploymentInfo Object. Other deliverables may use this + * method to subclass the standard DeploymentInfo class. + * + * @param earFile The archive being deployed + * @param sValidRuntimeInfoFilesArray An array of Sun RI runtime xml + * + * @return This method should return a DeploymentInfo object + */ + public DeploymentInfo getDeploymentInfo(String earFile, String[] sValidRuntimeInfoFilesArray); +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java new file mode 100644 index 0000000000..1630c8a4e4 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyManagerInterface.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.deliverable; + +import java.util.Properties; + +/** + * This class serves as a well known place for harness, util, and porting classes to retrieve property values. + * + * @author Kyle Grucci + */ +public interface PropertyManagerInterface { + + /** + * This method swaps all of the following interop values in TSPropertyManager... + * + */ + public void swapInteropPropertyValues(String sDirection); + + /** + * gets a new properties containing all entries in the property manager. Any operation on the returned properties will + * have no effect on property manager + */ + public Properties getJteProperties(); + + /** + * gets property value with default + * + * @param sKey - Property to retrieve + * @param def - default value to use + * @return String - property value + */ + public String getProperty(String sKey, String def); + + /** + * This method is called to get a property value + * + * @param sKey - Property to retrieve + * @return String - property value + */ + public String getProperty(String sKey) throws PropertyNotSetException; + + /** + * This method is called to set a property on the property manager + * + * @param sKey - key to be used + * @param sVal - value to use + */ + public void setProperty(String sKey, String sVal); + + /** + * This method is called by the test harness to retrieve all properties needed by a particular test. + * + * @param sPropKeys - Properties to retrieve + * @return Properties - property/value pairs + */ + public Properties getTestSpecificProperties(String[] sPropKeys) throws PropertyNotSetException; +} diff --git a/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java similarity index 91% rename from runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java rename to tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java index 47a861c0a9..9957058388 100644 --- a/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java +++ b/tools/runtime/src/main/java/com/sun/ts/lib/deliverable/PropertyNotSetException.java @@ -17,7 +17,7 @@ package com.sun.ts.lib.deliverable; public class PropertyNotSetException extends java.lang.Exception { - public PropertyNotSetException(String s) { - super(s); - } + public PropertyNotSetException(String s) { + super(s); + } } diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java new file mode 100644 index 0000000000..f399d01f17 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/DeploymentInfo.java @@ -0,0 +1,136 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * Provides all information required to deploy an application on a server. Much of this information is extracted from + * runtime xml files. The following information is provided: + *
    + *
  • EJB Jar info
  • + *
  • Web Resources - Display name, context root, resource references and ejb references for each web resource in this + * ear.
  • + *
  • EJB Resources - Name, JNDI name, resource references, ejb references, and CMP information for each ejb resource + * in this ear.
  • + *
  • Resource References - For each resource reference, the JNDI name, default resource principal name and password, + * and any mail configuration information is provided.
  • + *
  • EJB References - For each EJB reference, the EJB name and its corresponding JNDI name is provided.
  • + *
+ *

+ * See: javaee.home.ri/lib/dtds/sun-application_5_0-0.dtd javaee.home.ri/lib/dtds/sun-application-client_5_0-0.dtd + * javaee.home.ri/lib/dtds/sun-ejb-jar_3_0-0.dtd javaee.home.ri/lib/dtds/sun-web-app_2_5-0.dtd for more and updated + * information. + * + */ + +public interface DeploymentInfo extends java.io.Serializable { + /** + * Sets the value of the given property. This method should be temporary, until all important information can be + * provided by the API. + */ + public void setProperty(String key, String value); + + /** + * Returns the value of the given property. This method should be temporary, until all important information can be + * provided by the API. + */ + public String getProperty(String key); + + /** + * Sets/gets an array of deploymentInfo objects from previously deployed apps in the currrent directory along with all + * common apps + */ + public void setPreviousInfos(DeploymentInfo[] infos); + + public DeploymentInfo[] getPreviousInfos(); + + /** + * Returns the ear file to deploy + */ + public String getEarFile(); + + /** + * Returns the list of runtime files to be deployed + */ + public String[] getRuntimeFiles(); + + /** + * Returns a Map that maps runtimne deployment descriptor filename Strings to concrete implementations of the + * com.sun.ts.lib.porting.ejb.SunEjbJar interface. + */ + public Map getEjbRuntimeData(); + + /** + * Returns a Map that maps runtimne deployment descriptor filename Strings to concrete implementations of the + * com.sun.ts.lib.porting.web.SunWebApp interface. + */ + public Map getWebRuntimeData(); + + /** + * Returns a Map that maps runtimne deployment descriptor filename Strings to concrete implementations of the + * com.sun.ts.lib.porting.app.SunApplication interface. + */ + public Map getAppRuntimeData(); + + /** + * Returns a Map that maps runtimne deployment descriptor filename Strings to concrete implementations of the + * com.sun.ts.lib.porting.appclient.SunApplicationClient interface. + */ + public Map getAppClientRuntimeData(); + + /** + * Returns a List of concrete implementations of the com.sun.ts.lib.porting.appclient.SunApplicationClient interface. + */ + public List getAppClientRuntimeDDs(); + + /** + * Returns a List of concrete implementations of the com.sun.ts.lib.porting.app.SunApplication interface. + */ + public List getAppRuntimeDDs(); + + /** + * Returns a List of concrete implementations of the com.sun.ts.lib.porting.web.SunWebApp interface. + */ + public List getWebRuntimeDDs(); + + /** + * Returns a List of concrete implementations of the com.sun.ts.lib.porting.ejb.SunEjbJar interface. + */ + public List getEjbRuntimeDDs(); + + /** + * Returns a String that conatains the contents of all the runtime XML files. + */ + public String getContentAsXml(); + + /** + * Exception thrown if an error occured parsing the XML + */ + public class ParseException extends Exception implements Serializable { + public ParseException(String message) { + super(message); + } + } + +} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/README b/tools/runtime/src/main/java/com/sun/ts/lib/porting/README similarity index 100% rename from runtime/src/main/java/com/sun/ts/lib/porting/README rename to tools/runtime/src/main/java/com/sun/ts/lib/porting/README diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java new file mode 100644 index 0000000000..0cdb7eeb0f --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeployment.java @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import com.sun.ts.lib.deliverable.DeliverableFactory; +import com.sun.ts.lib.deliverable.PropertyManagerInterface; + +import java.io.PrintWriter; + +/** + * This is a factory class for creating instances of TSDeploymentInterface. The implementation classes used are + * determined by the values of the porting package properties in TS_HOME/bin/ts.jte. + * + * @author Kyle Grucci + */ +public class TSDeployment { + private static PropertyManagerInterface propMgr = null; + + public static int iPortingSet = 1; + + public static TSDeploymentInterface getDeploymentInstance(PrintWriter writer, String sClassName) throws Exception { + return createInstance(sClassName, writer); + } + + private static TSDeploymentInterface createInstance(String sClassName, PrintWriter writer) throws Exception { + try { + propMgr = DeliverableFactory.getDeliverableInstance().getPropertyManager(); + + // create and initialize a new instance of the Deployment class + Class c = Class.forName(propMgr.getProperty(sClassName)); + TSDeploymentInterface ctsDep1 = (TSDeploymentInterface) c.newInstance(); + + // set static prop so porting impls in the same VM can look it up + iPortingSet = Integer.parseInt(sClassName.substring(sClassName.lastIndexOf(".") + 1)); + + // tell this 88 class which porting set of props we are using + // (1 or 2) + // if(ctsDep1 instanceof + // com.sun.ts.lib.deliverable.cts.deploy.StandardDeployment14) + // { + // ((com.sun.ts.lib.deliverable.cts.deploy.StandardDeployment14)ctsDep1).setFirstLevelPortingSet(Integer.parseInt(sClassName.substring(sClassName.lastIndexOf(".")+1))); + // } + + ctsDep1.init(writer); + + return ctsDep1; + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } +} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java similarity index 79% rename from runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java rename to tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java index f95e936362..31500b71bd 100644 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentException.java @@ -21,15 +21,15 @@ package com.sun.ts.lib.porting; public class TSDeploymentException extends java.lang.Exception { - public TSDeploymentException() { - super(); - } + public TSDeploymentException() { + super(); + } - public TSDeploymentException(String s) { - super(s); - } + public TSDeploymentException(String s) { + super(s); + } - public TSDeploymentException(String s, Throwable e) { - super(s); - } + public TSDeploymentException(String s, Throwable e) { + super(s); + } } diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java new file mode 100644 index 0000000000..329e2da5ff --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSDeploymentInterface.java @@ -0,0 +1,146 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import java.io.PrintWriter; +import java.util.Hashtable; +import java.util.Properties; + +/** + * An implementation of the TSDeploymentInterface can be provided by a Jakarta EE implementation, to support their own + * deploy/undeploy semantics. + * + * Jakarta EE implementations that previously depended on Pruned Jakarta Deployment, should also use + * TSDeploymentInterface instead of com.sun.ts.lib.porting.TSDeploymentInterface2. + * + * @author Kyle Grucci + */ +public interface TSDeploymentInterface { + /** + * Initializes a new TSDeployment instance. All output should be printed to this PrintWriter. All properties in the + * ts.jte file are accessible to this porting implementation class only via the TSPropertyManager class. Please see + * Sun's implementation of this method for an example. + * + * @param writer The PrintWriter that should be used to log output. + */ + public void init(PrintWriter writer); + + /** + * This method is called by the test harness to deploy an .ear file into your Java EE implementation. We extract such + * info as the app earfile from the provided deployment information. The following properties are available for this + * method's use: + *

+ * generateSQL - "true" if SQL is to be generated for CMP beans + *

+ *

+ * deployment_host - the host where this app is to be deployed + *

+ * + * All additional information is queryable from the DeploymentInfo interface. + * + * @param info Object containing necessary deployment info. + * @return This method should return a string which is formatted such that it can be appended to the classpath. your + * Java EE implementation returns the fully qualified path to a jar file, which contains the generated ejb stub classes, + * which are used by any appclient tests (tests whose client directly uses an ejb). + */ + public String deploy(DeploymentInfo info) throws TSDeploymentException; + + /** + * This method is called by test harness to undeploy an .ear file from your Java EE implementation. We extract such info + * as host and app from these props. The following properties are available for this method 's use: + * + * ear_file - the fully qualified application (.ear file) deployment_host - the host to undeploy this app from + * + * @param p Properties specific to the currently running test + */ + public void undeploy(Properties p) throws TSDeploymentException; + + /** + * This method is called by the test harness to check whether or not an application ear is deployed. This information is + * used to determine whether or not the harness needs to undeploy it. The following properties are available for this + * method's use: + * + * ear_file - the fully qualified application (.ear file) deployment_host - the host where this app is deployed + * + * @param p Properties specific to the currently running test + * @return True if the app is deployed. False if not. + */ + public boolean isDeployed(Properties p) throws TSDeploymentException; + + /** + * This method is called to deploy a connector (.rar file) to your Java EE implementation. We extract such info as + * deployment_host and rar_file from these props. The following properties are available for this method's use: + * + * rar_file - the fully qualified connector file (.rar file) deployment_host - the host name of the machine to deploy it + * to + * + * @param p Properties specific to the currently running test + */ + public void deployConnector(Properties p) throws TSDeploymentException; + + /** + * This method is called to undeploy a connector (.rar file) from your Java EE implementation. We extract such info as + * deployment_host and rar_file from these props. The following properties are available for this method's use: + * + * rar_file - the fully qualified connector file (.rar file) deployment_host - the host name of the machine to undeploy + * it from + * + * @param p Properties specific to the currently running test + */ + public void undeployConnector(Properties p) throws TSDeploymentException; + + /** + * This method is called to check to see if a given connector (.rar file) is deployed on your Java EE implementation. We + * extract such info as deployment_host and rar_file from these props. The following properties are available for this + * method's use: + * + * rar_file - the fully qualified connector file (.rar file) deployment_host - the host name of the machine to deploy it + * to + * + * @param p Properties specific to the currently running test + * @return True if the app is deployed. False if not. + */ + public boolean isConnectorDeployed(Properties p) throws TSDeploymentException; + + /** + * This method is called by the test harness to get any additional test specific arguments that must be passed to the + * application client container class, which is specified in the ts.jte file in the given environment + * (command.testExecuteAppClient property). The additional args should be appended to the value of + * (p.getProperty("executeArgs");), and returned. The following properties are available for this method's use: + * + * executeArgs - the current executeArgs as specified in the jte file + * + * @param p Properties specific to the currently running test + * @return This method should return a string which represents all executeArgs to be used. + */ + public String getAppClientArgs(Properties p); + + /** + * This method is called by the test harness to get the corba JNDI names to use in an interop scenario. This method + * should return a hashtable of mappings for any EJB references in the array of DeploymentInfo objects where: + * + * key = original corbaname JNDI name in the RI format value = vendor corbaname JNDI name in the Vendor format + * + * @param infoArray Array of DeploymentInfo objects for the ear files associated with a particular directory + * @return Hashtable This method should return a Hashtable of mappings (see above) + */ + public Hashtable getInteropJNDINames(DeploymentInfo[] infoArray); +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java new file mode 100644 index 0000000000..9eee4ea95b --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnection.java @@ -0,0 +1,184 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +/* + * @(#)TSHttpsURLConnection.java 1.7 02/06/17 + */ + +package com.sun.ts.lib.porting; + +import com.sun.ts.lib.util.TestUtil; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; + +/** + * TSHttpsURLConnection provides the HTTPS specific featurs + * + */ +public class TSHttpsURLConnection implements TSHttpsURLConnectionInterface { + private TSHttpsURLConnectionInterface tsHttpsURLConnection = null; + + private String sClass = "porting.ts.HttpsURLConnection.class.1"; + + /** + * Instantiates the class defined in porting.ts.HttpsURLConnection.class.1 + */ + public TSHttpsURLConnection() { + + if (tsHttpsURLConnection == null) { + try { + + Class c = Class.forName(TestUtil.getProperty(sClass)); + + tsHttpsURLConnection = (TSHttpsURLConnectionInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + /** + * Instantiates the class defined by sClass + * + * @param sClass - this class is used to instantiate implementation specific HttpsURLConnection class + */ + public TSHttpsURLConnection(String sClass) { + + if (tsHttpsURLConnection == null) { + try { + + Class c = Class.forName(TestUtil.getProperty(sClass)); + + tsHttpsURLConnection = (TSHttpsURLConnectionInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + + /** + * Sets the value of the doInput field for this Connection + * + * @param doInput - the new value (the default is false) + */ + @Override + public void setDoInput(boolean doInput) { + tsHttpsURLConnection.setDoInput(doInput); + } + + /** + * Sets the value of the doOutput field for this Connection + * + * @param doOutput - the new value (the default is false) + */ + @Override + public void setDoOutput(boolean doOutput) { + tsHttpsURLConnection.setDoOutput(doOutput); + } + + /** + * Sets the value of the useCaches field for this Connection If the UseCaches flag on the connection is true, the + * connection is allowed to use whatever caches it can. If false, caches are to be ignored. The default value is set to + * true + * + * @param usecaches - the new value (the default is true) + */ + @Override + public void setUseCaches(boolean usecaches) { + tsHttpsURLConnection.setUseCaches(usecaches); + } + + /** + * Sets the general request property. If a property with the key already exists, overwrite its value with the new value. + * + * @param key - the keyword by which the request is known + * @param value - the value associated with it + */ + @Override + public void setRequestProperty(String key, String value) { + tsHttpsURLConnection.setRequestProperty(key, value); + } + + /** + * Returns the value of the named header field. If called on a connection that sets the same header multiple times only + * the last value is returned. + * + * @param name - the name of the header field. + * @return String - the value of the named header field, or null if there is no such field in the header. + */ + @Override + public String getHeaderField(String name) { + return tsHttpsURLConnection.getHeaderField(name); + } + + /** + * Returns the value for the nth header field. It returns null if there are fewer than n fields + * + * @param num - Integer num + * @return String - returns the value of the nth header field + */ + @Override + public String getHeaderField(int num) { + return tsHttpsURLConnection.getHeaderField(num); + } + + /** + * Disconnect connection + */ + @Override + public void disconnect() { + tsHttpsURLConnection.disconnect(); + } + + /** + * Returns an input stream that reads from the open connection + * + * @return InputStream - inputStream + */ + @Override + public InputStream getInputStream() throws IOException { + return tsHttpsURLConnection.getInputStream(); + } + + /** + * Returns an Output stream that writes to the open connection + * + * @return OutputStream - outputStream + */ + @Override + public OutputStream getOutputStream() throws IOException { + return tsHttpsURLConnection.getOutputStream(); + } + + /** + * Initializes HttpsURLConnection + * + * @param url url used to open HttpsURLConnection + */ + @Override + public void init(URL url) throws IOException { + tsHttpsURLConnection.init(url); + } + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java new file mode 100644 index 0000000000..5d796f4751 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSHttpsURLConnectionInterface.java @@ -0,0 +1,113 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.porting; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.net.URL; + +/** + * This is the TSHttpsURLConnectionInterface. An implementation of this interface must be provided by each Java EE + * implementation, to support https url connection. + * + */ +public interface TSHttpsURLConnectionInterface { + /** + * Sets the value of the doInput field for this URLConnection to the specified value. + * + * A URL connection can be used for input and/or output. Set the DoInput flag to true if you intend to use the URL + * connection for input, false if not. The default is true. + * + * + * @param doInput a boolean indicating whether the URL connection is used for input or not + */ + public void setDoInput(boolean doInput); + + /** + * Sets the value of the doOutput field for this URLConnection to the specified value. + * + * A URL connection can be used for input and/or output. Set the DoOutput flag to true if you intend to use the URL + * connection for output, false if not. The default is false. + * + * @param doOutput a boolean indicating whether the URL connection is used for output or not + */ + public void setDoOutput(boolean doOutput); + + /** + * Sets the value of the useCaches field of this URLConnection to the specified value. + * + * Some protocols do caching of documents. Occasionally, it is important to be able to "tunnel through" and ignore the + * caches (e.g., the "reload" button in a browser). If the UseCaches flag on a connection is true, the connection is + * allowed to use whatever caches it can. If false, caches are to be ignored. The default value is true + * + * @param usecaches a boolean indicating whether or not to allow caching + */ + public void setUseCaches(boolean usecaches); + + /** + * Sets the general request property. If a property with the key already exists, overwrite its value with the new value. + * + * @param key the keyword by which the request is known + * @param value the value associated with it + */ + public void setRequestProperty(String key, String value); + + /** + * Returns the value of the named header field. If called on a connection that sets the same header multiple times only + * the last value is returned. + * + * @param name the name of the header field. + * @return String the value of the named header field, or null if there is no such field in the header. + */ + public String getHeaderField(String name); + + /** + * Returns the value for the nth header field. It returns null if there are fewer than n fields + * + * @param num Integer num + * @return String returns the value of the nth header field + */ + public String getHeaderField(int num); + + /** + * Disconnects connection + */ + public void disconnect(); + + /** + * Returns an input stream that reads from the open connection + * + * @return InputStream inputStream + */ + public InputStream getInputStream() throws IOException; + + /** + * Returns an Output stream that writes to the open connection + * + * @return OutputStream - OutputStream + */ + public OutputStream getOutputStream() throws IOException; + + /** + * Initializes HttpsURLConnection + * + * @param url url used to open HttpsURLConnection + */ + public void init(URL url) throws IOException; + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java new file mode 100644 index 0000000000..2257243a15 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdmin.java @@ -0,0 +1,393 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import com.sun.ts.lib.deliverable.DeliverableFactory; +import com.sun.ts.lib.deliverable.PropertyManagerInterface; +import com.sun.ts.lib.util.TestUtil; + +import java.io.File; +import java.io.PrintWriter; +import java.util.Hashtable; + +/** + * This class acts as a Factory object for creating an implementation specific instance of the TSJMSAdminInterface based + * on the value of the ts.jte property, porting.ts.jms.class.1 + * + * @author Kyle Grucci + */ +public class TSJMSAdmin { + private static PropertyManagerInterface propMgr = null; + + private static Hashtable htQueues1 = null; + + private static Hashtable htTopics1 = null; + + private static Hashtable htQueues2 = null; + + private static Hashtable htTopics2 = null; + + private static Hashtable htTopicConnectionFactories1 = null; + + private static Hashtable htQueueConnectionFactories1 = null; + + private static Hashtable htConnectionFactories1 = null; + + private static Hashtable htTopicConnectionFactories2 = null; + + private static Hashtable htQueueConnectionFactories2 = null; + + private static Hashtable htConnectionFactories2 = null; + + /* List of prefixes for test directories using JMS factories */ + private static String factTestPrefixes[] = { "jms", "ejb", "ejb30", + "jsp" + File.separator + "spec" + File.separator + "tagext" + File.separator + "resource", + "appclient" + File.separator + "deploy" + File.separator + "resref", + "servlet" + File.separator + "spec" + File.separator + "annotation", + "servlet" + File.separator + "platform" + File.separator + "deploy" + File.separator + "resref", + "webservices" + File.separator + "handler" + File.separator + "localtx", + "webservices" + File.separator + "handlerEjb" + File.separator + "localtx", }; + + public static TSJMSAdminInterface getTSJMSAdminInstance(PrintWriter writer, String sClassName) throws Exception { + return createInstance(sClassName, writer); + } + + private static TSJMSAdminInterface createInstance(String sClassName, PrintWriter writer) throws Exception { + try { + propMgr = DeliverableFactory.getDeliverableInstance().getPropertyManager(); + // create and initialize a new instance of the Deployment class + Class c = Class.forName(propMgr.getProperty(sClassName)); + TSJMSAdminInterface ctsJMS = (TSJMSAdminInterface) c.newInstance(); + ctsJMS.init(writer); + return ctsJMS; + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } + + /** + * Return true if a run of test directory 'sDir' requires preliminary creation of JMS factories. + */ + public static boolean requiresJmsFactories(String sDir) { + String prefix = "tests" + File.separator; + for (String element : factTestPrefixes) { + if (-1 != sDir.indexOf(prefix + element)) { + return true; + } + } + return false; + } + + public static Hashtable getQueueConnectionFactories(int iServer) { + if (iServer == 2) { + return htQueueConnectionFactories2; + } else { + return htQueueConnectionFactories1; + } + } + + public static Hashtable getTopicConnectionFactories(int iServer) { + if (iServer == 2) { + return htTopicConnectionFactories2; + } else { + return htTopicConnectionFactories1; + } + } + + public static Hashtable getConnectionFactories(int iServer) { + if (iServer == 2) { + return htConnectionFactories2; + } else { + return htConnectionFactories1; + } + } + + public static String[] getQueues(String sPath, int iServer) { + Hashtable htQueues = htQueues1; + String sRelativeTestPath = convertSlashesToDashes(sPath); + String[] sVal2 = null; + String sRelativeTestPathCopy = sRelativeTestPath; + TestUtil.logHarnessDebug("getQueues: iServer = " + iServer); + if (iServer == 2) { + htQueues = htQueues2; + } + do { + // get overridden vehicles property if it exists, otherwise + // return null + TestUtil.logHarnessDebug("getQueues: going to check sRelativeTestPathCopy = " + sRelativeTestPathCopy); + sVal2 = (String[]) htQueues.get(sRelativeTestPathCopy); + TestUtil.logHarnessDebug("getQueues: sVal2 = " + sVal2); + if (sVal2 == null) { + // do nothing + } else { + for (int ii = 0; ii < sVal2.length; ii++) { + TestUtil.logHarnessDebug("getQueuesToCreate: " + "vehicle[" + ii + "] = " + sVal2[ii]); + } + } + } while ((sRelativeTestPathCopy = getNextLevelUp(sRelativeTestPathCopy)) != null && sVal2 == null); + TestUtil.logHarnessDebug("getQueues: returning sVal2 = " + sVal2); + return sVal2; + } + + public static String[] getTopics(String sPath, int iServer) { + Hashtable htTopics = htTopics1; + String sRelativeTestPath = convertSlashesToDashes(sPath); + String[] sVal2 = null; + String sRelativeTestPathCopy = sRelativeTestPath; + TestUtil.logHarnessDebug("getTopics: iServer = " + iServer); + if (iServer == 2) { + htTopics = htTopics2; + } + do { + // get overridden vehicles property if it exists, otherwise + // return null + TestUtil.logHarnessDebug("getTopics: going to check sRelativeTestPathCopy = " + sRelativeTestPathCopy); + sVal2 = (String[]) htTopics.get(sRelativeTestPathCopy); + TestUtil.logHarnessDebug("getTopics: sVal2 = " + sVal2); + if (sVal2 == null) { + // do nothing + } else { + for (int ii = 0; ii < sVal2.length; ii++) { + TestUtil.logHarnessDebug("getQueuesToCreate: " + "vehicle[" + ii + "] = " + sVal2[ii]); + } + } + } while ((sRelativeTestPathCopy = getNextLevelUp(sRelativeTestPathCopy)) != null && sVal2 == null); + TestUtil.logHarnessDebug("getTopics: returning sVal2 = " + sVal2); + return sVal2; + } + + private static String getNextLevelUp(String sDottedPath) { + int index = 0; + String sNewPath = null; + index = sDottedPath.lastIndexOf("-"); + if (index != -1) { + sNewPath = sDottedPath.substring(0, index); + } + return sNewPath; + } + + private static String convertSlashesToDashes(String sTestDir) { + String sRelativeTestPath = ""; + TestUtil.logHarnessDebug("sTestDir = " + sTestDir); + sRelativeTestPath = (sTestDir.substring(sTestDir.indexOf(File.separator + "ts" + File.separator + "tests" + File.separator) + 4)) + .replace(File.separatorChar, '-'); + TestUtil.logHarnessDebug("sRelativeTestPath = " + sRelativeTestPath); + return sRelativeTestPath; + } + + static { + // for server 1 + htQueues1 = new Hashtable(); + htTopics1 = new Hashtable(); + htTopicConnectionFactories1 = new Hashtable(); + htQueueConnectionFactories1 = new Hashtable(); + htConnectionFactories1 = new Hashtable(); + // for server 2 + htQueues2 = new Hashtable(); + htTopics2 = new Hashtable(); + htTopicConnectionFactories2 = new Hashtable(); + htQueueConnectionFactories2 = new Hashtable(); + htConnectionFactories2 = new Hashtable(); + // connection factories and associated properties to create + htTopicConnectionFactories1.put("jms/TopicConnectionFactory", ""); + htTopicConnectionFactories1.put("jms/DURABLE_SUB_CONNECTION_FACTORY", "clientId=cts"); + htTopicConnectionFactories1.put("jms/MDBTACCESSTEST_FACTORY", "clientId=cts1"); + htTopicConnectionFactories1.put("jms/DURABLE_BMT_CONNECTION_FACTORY", "clientId=cts2"); + htTopicConnectionFactories1.put("jms/DURABLE_CMT_CONNECTION_FACTORY", "clientId=cts3"); + htTopicConnectionFactories1.put("jms/DURABLE_BMT_XCONNECTION_FACTORY", "clientId=cts4"); + htTopicConnectionFactories1.put("jms/DURABLE_CMT_XCONNECTION_FACTORY", "clientId=cts5"); + htTopicConnectionFactories1.put("jms/DURABLE_CMT_TXNS_XCONNECTION_FACTORY", "clientId=cts6"); + htQueueConnectionFactories1.put("jms/QueueConnectionFactory", ""); + htConnectionFactories1.put("jms/ConnectionFactory", ""); + // add default values + htQueues1.put("tests-jms-ee-mdb", new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-xa", + new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_xa_MDB_QUEUE_CMT", "jms_ee_mdb_xa_MDB_QUEUE_BMT" }); + htQueues1.put("tests-jms-ee-mdb-mdb_msgHdrQ", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgHdrQ_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_msgPropsQ", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgPropsQ_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ1", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ1_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ2", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ2_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_msgTypesQ3", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_msgTypesQ3_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_rec", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_rec_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_sndQ", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_sndQ_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_sndToQueue", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_sndToQueue_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_synchrec", + new String[] { "MDB_QUEUE", "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_synchrec_MDB_QUEUE" }); + htQueues1.put("tests-jms-ee-mdb-mdb_exceptQ", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_exceptQ_MDB_QUEUE_CMT", + "jms_ee_mdb_mdb_exceptQ_MDB_QUEUE_BMT", "jms_ee_mdb_mdb_exceptQ_MDB_QUEUETXNS_CMT" }); + htQueues1.put("tests-jms-ee-mdb-mdb_exceptT", new String[] { "MDB_QUEUE_REPLY", "jms_ee_mdb_mdb_exceptT_MDB_QUEUE_CMT", + "jms_ee_mdb_mdb_exceptT_MDB_QUEUE_BMT", "jms_ee_mdb_mdb_exceptT_MDB_QUEUETXNS_CMT" }); + htQueues1.put("tests-jms-core", new String[] { "MY_QUEUE", "MY_QUEUE2" }); + htQueues1.put("tests-jms-core20", new String[] { "MY_QUEUE", "MY_QUEUE2" }); + htQueues1.put("tests-jms-ee-ejb", new String[] { "MY_QUEUE" }); + htQueues1.put("tests-jms-ee-ejbweb-xa", new String[] { "QUEUE_BMT" }); + htQueues1.put("tests-jms-ee-appclient", new String[] { "MY_QUEUE" }); + htQueues1.put("tests-jms-ee-appclient-queuetests", new String[] { "MY_QUEUE", "testQueue2", "testQ0", "testQ1", "testQ2" }); + htQueues1.put("tests-jms-ee-appclient-txqueuetests", new String[] { "MY_QUEUE", "Q2" }); + // local access tests + htQueues1.put("tests-ejb-ee-bb-localaccess-mdbqaccesstest", + new String[] { "ejb_ee_bb_localaccess_mdbqaccesstest_MDB_QUEUE", "MDB_QUEUE_REPLY" }); + htQueues1.put("tests-ejb-ee-bb-localaccess-mdbtaccesstest", new String[] { "MDB_QUEUE_REPLY" }); + htQueues1.put("tests-ejb-ee-sec-stateful-mdb", new String[] { "MDB_QUEUE_REPLY", "ejb_ee_sec_stateful_mdb_MDB_QUEUE" }); + htQueues1.put("tests-ejb-ee-sec-mdb", new String[] { "MDB_QUEUE_REPLY", "ejb_sec_mdb_MDB_QUEUE_BMT", "ejb_sec_mdb_MDB_QUEUE_CMT" }); + + /* + * Queues for ejb/ee/timer sub-tree + */ + htQueues1.put("tests-ejb-ee-timer", new String[] { "MY_QUEUE", "ejb_ee_timer_mdb_MsgBean" }); + + /* + * Queues for ejb/ee/deploy sub-tree + */ + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-single", + new String[] { "ejb_ee_deploy_mdb_enventry_single_AllBean", "ejb_ee_deploy_mdb_enventry_single_StringBean", + "ejb_ee_deploy_mdb_enventry_single_BooleanBean", "ejb_ee_deploy_mdb_enventry_single_ByteBean", + "ejb_ee_deploy_mdb_enventry_single_ShortBean", "ejb_ee_deploy_mdb_enventry_single_IntegerBean", + "ejb_ee_deploy_mdb_enventry_single_LongBean", "ejb_ee_deploy_mdb_enventry_single_FloatBean", + "ejb_ee_deploy_mdb_enventry_single_DoubleBean", "ejb_ee_deploy_mdb_enventry_single_AllBeanBMT", + "ejb_ee_deploy_mdb_enventry_single_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-scope", + new String[] { "ejb_ee_deploy_mdb_enventry_scope_Bean1_SameJar", "ejb_ee_deploy_mdb_enventry_scope_Bean2_SameJar", + "ejb_ee_deploy_mdb_enventry_scope_Bean1_MultiJar", "ejb_ee_deploy_mdb_enventry_scope_Bean2_MultiJar", + "ejb_ee_deploy_mdb_enventry_scope_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-casesens", new String[] { "ejb_ee_deploy_mdb_enventry_casesens_CaseBean", + "ejb_ee_deploy_mdb_enventry_casesens_CaseBeanBMT", "ejb_ee_deploy_mdb_enventry_casesens_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-single", new String[] { "ejb_ee_deploy_mdb_ejbref_single_TestBean", + "ejb_ee_deploy_mdb_ejbref_single_TestBeanBMT", "ejb_ee_deploy_mdb_ejbref_single_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-scope", + new String[] { "ejb_ee_deploy_mdb_ejbref_scope_Romeo", "ejb_ee_deploy_mdb_ejbref_scope_Tristan", + "ejb_ee_deploy_mdb_ejbref_scope_Cyrano", "ejb_ee_deploy_mdb_ejbref_scope_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-casesens", + new String[] { "ejb_ee_deploy_mdb_ejbref_casesens_TestBean", "ejb_ee_deploy_mdb_ejbref_casesens_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-single", new String[] { "ejb_ee_deploy_mdb_ejblink_single_TestBean", + "ejb_ee_deploy_mdb_ejblink_single_TestBeanBMT", "ejb_ee_deploy_mdb_ejblink_single_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-scope", + new String[] { "ejb_ee_deploy_mdb_ejblink_scope_TestBean", "ejb_ee_deploy_mdb_ejblink_scope_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-casesens", + new String[] { "ejb_ee_deploy_mdb_ejblink_casesens_TestBean", "ejb_ee_deploy_mdb_ejblink_casesens_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-resref-single", + new String[] { "ejb_ee_deploy_mdb_resref_single_TestBean", "ejb_ee_deploy_mdb_resref_single_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-singleT", new String[] { "ejb_ee_deploy_mdb_enventry_singleT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-scopeT", new String[] { "ejb_ee_deploy_mdb_enventry_scopeT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-enventry-casesensT", new String[] { "ejb_ee_deploy_mdb_enventry_casesensT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-singleT", new String[] { "ejb_ee_deploy_mdb_ejbref_singleT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-scopeT", new String[] { "ejb_ee_deploy_mdb_ejbref_scopeT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejbref-casesensT", new String[] { "ejb_ee_deploy_mdb_ejbref_casesensT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-singleT", new String[] { "ejb_ee_deploy_mdb_ejblink_singleT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-scopeT", new String[] { "ejb_ee_deploy_mdb_ejblink_scopeT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-ejblink-casesensT", new String[] { "ejb_ee_deploy_mdb_ejblink_casesensT_ReplyQueue" }); + htQueues1.put("tests-ejb-ee-deploy-mdb-resref-singleT", new String[] { "ejb_ee_deploy_mdb_resref_singleT_ReplyQueue" }); + + /* + * Queues for ejb30 sub-tree + */ + htQueues1.put("tests-ejb30-bb-session-stateless-annotation", new String[] { "MY_QUEUE" }); + htQueues1.put("tests-ejb30-bb-mdb", new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-tx-mdb", new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-bb-localaccess-mdbclient", new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-timer-basic-mdb", new String[] { "MDB_QUEUE_REPLY", "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-zombie", new String[] { "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-assembly-appres", new String[] { "MDB_QUEUE_REPLY" }); + htQueues1.put("tests-ejb30-timer-interceptor-business-mdb", new String[] { "MDB_QUEUE" }); + htQueues1.put("tests-ejb30-timer-schedule-auto-attr-mdb", new String[] { "MDB_QUEUE" }); + + /* + * Queue for servlet sub-tree + */ + htQueues1.put("tests-servlet-spec-annotation", new String[] { "MY_QUEUE" }); + + /* + * Queues for jsp sub-tree + */ + htQueues1.put("tests-jsp-spec-tagext-resource", new String[] { "MY_QUEUE" }); + + /* + * Queues for webservices sub-tree + */ + htQueues1.put("tests-webservices-handler-localtx", new String[] { "MY_QUEUE" }); + htQueues1.put("tests-webservices-handlerEjb-localtx", new String[] { "MY_QUEUE" }); + + // add default values + htTopics1.put("tests-jms-ee-mdb-mdb_sndToTopic", + new String[] { "jms_ee_mdb_mdb_sndToTopic_MDB_TOPIC_REPLY", "jms_ee_mdb_mdb_sndToTopic_MDB_TOPIC" }); + htTopics1.put("tests-jms-core", new String[] { "MY_TOPIC", "MY_TOPIC2" }); + htTopics1.put("tests-jms-core20", new String[] { "MY_TOPIC", "MY_TOPIC2" }); + htTopics1.put("tests-jms-ee-ejb", new String[] { "MY_TOPIC" }); + htTopics1.put("tests-jms-ee-ejbweb-xa", new String[] { "TOPIC_BMT" }); + htTopics1.put("tests-jms-ee-appclient", new String[] { "MY_TOPIC" }); + htTopics1.put("tests-jms-ee-appclient-topictests", new String[] { "MY_TOPIC", "MY_TOPIC2" }); + htTopics1.put("tests-jms-ee-appclient-txtopictests", new String[] { "MY_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-xa", new String[] { "jms_ee_mdb_xa_MDB_DURABLE_BMT", "jms_ee_mdb_xa_MDB_DURABLE_CMT" }); + htTopics1.put("tests-jms-ee-mdb-mdb_exceptT", new String[] { "jms_ee_mdb_mdb_exceptT_MDB_DURABLE_BMT", + "jms_ee_mdb_mdb_exceptT_MDB_DURABLE_CMT", "jms_ee_mdb_mdb_exceptT_MDB_DURABLETXNS_CMT" }); + htTopics1.put("tests-jms-ee-mdb-mdb_msgHdrT", new String[] { "jms_ee_mdb_mdb_msgHdrT_MDB_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-mdb_msgPropsT", new String[] { "jms_ee_mdb_mdb_msgPropsT_MDB_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT1", new String[] { "jms_ee_mdb_mdb_msgTypesT1_MDB_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT2", new String[] { "jms_ee_mdb_mdb_msgTypesT2_MDB_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-mdb_msgTypesT3", new String[] { "jms_ee_mdb_mdb_msgTypesT3_MDB_TOPIC" }); + htTopics1.put("tests-jms-ee-mdb-mdb_rec", new String[] { "jms_ee_mdb_mdb_rec_MDB_TOPIC" }); + // local access tests + htTopics1.put("tests-ejb-ee-bb-localaccess-mdbtaccesstest", new String[] { "ejb_ee_bb_localaccess_mdbtaccesstest_MDB_TOPIC" }); + /* + * Topics for ejb/ee/deploy sub-tree + */ + htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-singleT", + new String[] { "ejb_ee_deploy_mdb_enventry_singleT_AllBean", "ejb_ee_deploy_mdb_enventry_singleT_StringBean", + "ejb_ee_deploy_mdb_enventry_singleT_BooleanBean", "ejb_ee_deploy_mdb_enventry_singleT_ByteBean", + "ejb_ee_deploy_mdb_enventry_singleT_ShortBean", "ejb_ee_deploy_mdb_enventry_singleT_IntegerBean", + "ejb_ee_deploy_mdb_enventry_singleT_LongBean", "ejb_ee_deploy_mdb_enventry_singleT_FloatBean", + "ejb_ee_deploy_mdb_enventry_singleT_DoubleBean", "ejb_ee_deploy_mdb_enventry_singleT_AllBeanBMT" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-scopeT", + new String[] { "ejb_ee_deploy_mdb_enventry_scopeT_Bean1_SameJar", "ejb_ee_deploy_mdb_enventry_scopeT_Bean2_SameJar", + "ejb_ee_deploy_mdb_enventry_scopeT_Bean1_MultiJar", "ejb_ee_deploy_mdb_enventry_scopeT_Bean2_MultiJar" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-enventry-casesensT", + new String[] { "ejb_ee_deploy_mdb_enventry_casesensT_CaseBean", "ejb_ee_deploy_mdb_enventry_casesensT_CaseBeanBMT" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-singleT", + new String[] { "ejb_ee_deploy_mdb_ejbref_singleT_TestBean", "ejb_ee_deploy_mdb_ejbref_singleT_TestBeanBMT" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-scopeT", new String[] { "ejb_ee_deploy_mdb_ejbref_scopeT_Romeo", + "ejb_ee_deploy_mdb_ejbref_scopeT_Tristan", "ejb_ee_deploy_mdb_ejbref_scopeT_Cyrano" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejbref-casesensT", new String[] { "ejb_ee_deploy_mdb_ejbref_casesensT_TestBean" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-singleT", + new String[] { "ejb_ee_deploy_mdb_ejblink_singleT_TestBean", "ejb_ee_deploy_mdb_ejblink_singleT_TestBeanBMT" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-scopeT", new String[] { "ejb_ee_deploy_mdb_ejblink_scopeT_TestBean" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-ejblink-casesensT", new String[] { "ejb_ee_deploy_mdb_ejblink_casesensT_TestBean" }); + htTopics1.put("tests-ejb-ee-deploy-mdb-resref-singleT", new String[] { "ejb_ee_deploy_mdb_resref_singleT_TestBean" }); + + /* + * Topics for ejb30 sub-tree + */ + htTopics1.put("tests-ejb30-bb-session-stateless-annotation", new String[] { "MY_TOPIC" }); + htTopics1.put("tests-ejb30-bb-mdb-dest-topic", new String[] { "MY_TOPIC" }); + htTopics1.put("tests-ejb30-bb-mdb-activationconfig-topic-selectordupsnondurable", new String[] { "MY_TOPIC" }); + + /* + * Topics for servlet sub-tree + */ + htTopics1.put("tests-servlet-spec-annotation", new String[] { "MY_TOPIC" }); + + /* + * Topics for jsp sub-tree + */ + htTopics1.put("tests-jsp-spec-tagext-resource", new String[] { "MY_TOPIC" }); + + } +} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java similarity index 73% rename from runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java rename to tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java index 35c45bfc1e..b2415caee1 100644 --- a/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminException.java @@ -21,18 +21,18 @@ package com.sun.ts.lib.porting; public class TSJMSAdminException extends java.lang.Exception { - public TSJMSAdminException() { - super(); - } + public TSJMSAdminException() { + super(); + } - public TSJMSAdminException(String s) { - super(s); - System.out.println(s); - } + public TSJMSAdminException(String s) { + super(s); + System.out.println(s); + } - public TSJMSAdminException(String s, Throwable e) { - super(s); - System.out.println(s); - e.printStackTrace(); - } + public TSJMSAdminException(String s, Throwable e) { + super(s); + System.out.println(s); + e.printStackTrace(); + } } diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java new file mode 100644 index 0000000000..695363d02d --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSAdminInterface.java @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import java.io.PrintWriter; + +/** + * This is the TSJMSAdminInterface. An implementation of this interface must be provided by each Java EE implementation, + * to support their own creation/deletion semantics of topic/queue and QueueConnectionFactory/TopicConnectionFactory/ + * ConnectionFactory. + * + * @author Kyle Grucci + */ + +public interface TSJMSAdminInterface { + /** + * The init method is a logging mechanism for diagnostics. The writer parameter specifies the PrinterWriter that is used + * to log output. + * + * Initializes a new TSJMSAdminInterface instance. All output should be printed to this PrintWriter. All properties in + * the ts.jte file are accessible to this porting implementation class only via the TSPropertyManager class. + * + * @param writer The PrintWriter that is used to log output. + */ + public void init(PrintWriter writer); + + /** + * The createQueues method creates queues in a Java EE implementation. The queues parameter specifies the queue + * destination objects to create. + * + * @param queues Queues to create + * + */ + public void createQueues(String[] queues) throws TSJMSAdminException; + + /** + * The createTopics method creates topics in a Java EE implementation. The topics parameter specifies the topic + * destination objects to create. + * + * @param topics Topics to create + * + */ + public void createTopics(String[] topics) throws TSJMSAdminException; + + /** + * The removeQueues method removes queues in a Java EE implementation. The queues parameter specifies the queue + * destination objects to remove. + * + * @param queues Queues to remove + * + */ + public void removeQueues(String[] queues) throws TSJMSAdminException; + + /** + * The removeTopics method remove topics in a Java EE implementation. The topics parameter specifies the topic + * destination objects to remove. + * + * @param topics Topics to remove + * + */ + public void removeTopics(String[] topics) throws TSJMSAdminException; + + /** + * This method creates QueueConnectionFactorys in a Java EE implementation. + * + * Two String array parameters are passed when createQueueConnectionFactories is called, where the first array specifies + * QueueConnectionFactorys to create and the second array specifies properties associated with the + * QueueConnectionFactory. + * + * Arguments passed as queueConnectionFactories[n],props[n] where props[i] consists all properties that associated to + * QueueConnectionFactory queueConnectionFactories[i]. + * + * Each element in the Properties array consists of a String name value pair that defines the properties for the factory + * connection. Some of the connection factories set up by the Java EE TCK require a property for the clientID. The name + * value pair in this case would be "clientId=cts". If more than one property needs to be specified by a single + * QueueConnectionFactory, the properties should be space separated in the props string. If no property is being + * specified, the name value pair would be an empty String "". + * + * @param queueConnectionFactories queueConnectionFactories to create + * @param props properties for the connection, if any + */ + + public void createQueueConnectionFactories(String[] queueConnectionFactories, String[] props) throws TSJMSAdminException; + + /** + * This method creates TopicConnectionFactorys in a Java EE implementation. + * + * Two String array parameters are passed when createTopicConnectionFactories is called, where the first array specifies + * TopicConnectionFactorys to create and the second array specifies properties associated with the + * TopicConnectionFactory. + * + * Arguments passed as topicConnectionFactories[n],props[n] where props[i] consists all properties that associated to + * TopicConnectionFactory topicConnectionFactories[i]. + * + * Each element in the Properties array consists of a String name value pair that defines the properties for the factory + * connection. Some of the connection factories set up by the Java EE TCK require a property for the clientID. The name + * value pair in this case would be "clientId=cts". If more than one property needs to be specified by a single + * TopicConnectionFactory, the properties should be space separated in the props string. If no property is being + * specified, the name value pair would be an empty String "". + * + * @param topicConnectionFactories topicConnectionFactories to create + * @param props properties for the connection, if any + */ + public void createTopicConnectionFactories(String[] topicConnectionFactories, String[] props) throws TSJMSAdminException; + + /** + * This method creates ConnectionFactorys in a Java EE implementation. + * + * Two String array parameters are passed when createConnectionFactories is called, where the first array specifies + * ConnectionFactorys to create and the second array specifies properties associated with the ConnectionFactory. + * + * Arguments passed as connectionFactories[n],props[n] where props[i] consists all properties that associated to + * ConnectionFactory connectionFactories[i]. + * + * Each element in the Properties array consists of a String name value pair that defines the properties for the factory + * connection. If more than one property needs to be specified by a single ConnectionFactory, the properties should be + * space separated in the props string. If no property is being specified, the name value pair would be an empty String + * "". + * + * @param connectionFactories connectionFactories to create + * @param props properties for the connection, if any + */ + public void createConnectionFactories(String[] connectionFactories, String[] props) throws TSJMSAdminException; + + /** + * This method removes ConnectionFactories from a Java EE implementation. + * + * @param jmsConnectionFactoryNames JmsConnectionFactoryNames to remove + * + */ + public void removeJmsConnectionFactories(String[] jmsConnectionFactoryNames) throws TSJMSAdminException; + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java new file mode 100644 index 0000000000..914e53de8b --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjects.java @@ -0,0 +1,61 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import com.sun.ts.lib.util.TestUtil; + +/** + * This is a factory class for creating instances of TSJMSObjectsInterface. The implementation classes used are + * determined by the values of the porting package properties in TS_HOME/bin/ts.jte. + * + */ +public class TSJMSObjects { + + private static final String DEFAULT_PORTING_CLASS = "com.sun.ts.lib.implementation.sun.jms.SunRIJMSObjects"; + + private static String portingPropName = "porting.ts.jmsObjects.class.1"; + + private static String portingClass = null; + + private static TSJMSObjectsInterface tsJmsObjects = null; + + public static TSJMSObjectsInterface getJMSObjectsInstance() throws Exception { + try { + // Create instance of the TSJMSObjectsInterface implementation + // class + TestUtil.logMsg("TSJMSObjects.getJMSObjectsInstance()"); + portingClass = TestUtil.getProperty(portingPropName); + if (portingClass == null) { + portingClass = DEFAULT_PORTING_CLASS; + TestUtil.logMsg("Property " + portingPropName + " not set. " + "Using default porting class. "); + } + TestUtil.logMsg("Porting implementation class=" + portingClass); + if (tsJmsObjects == null) { + Class c = Class.forName(portingClass); + tsJmsObjects = (TSJMSObjectsInterface) c.newInstance(); + } + return tsJmsObjects; + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java new file mode 100644 index 0000000000..a233f8f681 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSJMSObjectsInterface.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import jakarta.jms.ConnectionFactory; +import jakarta.jms.Queue; +import jakarta.jms.QueueConnectionFactory; +import jakarta.jms.Topic; +import jakarta.jms.TopicConnectionFactory; + +/** + * This is the TSJMSObjectsInterface. An implementation of this interface must be provided by each JMS implementation to + * support their own implementation of getting administered objects. + * + */ +public interface TSJMSObjectsInterface { + /** + * This method allows JMS implementation to get Queue + */ + + public Queue getQueue(String name) throws Exception; + + /** + * This method allows JMS implementation to get Topic + */ + + public Topic getTopic(String name) throws Exception; + + /** + * This method allows JMS implementation to get TopicConnectionFactory + */ + + public TopicConnectionFactory getTopicConnectionFactory(String name) throws Exception; + + /** + * This method allows JMS implementation to get QueueConnectionFactory + */ + + public QueueConnectionFactory getQueueConnectionFactory(String name) throws Exception; + + /** + * This method allows JMS implementation to get ConnectionFactory + */ + + public ConnectionFactory getConnectionFactory(String name) throws Exception; + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java new file mode 100644 index 0000000000..36696cf94d --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContext.java @@ -0,0 +1,115 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ +package com.sun.ts.lib.porting; + +import com.sun.ts.lib.util.TestUtil; + +/** + * TSLoginContext provides the implementation specific code for allowing a program to login as a specific user. This + * class is implemented as a wrapper class around Sun's login implementation code. + */ +public class TSLoginContext implements TSLoginContextInterface { + private TSLoginContextInterface ctsLogin = null; + + private String sClass = "porting.ts.login.class.1"; + + /** + * Provides the LoginContext needed to perform a login. + */ + public TSLoginContext() throws Exception { + // move initialization to login method, to make sure that TestUtil's + // properties are already initialized + } + + /** + * Provides the LoginContext needed to perform a login. + */ + public TSLoginContext(String sClassName) throws Exception { + sClass = sClassName; + } + + /** + * Performs the login functionality. + * + * @param usr the username to login + * @param pwd the password of user + */ + @Override + public void login(String usr, String pwd) throws Exception { + if (ctsLogin == null) { + init(); + } + ctsLogin.login(usr, pwd); + } + + /** + * This login method is used for certificate based login + * + * Note: This method also uses keystore and keystore password from the TS configuration file + * + * @param useralias - alias is used to pick up the certificate from keystore + */ + + @Override + public void login(String useralias) throws Exception { + if (ctsLogin == null) { + init(); + } + ctsLogin.login(useralias); + } + + /** + * This login method is used for certificate based login + * + * @param useralias - alias used to pickup the certificate from keystore + * @param keystore - keystore file + * @param keyPass - keystore password + */ + + @Override + public void login(String useralias, String keystore, String keyPass) throws Exception { + if (ctsLogin == null) { + init(); + } + ctsLogin.login(useralias, keystore, keyPass); + } + + /** + * Performs logout. + */ + @Override + public Boolean logout() { + if (ctsLogin == null) { + init(); + } + return ctsLogin.logout(); + } + + private void init() { + try { + // create and initialize a new instance of the Login class + Class c = Class.forName(TestUtil.getProperty(sClass)); + ctsLogin = (TSLoginContextInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + // throw e; + } + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java new file mode 100644 index 0000000000..0392512b42 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSLoginContextInterface.java @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +/** + * TSLoginContextInterface provides the interface that must be implemented to provide the implementation specific login + * code to login as a specified user. + */ +public interface TSLoginContextInterface { + /** + * This method is used for login with username and password. + * + * @param usr - string username + * @param pwd - string password + */ + public void login(String usr, String pwd) throws Exception; + + /** + * This login method is used for Certificate based login + * + * Note: This method also uses keystore and keystore password from the TS configuration file + * + * @param alias - alias is used to pick up the certificate from keystore + */ + public void login(String alias) throws Exception; + + /** + * This login method is used for Certificate based login + * + * @param alias - alias is used to pick up the certificate from keystore + * @param keystore - keystore file + * @param keyPass - keystore password + */ + public void login(String alias, String keystore, String keyPass) throws Exception; + + /** + * This method is used for logout + */ + public Boolean logout(); + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java new file mode 100644 index 0000000000..20d2dba5b8 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURL.java @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import java.io.Serializable; +import java.net.MalformedURLException; +import java.net.URL; + +/** + * This is a Java EE Reference specific implementation of the TSURLInterface which is to be used for Java EE TCK + * testing. TS tests use this interface to obtain the URL String to use to access a given web component. If a given Java + * EE Server implmentation requires that URLs be created in a different manner, then this implementation can be + * replaced. + * + * @author Kyle Grucci + */ +public class TSURL implements TSURLInterface, Serializable { + private TSURLInterface ctsURL = null; + + private String sClass = "porting.ts.url.class.1"; + + private String portingDefault = "com.sun.ts.lib.porting.implementation.SunRIURL"; + + public TSURL() { + // we'll initialize the impl when the individual method is called + // this constructor assumes sClass = "porting.ts.url.class.1". + } + + public TSURL(String sClassName) { + sClass = sClassName; + } + + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL object. + */ + @Override + public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException { + if (ctsURL == null) { + try { + // create and initialize a new instance of TSURLInterface + Class c = Class.forName(System.getProperty(sClass, portingDefault)); + ctsURL = (TSURLInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + } + + return ctsURL.getURL(protocol, host, port, file); + } + + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL as a String. + */ + @Override + public String getURLString(String protocol, String host, int port, String file) { + if (ctsURL == null) { + try { + // create and initialize a new instance of TSURLInterface + Class c = Class.forName(System.getProperty(sClass, portingDefault)); + ctsURL = (TSURLInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + } + return ctsURL.getURLString(protocol, host, port, file); + } + + /** + * This method is called by TS tests to get the request string to use to access a given web component. + * + * @param request - the request file. + * @return a valid String object. + */ + @Override + public String getRequest(String request) { + if (ctsURL == null) { + try { + // create and initialize a new instance of TSURLInterface + // Class c = Class.forName(TestUtil.getProperty(sClass)); + // Use the system property porting.ts.url.class.1 + Class c = Class.forName(System.getProperty(sClass, portingDefault)); + ctsURL = (TSURLInterface) c.newInstance(); + } catch (Exception e) { + e.printStackTrace(); + } + } + return ctsURL.getRequest(request); + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java new file mode 100644 index 0000000000..699302d6a0 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/TSURLInterface.java @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2007, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +/* + * $Id$ + */ + +package com.sun.ts.lib.porting; + +import java.net.MalformedURLException; +import java.net.URL; + +/** + * An implementation of the TSURLInterface is to be used for Java EE TCK testing. TS tests use this interface to obtain + * the URL String to use to access a given web component. If a given Java EE Server implmentation requires that URLs be + * created in a different manner, then this implementation can be replaced. + * + * @author Kyle Grucci + */ +public interface TSURLInterface { + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL object. + */ + public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException; + + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL as a String. + */ + public String getURLString(String protocol, String host, int port, String file); + + /** + * This method is called by TS tests to get the request to use to access a given web component. + * + * @param request - the request file. + * @return a valid String object. + */ + public String getRequest(String request); +} diff --git a/runtime/src/main/java/com/sun/ts/lib/porting/build.xml b/tools/runtime/src/main/java/com/sun/ts/lib/porting/build.xml similarity index 100% rename from runtime/src/main/java/com/sun/ts/lib/porting/build.xml rename to tools/runtime/src/main/java/com/sun/ts/lib/porting/build.xml diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java b/tools/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java new file mode 100644 index 0000000000..ed04941bc8 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/porting/implementation/SunRIURL.java @@ -0,0 +1,84 @@ +/* + * Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.porting.implementation; + +import com.sun.ts.lib.porting.TSURLInterface; + +import java.net.MalformedURLException; +import java.net.URL; + +// import com.sun.ts.lib.porting.TSURLInterface; + +/** + * This is a J2EE Reference specific implementation of the TSURLInterface which is to be used for J2EE-TS testing. TS + * tests use this interface to obtain the URL String to use to access a given web component. If a given J2EE Server + * implmentation requires that URLs be created in a different manner, then this implementation can be replaced. + * + * @author Kyle Grucci + */ +public class SunRIURL implements TSURLInterface { + private URL url = null; + + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL object. + */ + @Override + public URL getURL(String protocol, String host, int port, String file) throws MalformedURLException { + try { + url = new URL(protocol, host, port, file); + } catch (MalformedURLException e) { + // logger.log(Logger.Level.ERROR,"Failed during URL creation", e); + throw e; + } + return url; + } + + /** + * This method is called by TS tests to get the URL to use to access a given web component. + * + * @param protocol - the name of the protocol. + * @param host - the name of the host. + * @param port - the port number. + * @param file - the host file. + * @return a valid URL as a String. + */ + @Override + public String getURLString(String protocol, String host, int port, String file) { + if (file.startsWith("/")) { + return protocol + "://" + host + ":" + port + file; + } else { + return protocol + "://" + host + ":" + port + "/" + file; + } + } + + /** + * This method is called by TS tests to get the request string to use to access a given web component. + * + * @param request - the request file. + * @return a valid String object. + */ + @Override + public String getRequest(String request) { + return request; + } +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java new file mode 100644 index 0000000000..4ba833a6ba --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission1.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.tests.security.permissions; + +import java.security.Permission; + +/** + * Java SecurityManager Permission class for CTS Test purposes. This permission extends the Permission class and is used + * to perform validations of permissions.xml. + * + * Sample usage of this permssion: permission com.sun.ts.tests.ejb30.sec.permsxml.CTSPermission1 "*"; + * + */ + +public final class CTSPermission1 extends Permission { + + private transient String methodName; + + private transient String actions; + + private transient int hashCodeValue = 0; + + /** + * Create a new CTSPermission1 with no action + * + * @param name - + */ + public CTSPermission1(String name) { + super(name); + } + + /** + * Creates a new CTSPermission1 with action + * + * @param name JNDI resource path name + * @param action JNDI action (none defined) + */ + public CTSPermission1(String name, String actions) { + super(name); + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof CTSPermission1)) { + return false; + } + + CTSPermission1 that = (CTSPermission1) o; + + if (!this.getName().equals(that.getName())) { + return false; + } + + if (this.methodName != null) { + if (that.methodName == null || !this.methodName.equals(that.methodName)) { + return false; + } + } else if (that.methodName != null) { + return false; + } + + if (this.actions != null) { + if (that.actions == null || !this.actions.equals(that.actions)) { + return false; + } + } else if (that.actions != null) { + return false; + } + + return true; + } + + @Override + public String getActions() { + return this.actions; + } + + public void setActions(String val) { + this.actions = val; + } + + public String getMethodName() { + return this.methodName; + } + + public void setMethodName(String val) { + this.methodName = val; + } + + @Override + public int hashCode() { + if (hashCodeValue == 0) { + + String hash = this.getName(); + if (this.actions != null) { + hash += " " + this.actions; + } + hashCodeValue = hash.hashCode(); + } + return this.hashCodeValue; + } + + @Override + public boolean implies(Permission permission) { + + CTSPermission1 that = (CTSPermission1) permission; + + if ((permission == null) || !(permission instanceof CTSPermission1) || !this.getName().equals(that.getName())) { + return false; + } + + if ((this.methodName != null) && (that.methodName == null || !this.methodName.equals(that.methodName))) { + return false; + } + + if ((this.actions != null) && (that.actions == null || !this.actions.equals(that.actions))) { + return false; + } + + return true; + } + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java new file mode 100644 index 0000000000..a4fc9dda74 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPermission2.java @@ -0,0 +1,138 @@ +/* + * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.tests.security.permissions; + +import java.security.Permission; + +/** + * Java SecurityManager Permission class for CTS Test purposes. This permission extends the Permission class and is used + * to perform validations of permissions.xml. + * + * Sample usage of this permssion: permission com.sun.ts.tests.ejb30.sec.permsxml.CTSPermission1 "*"; + * + */ + +public final class CTSPermission2 extends Permission { + + private transient String methodName; + + private transient String actions; + + private transient int hashCodeValue = 0; + + /** + * Create a new CTSPermission2 with no action + * + * @param name - + */ + public CTSPermission2(String name) { + super(name); + } + + /** + * Creates a new CTSPermission2 with action + * + * @param name JNDI resource path name + * @param action JNDI action (none defined) + */ + public CTSPermission2(String name, String actions) { + super(name); + this.actions = actions; + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof CTSPermission2)) { + return false; + } + + CTSPermission2 that = (CTSPermission2) o; + + if (!this.getName().equals(that.getName())) { + return false; + } + + if (this.methodName != null) { + if (that.methodName == null || !this.methodName.equals(that.methodName)) { + return false; + } + } else if (that.methodName != null) { + return false; + } + + if (this.actions != null) { + if (that.actions == null || !this.actions.equals(that.actions)) { + return false; + } + } else if (that.actions != null) { + return false; + } + + return true; + } + + @Override + public String getActions() { + return this.actions; + } + + public void setActions(String val) { + this.actions = val; + } + + public String getMethodName() { + return this.methodName; + } + + public void setMethodName(String val) { + this.methodName = val; + } + + @Override + public int hashCode() { + if (hashCodeValue == 0) { + + String hash = this.getName(); + if (this.actions != null) { + hash += " " + this.actions; + } + hashCodeValue = hash.hashCode(); + } + return this.hashCodeValue; + } + + @Override + public boolean implies(Permission permission) { + + CTSPermission2 that = (CTSPermission2) permission; + + if ((permission == null) || !(permission instanceof CTSPermission2) || !this.getName().equals(that.getName())) { + return false; + } + + if ((this.methodName != null) && (that.methodName == null || !this.methodName.equals(that.methodName))) { + return false; + } + + if ((this.actions != null) && (that.actions == null || !this.actions.equals(that.actions))) { + return false; + } + + return true; + } + +} diff --git a/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java new file mode 100644 index 0000000000..e066d04338 --- /dev/null +++ b/tools/runtime/src/main/java/com/sun/ts/lib/tests/security/permissions/CTSPropertyPermission.java @@ -0,0 +1,336 @@ +/* + * Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved. + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Public License v. 2.0, which is available at + * http://www.eclipse.org/legal/epl-2.0. + * + * This Source Code may also be made available under the following Secondary + * Licenses when the conditions for such availability set forth in the + * Eclipse Public License v. 2.0 are satisfied: GNU General Public License, + * version 2 with the GNU Classpath Exception, which is available at + * https://www.gnu.org/software/classpath/license.html. + * + * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 + */ + +package com.sun.ts.lib.tests.security.permissions; + +import java.io.Serializable; +import java.security.BasicPermission; +import java.security.Permission; +import java.security.PermissionCollection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.Map; +import java.util.StringTokenizer; + +/** + * This is a Java SE based Permission class, used for Test purposes. This permission extends the BasicPermission class + * and is used to perform validations of permissions.xml. + * + * This permission should support actions of "read" or "write" and basically tries to behave similar to the JavaSE + * PropertyPermission class. The reason for this locally defined class is that we want to reference it in the + * permissions.xml while ensuring it will not be used or pre-defined within any of the vendors app servers. This means + * there will ONLY be perms defined inpermissions.xml for READ actions. This will allow a different level of testing to + * be done. + * + * Sample usage of this permssion: permission com.sun.ts.tests.ejb30.sec.permsxml.CTSPropertyPermission "*" + * "read.write"; + * + */ + +public final class CTSPropertyPermission extends BasicPermission { + + private transient String methodName; + + private transient String actions; + + private transient int hashCodeValue = 0; + + private transient boolean isReadAction = false; + + private transient boolean isWriteAction = false; + + protected int mask = 0; + + static private int READ = 0x01; + + static private int WRITE = 0x02; + + /** + * Create a new CTSPropertyPermission with no action + * + * @param name - + */ + public CTSPropertyPermission(String name) { + this(name, "READ"); + } + + /** + * Creates a new CTSPropertyPermission with action + * + * @param name JNDI resource path name + * @param action JNDI action (none defined) + */ + public CTSPropertyPermission(String name, String actions) { + super(name); + this.setActions(actions); + this.mask = parseActions(actions); + } + + private int parseActions(String action) { + + // we support actions separated by a commona ',' or a space ' ' + StringTokenizer st = new StringTokenizer(action, ", "); + + mask = 0; + while (st.hasMoreTokens()) { + String token = st.nextToken(); + if (token.equals("READ")) { + mask |= READ; + } else if (token.equals("WRITE")) { + mask |= WRITE; + } else { + // ignore unrecognize actions and assume READ + mask |= READ; + } + } + return mask; + } + + public int getMask() { + return mask; + } + + @Override + public boolean equals(Object o) { + if (o == null || !(o instanceof CTSPropertyPermission)) { + return false; + } + + CTSPropertyPermission that = (CTSPropertyPermission) o; + + if (!this.getName().equals(that.getName())) { + return false; + } + + if (this.methodName != null) { + if (that.methodName == null || !this.methodName.equals(that.methodName)) { + return false; + } + } else if (that.methodName != null) { + return false; + } + + if (this.actions != null) { + if (that.actions == null || !this.actions.equals(that.actions)) { + return false; + } + } else if (that.actions != null) { + return false; + } + + if (that.mask != this.mask) { + return false; + } + + return true; + } + + public static String getActions(int mask) { + if (mask == 0) { + return ""; + } else if (mask == READ) { + return "READ"; + } else if (mask == WRITE) { + return "WRITE"; + } else if (mask == (READ | WRITE)) { + return "READ,WRITE"; + } else { + // something went wrong + System.out.println("in getActions(): bad value for mask = " + mask); + return "ZZZ"; + } + } + + public void setActions(String val) { + this.actions = val; + + this.actions = this.actions.toUpperCase(); + if (this.actions.contains("READ")) { + isReadAction = true; + } + + if (this.actions.contains("WRITE")) { + isWriteAction = true; + } + + } + + public String getMethodName() { + return this.methodName; + } + + public void setMethodName(String val) { + this.methodName = val; + } + + @Override + public int hashCode() { + if (hashCodeValue == 0) { + + String hash = this.getName(); + if (this.actions != null) { + hash += " " + this.actions; + } + hashCodeValue = hash.hashCode(); + } + return this.hashCodeValue; + } + + @Override + public boolean implies(Permission permission) { + + debug("enterred CTSPropertyPermission.implies()"); + + CTSPropertyPermission that = (CTSPropertyPermission) permission; + + if ((permission == null) || !(permission instanceof CTSPropertyPermission)) { + debug("in implies(): permission ! instance of CTSPropertyPermission"); + return false; + } + + if ((!this.getName().equals("*")) && (!this.getName().equals(that.getName()))) { + debug("in implies(): this.getName() != that.getName()"); + return false; + } + + if ((this.mask & that.mask) != that.mask) { + debug("in implies(): masks not equal"); + return false; + } + + if ((this.methodName != null) && (that.methodName == null || !this.methodName.equals(that.methodName))) { + debug("that.methodName = " + that.methodName); + debug("this.methodName = " + this.methodName); + return false; + } + + String strName = that.getName(); + debug("in implies(): strName = " + strName); + debug("in implies(): this.actions() = " + this.getActions()); + debug("in implies(): that.actions() = " + that.getActions()); + + if (this.getIsReadAction() != that.getIsReadAction()) { + debug("in implies(): this.getIsReadAction() != that.getIsReadAction()"); + return false; + } + + if (this.getIsWriteAction() != that.getIsWriteAction()) { + debug("in implies(): this.getIsWriteAction() != that.getIsWriteAction()"); + return false; + } + + return true; + } + + @Override + public PermissionCollection newPermissionCollection() { + return new CTSPropertyPermissionCollection(); + } + + public void setIsReadAction(boolean val) { + isReadAction = val; + } + + public boolean getIsReadAction() { + return isReadAction; + } + + public void setIsWriteAction(boolean val) { + isWriteAction = val; + } + + public boolean getIsWriteAction() { + return isWriteAction; + } + + private void debug(String str) { + System.err.println(str); + } + +} + +/* + * + */ +final class CTSPropertyPermissionCollection extends PermissionCollection implements Serializable { + private transient Map perms; + + public CTSPropertyPermissionCollection() { + perms = new HashMap(32); // some default + } + + @Override + public void add(Permission permission) { + + if (permission == null) { + throw new IllegalArgumentException("failed trying to add null permission"); + } + + if (!(permission instanceof CTSPropertyPermission)) { + throw new IllegalArgumentException("invalid permission: " + permission); + } + + if (isReadOnly()) { + throw new SecurityException("can't add perm to (READONLY) CTSPropertyPermission"); + } + + CTSPropertyPermission propPerm = (CTSPropertyPermission) permission; + String permName = propPerm.getName(); + + // try to get the perrm from our hashmap + CTSPropertyPermission thePerm = (CTSPropertyPermission) perms.get(permName); + if (thePerm != null) { + if (thePerm.getMask() != propPerm.getMask()) { + String actions = CTSPropertyPermission.getActions(thePerm.getMask() | propPerm.getMask()); + perms.put(permName, new CTSPropertyPermission(permName, actions)); + } + } else { + perms.put(permName, permission); + } + } + + @Override + public boolean implies(Permission permission) { + + CTSPropertyPermission that = (CTSPropertyPermission) permission; + + if (!(permission instanceof CTSPropertyPermission)) { + System.out.println("CTSPropertyPermissionCollection.implies(): permission ! instance of CTSPropertyPermission"); + return false; + } + + String permName = that.getName(); + int desiredMask = that.getMask(); + int actualMask = 0; + + CTSPropertyPermission tempPerm = (CTSPropertyPermission) perms.get(permName); + if (tempPerm != null) { + actualMask |= tempPerm.getMask(); + if ((actualMask & desiredMask) == desiredMask) { + return true; + } + } + + return false; + } + + @Override + public Enumeration elements() { + return Collections.enumeration(perms.values()); + } + +} diff --git a/signaturetest/pom.xml b/tools/signaturetest/pom.xml similarity index 64% rename from signaturetest/pom.xml rename to tools/signaturetest/pom.xml index 89ef1e2aa9..4bec792ac0 100644 --- a/signaturetest/pom.xml +++ b/tools/signaturetest/pom.xml @@ -1,8 +1,7 @@ 2.5.11