diff --git a/glassfishtck/pom.xml b/glassfishtck/pom.xml
deleted file mode 100644
index 045e2d2ade..0000000000
--- a/glassfishtck/pom.xml
+++ /dev/null
@@ -1,50 +0,0 @@
-
-
-
- 4.0.0
-
-
- jakarta.tck
- project
- 11.0.0-SNAPSHOT
-
- glassfishtck
- jar
- glassfishtck
- glassfishtck
-
-
-
- ${project.groupId}
- runtime
-
-
-
-
-
-
- maven-deploy-plugin
-
- true
-
-
-
-
-
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandaloneDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandaloneDeliverable.java
deleted file mode 100644
index a2e6171f66..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandaloneDeliverable.java
+++ /dev/null
@@ -1,83 +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.connector;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.ts.lib.util.TestUtil;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.SunRIDeploymentInfo;
-import com.sun.ts.lib.porting.DeploymentInfo;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-import java.io.File;
-
-/**
- * This class serves as a place for Deliverable specific info.
- */
-public class StandaloneDeliverable extends AbstractDeliverable {
-
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- StandalonePropertyManager propMgr = StandalonePropertyManager
- .getStandalonePropertyManager(te);
-
- return propMgr;
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return StandalonePropertyManager.getStandalonePropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return StandalonePropertyManager.getStandalonePropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "connectorservlet", "genericvehicle" });
-
- return htTSValidVehicles;
- }
-
- private void createDir(String sDir) throws Exception {
- File fDir = new File(sDir);
-
- if (!fDir.exists()) {
- if (!fDir.mkdirs()) {
- throw new Exception("Failed to create directory: " + sDir);
- }
- TestUtil.logHarnessDebug("Successfully created directory: " + sDir);
- }
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandalonePropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandalonePropertyManager.java
deleted file mode 100644
index 7ea92cf4dc..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/connector/StandalonePropertyManager.java
+++ /dev/null
@@ -1,102 +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.connector;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.deliverable.tck.*;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- */
-public class StandalonePropertyManager extends TCKPropertyManager {
-
- // uninitialized singleton instance
- private static StandalonePropertyManager jteMgr = new StandalonePropertyManager();
-
- /**
- * This method returns the singleton instance of TSPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return TSPropertyManager - singleton property manager object
- */
- public final static StandalonePropertyManager getStandalonePropertyManager(
- TestEnvironment env) throws PropertyNotSetException {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of StandalonePropertyManager
- * which provides access to all ts.jte properties. This is only called by the
- * init() method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return StandalonePropertyManager - singleton property manager object
- */
- public final static StandalonePropertyManager getStandalonePropertyManager(
- Properties p) throws PropertyNotSetException {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static StandalonePropertyManager getStandalonePropertyManager()
- throws PropertyNotSetException {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
-
- // if the abstract propertymanager already loaded all props, just return
- // if (pTestProps.getProperty("all.props").equalsIgnoreCase("true")) {
- // return pTestProps;
- // }
-
- String sJtePropVal = "";
- // add all porting class props so the factories can work in the server
- pTestProps.put("porting.ts.login.class.1",
- getProperty("porting.ts.login.class.1"));
- pTestProps.put("porting.ts.HttpsURLConnection.class.1",
- getProperty("porting.ts.HttpsURLConnection.class.1"));
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- pTestProps.put("namingServiceHost2", getProperty("namingServiceHost2"));
- pTestProps.put("namingServicePort2", getProperty("namingServicePort2"));
- pTestProps.put("namingServiceHost1", getProperty("namingServiceHost1"));
- pTestProps.put("namingServicePort1", getProperty("namingServicePort1"));
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSDeliverable.java
deleted file mode 100644
index fb03737f8a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSDeliverable.java
+++ /dev/null
@@ -1,216 +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.lib.deliverable.cts;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.DeploymentInfo;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.SunRIDeploymentInfo;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a place for CTS Deliverable specific info.
- *
- * @author Kyle Grucci
- */
-public class CTSDeliverable extends AbstractDeliverable {
-
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- CTSPropertyManager propMgr = CTSPropertyManager.getCTSPropertyManager(te);
-
- // create CTS specific working directories
- createDir(propMgr.getProperty("wsdlRepository1"));
- createDir(propMgr.getProperty("wsdlRepository2"));
- return propMgr;
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return CTSPropertyManager.getCTSPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return CTSPropertyManager.getCTSPropertyManager();
- }
-
- public DeploymentInfo getDeploymentInfo(String earFile,
- String[] sValidRuntimeInfoFilesArray) {
- DeploymentInfo info = null;
- try {
- info = new SunRIDeploymentInfo(earFile, sValidRuntimeInfoFilesArray);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return info;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // sample jdbc tests
- htTSValidVehicles.put("tests_samples_jdbc.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // signature tests
- htTSValidVehicles.put("tests_signaturetest.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // jaxp tests
- htTSValidVehicles.put("tests_jaxp.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // jaxp com directory tests (until we figure out notserializable exc.)
- htTSValidVehicles.put("tests_jaxp_extension_com.service_eetest.vehicles",
- new String[] { "appclient" });
-
- // interop/naming/cosnamingNoSSL
- htTSValidVehicles.put(
- "tests_interop_naming_cosnamingNoSSL.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // jaxm tests
- htTSValidVehicles.put("tests_jaxm.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // saaj/ee/Standalone tests
- htTSValidVehicles.put("tests_saaj_ee_Standalone.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // interop/webservices
- htTSValidVehicles.put("tests_interop_webservices.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // interop/saaj/Standalone
- htTSValidVehicles.put(
- "tests_interop_saaj_Standalone.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // jdbc tests
- htTSValidVehicles.put("tests_jdbc_ee.service_eetest.vehicles",
- new String[] { "ejb", "servlet", "jsp", "appclient" });
-
- // jms tests
- htTSValidVehicles.put("tests_jms_ee_appclient.service_eetest.vehicles",
- new String[] { "appclient" });
- htTSValidVehicles.put("tests_jms_ee_web.service_eetest.vehicles",
- new String[] { "servlet", "jsp" });
- htTSValidVehicles.put("tests_jms_ee_ejb.service_eetest.vehicles",
- new String[] { "ejb" });
- htTSValidVehicles.put("tests_jms_ee_all.service_eetest.vehicles",
- new String[] { "appclient", "ejb", "servlet", "jsp" });
-
- // j2ee Management tests
- htTSValidVehicles.put("tests_j2eetools_mgmt.service_eetest.vehicles",
- new String[] { "ejb" });
-
- // jmx tests
- // htTSValidVehicles.put("tests_jmx.service_eetest.vehicles", new
- // String[]{"standalone"});
-
- return htTSValidVehicles;
- }
-
- public Map getInteropDirections() {
- super.getInteropDirections();
-
- htValidRunDirections.put("tests_interop.interop", "both");
-
- htValidRunDirections.put("tests_interop_csiv2_rionly.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_ssln_upr_noid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_ssln_upr_noid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_ssln_upr_noid_a_forward.interop",
- "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_ssln_upr_noid_a_reverse.interop",
- "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_sslr_upn_noid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ac_ssl_sslr_upn_noid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_anonid_forward.interop",
- "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_anonid_reverse.interop",
- "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_anonid_forward.interop",
- "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_anonid_reverse.interop",
- "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_upid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_upid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_anonid_forward.interop",
- "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_anonid_reverse.interop",
- "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_ccid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_ccid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_ccid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_sslr_upn_ccid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_ccid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_ccid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_upid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_upid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_upid_forward.interop", "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssl_ssln_upn_upid_reverse.interop", "reverse");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_upid_a_forward.interop",
- "forward");
- htValidRunDirections.put(
- "tests_interop_csiv2_ew_ssln_ssln_upn_upid_a_reverse.interop",
- "reverse");
-
- return htValidRunDirections;
- }
-
- public boolean supportsInterop() {
- return true;
- }
-
- private void createDir(String sDir) throws Exception {
- File fDir = new File(sDir);
-
- if (!fDir.exists()) {
- if (!fDir.mkdirs()) {
- throw new Exception("Failed to create directory: " + sDir);
- }
- TestUtil.logHarnessDebug("Successfully created directory: " + sDir);
- }
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSPropertyManager.java
deleted file mode 100644
index 50453e7011..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/cts/CTSPropertyManager.java
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (c) 2007, 2021 Oracle and/or its affiliates. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v. 2.0, which is available at
- * http://www.eclipse.org/legal/epl-2.0.
- *
- * This Source Code may also be made available under the following Secondary
- * Licenses when the conditions for such availability set forth in the
- * Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
- * version 2 with the GNU Classpath Exception, which is available 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;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractPropertyManager;
-import com.sun.ts.lib.deliverable.PropertyNotSetException;
-
-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 class CTSPropertyManager extends AbstractPropertyManager {
- // uninitialized singleton instance
- private static CTSPropertyManager jteMgr = new CTSPropertyManager();
-
- private String sDeployClass1;
-
- private String sDeployClass2;
-
- private String sLoginClass1;
-
- private String sLoginClass2;
-
- private String sURLClass1;
-
- private String sURLClass2;
-
- private String sJMSClass1;
-
- private String sJMSClass2;
-
- private String sNamingServiceHost2;
-
- private String sNamingServicePort2;
-
- private String sNamingServiceHost1;
-
- private String sNamingServicePort1;
-
- private String sDeployHost1;
-
- private String sDeployHost2;
-
- private String sDeployPort1;
-
- private String sDeployPort2;
-
- private String sDeployPropsNumber1;
-
- private String sDeployPropsNumber2;
-
- private String sWebServerHost;
-
- private String sWebServerPort;
-
- private String sWebServerHost2;
-
- private String sWebServerPort2;
-
- private String httpSupportsEndpointPublish;
-
- private String httpSupportsEndpointPublish2;
-
- private String sSecuredWebServicePort;
-
- private String sSecuredWebServicePort2;
-
- private String sEJBServer1TxInteropEnabled;
-
- private String sEJBServer2TxInteropEnabled;
-
- private String sHttpsURLConnectionClass1;
-
- private String sHttpsURLConnectionClass2;
-
- private String sWSDLRepository1;
-
- private String sWSDLRepository2;
-
- private String user1;
-
- private String password1;
-
- private String user2;
-
- private String password2;
-
- private CTSPropertyManager() {
- }
-
- /**
- * This method returns the singleton instance of TSPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return TSPropertyManager - singleton property manager object
- */
- public final static CTSPropertyManager getCTSPropertyManager(
- TestEnvironment env) throws PropertyNotSetException {
- jteMgr.setTestEnvironment(env);
- jteMgr.initInteropProperties();
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of CTSPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return CTSPropertyManager - singleton property manager object
- */
- public final static CTSPropertyManager getCTSPropertyManager(Properties p)
- throws PropertyNotSetException {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static CTSPropertyManager getCTSPropertyManager()
- throws PropertyNotSetException {
- return jteMgr;
- }
-
- private void initInteropProperties() {
- user1 = getProperty("user1", null);
- password1 = getProperty("password1", null);
- user2 = getProperty("user2", null);
- password2 = getProperty("password2", null);
- sDeployClass1 = getProperty("porting.ts.deploy.class.1", null);
- sDeployClass2 = getProperty("porting.ts.deploy.class.2", null);
- sLoginClass1 = getProperty("porting.ts.login.class.1", null);
- sLoginClass2 = getProperty("porting.ts.login.class.2", null);
- sURLClass1 = getProperty("porting.ts.url.class.1", null);
- sURLClass2 = getProperty("porting.ts.url.class.2", null);
- sJMSClass1 = getProperty("porting.ts.jms.class.1", null);
- sJMSClass2 = getProperty("porting.ts.jms.class.2", null);
- sNamingServiceHost2 = getProperty("namingServiceHost2", null);
- sNamingServicePort2 = getProperty("namingServicePort2", null);
- sNamingServiceHost1 = getProperty("namingServiceHost1", null);
- sNamingServicePort1 = getProperty("namingServicePort1", null);
- sDeployHost1 = getProperty("deployment_host.1", null);
- sDeployHost2 = getProperty("deployment_host.2", null);
- sDeployPort1 = getProperty("deployment_port.1", null);
- sDeployPort2 = getProperty("deployment_port.2", null);
- sDeployPropsNumber1 = "1";
- sDeployPropsNumber2 = "2";
- setProperty("deployment_propnumber.1", sDeployPropsNumber1);
- setProperty("deployment_propnumber.2", sDeployPropsNumber2);
- sWebServerHost = getProperty("webServerHost", null);
- sWebServerPort = getProperty("webServerPort", null);
- sWebServerHost2 = getProperty("webServerHost.2", null);
- sWebServerPort2 = getProperty("webServerPort.2", null);
- httpSupportsEndpointPublish = getProperty(
- "http.server.supports.endpoint.publish", null);
- httpSupportsEndpointPublish2 = getProperty(
- "http.server.supports.endpoint.publish.2", null);
- sSecuredWebServicePort = getProperty("securedWebServicePort", null);
- sSecuredWebServicePort2 = getProperty("securedWebServicePort.2", null);
- sEJBServer1TxInteropEnabled = getProperty("EJBServer1TxInteropEnabled",
- null);
- sEJBServer2TxInteropEnabled = getProperty("EJBServer2TxInteropEnabled",
- null);
- sHttpsURLConnectionClass1 = getProperty(
- "porting.ts.HttpsURLConnection.class.1", null);
- sHttpsURLConnectionClass2 = getProperty(
- "porting.ts.HttpsURLConnection.class.2", null);
- sWSDLRepository1 = getProperty("wsdlRepository1", null);
- sWSDLRepository2 = getProperty("wsdlRepository2", null);
- }
-
- public void forwardValues() {
- // reverse all interop props
- setProperty("user1", user1);
- setProperty("password1", password1);
- setProperty("user2", user2);
- setProperty("password2", password2);
-
- setProperty("porting.ts.deploy.class.1", sDeployClass1);
- setProperty("porting.ts.deploy.class.2", sDeployClass2);
- setProperty("porting.ts.login.class.1", sLoginClass1);
- setProperty("porting.ts.login.class.2", sLoginClass2);
- setProperty("porting.ts.url.class.1", sURLClass1);
- setProperty("porting.ts.url.class.2", sURLClass2);
- setProperty("porting.ts.jms.class.1", sJMSClass1);
- setProperty("porting.ts.jms.class.2", sJMSClass2);
- setProperty("namingServiceHost2", sNamingServiceHost2);
- setProperty("namingServicePort2", sNamingServicePort2);
- setProperty("namingServiceHost1", sNamingServiceHost1);
- setProperty("namingServicePort1", sNamingServicePort1);
- setProperty("deployment_host.1", sDeployHost1);
- setProperty("deployment_host.2", sDeployHost2);
- setProperty("deployment_port.1", sDeployPort1);
- setProperty("deployment_port.2", sDeployPort2);
- setProperty("deployment_propnumber.1", sDeployPropsNumber1);
- setProperty("deployment_propnumber.2", sDeployPropsNumber2);
- setProperty("webServerHost", sWebServerHost);
- setProperty("webServerHost.2", sWebServerHost2);
- setProperty("webServerPort", sWebServerPort);
- setProperty("webServerPort.2", sWebServerPort2);
- setProperty("http.server.supports.endpoint.publish",
- httpSupportsEndpointPublish);
- setProperty("http.server.supports.endpoint.publish.2",
- httpSupportsEndpointPublish2);
- setProperty("securedWebServicePort", sSecuredWebServicePort);
- setProperty("securedWebServicePort.2", sSecuredWebServicePort2);
- setProperty("EJBServer1TxInteropEnabled", sEJBServer1TxInteropEnabled);
- setProperty("EJBServer2TxInteropEnabled", sEJBServer2TxInteropEnabled);
- setProperty("porting.ts.HttpsURLConnection.class.1",
- sHttpsURLConnectionClass1);
- setProperty("porting.ts.HttpsURLConnection.class.2",
- sHttpsURLConnectionClass2);
- setProperty("wsdlRepository1", sWSDLRepository1);
- setProperty("wsdlRepository2", sWSDLRepository2);
-
- super.forwardValues();
- }
-
- public void reverseValues() {
- // reverse all interop props
- setProperty("user1", user2);
- setProperty("password1", password2);
- setProperty("user2", user1);
- setProperty("password2", password1);
-
- setProperty("porting.ts.deploy.class.1", sDeployClass2);
- setProperty("porting.ts.deploy.class.2", sDeployClass1);
- setProperty("porting.ts.login.class.1", sLoginClass2);
- setProperty("porting.ts.login.class.2", sLoginClass1);
- setProperty("porting.ts.url.class.1", sURLClass2);
- setProperty("porting.ts.url.class.2", sURLClass1);
- setProperty("porting.ts.jms.class.1", sJMSClass2);
- setProperty("porting.ts.jms.class.2", sJMSClass1);
- setProperty("namingServiceHost2", sNamingServiceHost1);
- setProperty("namingServicePort2", sNamingServicePort1);
- setProperty("namingServiceHost1", sNamingServiceHost2);
- setProperty("namingServicePort1", sNamingServicePort2);
- setProperty("deployment_host.1", sDeployHost2);
- setProperty("deployment_host.2", sDeployHost1);
- setProperty("deployment_port.1", sDeployPort2);
- setProperty("deployment_port.2", sDeployPort1);
- setProperty("deployment_propnumber.1", sDeployPropsNumber2);
- setProperty("deployment_propnumber.2", sDeployPropsNumber1);
- setProperty("webServerHost", sWebServerHost2);
- setProperty("webServerHost.2", sWebServerHost);
- setProperty("webServerPort", sWebServerPort2);
- setProperty("webServerPort.2", sWebServerPort);
- setProperty("http.server.supports.endpoint.publish",
- httpSupportsEndpointPublish2);
- setProperty("http.server.supports.endpoint.publish.2",
- httpSupportsEndpointPublish);
- setProperty("securedWebServicePort", sSecuredWebServicePort2);
- setProperty("securedWebServicePort.2", sSecuredWebServicePort);
- setProperty("EJBServer1TxInteropEnabled", sEJBServer2TxInteropEnabled);
- setProperty("EJBServer2TxInteropEnabled", sEJBServer1TxInteropEnabled);
- setProperty("porting.ts.HttpsURLConnection.class.1",
- sHttpsURLConnectionClass2);
- setProperty("porting.ts.HttpsURLConnection.class.2",
- sHttpsURLConnectionClass1);
- setProperty("wsdlRepository1", sWSDLRepository2);
- setProperty("wsdlRepository2", sWSDLRepository1);
-
- super.reverseValues();
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
-
- // if the abstract propertymanager already loaded all props, just return
- if (pTestProps.getProperty("all.props").equalsIgnoreCase("true")) {
- return pTestProps;
- }
-
- String sJtePropVal = "";
- // add all porting class props so the factories can work in the server
- pTestProps.put("porting.ts.deploy.class.1",
- getProperty("porting.ts.deploy.class.1"));
- pTestProps.put("porting.ts.deploy.class.2",
- getProperty("porting.ts.deploy.class.2"));
- pTestProps.put("porting.ts.login.class.1",
- getProperty("porting.ts.login.class.1"));
- pTestProps.put("porting.ts.login.class.2",
- getProperty("porting.ts.login.class.2"));
- pTestProps.put("porting.ts.HttpsURLConnection.class.1",
- getProperty("porting.ts.HttpsURLConnection.class.1"));
- pTestProps.put("porting.ts.HttpsURLConnection.class.2",
- getProperty("porting.ts.HttpsURLConnection.class.2"));
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- pTestProps.put("porting.ts.url.class.2",
- getProperty("porting.ts.url.class.2"));
- pTestProps.put("porting.ts.jms.class.1",
- getProperty("porting.ts.jms.class.1"));
- pTestProps.put("porting.ts.jms.class.2",
- getProperty("porting.ts.jms.class.2"));
- pTestProps.put("namingServiceHost2", getProperty("namingServiceHost2"));
- pTestProps.put("namingServicePort2", getProperty("namingServicePort2"));
- pTestProps.put("namingServiceHost1", getProperty("namingServiceHost1"));
- pTestProps.put("namingServicePort1", getProperty("namingServicePort1"));
- pTestProps.put("wsdlRepository1", getProperty("wsdlRepository1"));
- pTestProps.put("wsdlRepository2", getProperty("wsdlRepository2"));
-
- pTestProps.put("porting.ts.deploy2.class.1",
- getProperty("porting.ts.deploy2.class.1",
- "com.sun.ts.lib.implementation.sun.javaee.SunRIDeployment2"));
- pTestProps.put("porting.ts.deploy2.class.2",
- getProperty("porting.ts.deploy2.class.2",
- "com.sun.ts.lib.implementation.sun.javaee.SunRIDeployment2"));
-
- pTestProps.put("variable.mapper", getProperty("variable.mapper"));
- pTestProps.put("javaee.level", getProperty("javaee.level", "full"));
- pTestProps.put("platform.mode", getProperty("platform.mode", "jakartaEE"));
- pTestProps.put("persistence.second.level.caching.supported",
- getProperty("persistence.second.level.caching.supported", "true"));
-
- // add commonly used props by application servers that may be needed within
- // porting impl classes called by tests
- pTestProps.put("vi.admin.user", getProperty("vi.admin.user", "admin"));
- pTestProps.put("vi.admin.passwd",
- getProperty("vi.admin.passwd", "adminadmin"));
- pTestProps.put("orb.host", getProperty("orb.host"));
- pTestProps.put("orb.port", getProperty("orb.port"));
- pTestProps.put("securedWebServicePort",
- getProperty("securedWebServicePort"));
- pTestProps.put("webServerPort", getProperty("webServerPort"));
-
- String sTlsClientProtocols = getProperty("client.cert.test.jdk.tls.client.protocols", null);
- if (sTlsClientProtocols != null) {
- pTestProps.put("client.cert.test.jdk.tls.client.protocols", sTlsClientProtocols);
- }
-
- // add properties used for JPA 2.2 tests.
- pTestProps.put("persistence.unit.name",
- getProperty("persistence.unit.name"));
- pTestProps.put("persistence.unit.name.2",
- getProperty("persistence.unit.name.2"));
- pTestProps.put("jakarta.persistence.provider",
- getProperty("jakarta.persistence.provider"));
- pTestProps.put("jakarta.persistence.jdbc.driver",
- getProperty("jakarta.persistence.jdbc.driver"));
- pTestProps.put("jakarta.persistence.jdbc.url",
- getProperty("jakarta.persistence.jdbc.url"));
- pTestProps.put("jakarta.persistence.jdbc.user",
- getProperty("jakarta.persistence.jdbc.user"));
- pTestProps.put("jakarta.persistence.jdbc.password",
- getProperty("jakarta.persistence.jdbc.password"));
- pTestProps.put("jpa.provider.implementation.specific.properties",
- getProperty("jpa.provider.implementation.specific.properties"));
- pTestProps.put("persistence.second.level.caching.supported",
- getProperty("persistence.second.level.caching.supported", "true"));
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELDeliverable.java
deleted file mode 100644
index 3e9e7dc159..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELDeliverable.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.deliverable.el;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.ts.lib.deliverable.el.ELPropertyManager;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-public class ELDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return ELPropertyManager.getTCKPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return ELPropertyManager.getTCKPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return ELPropertyManager.getTCKPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELPropertyManager.java
deleted file mode 100644
index 6c571c438b..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/el/ELPropertyManager.java
+++ /dev/null
@@ -1,92 +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.el;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractPropertyManager;
-import com.sun.ts.lib.deliverable.PropertyNotSetException;
-
-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, Nick Rodin
- */
-public class ELPropertyManager extends AbstractPropertyManager {
-
- private static ELPropertyManager jteMgr = new ELPropertyManager();
-
- private ELPropertyManager() {
- }
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static ELPropertyManager getTCKPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static ELPropertyManager getTCKPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static ELPropertyManager getTCKPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
- pTestProps.put("variable.mapper", getProperty("variable.mapper"));
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSDeliverable.java
deleted file mode 100644
index 9216bdc718..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSDeliverable.java
+++ /dev/null
@@ -1,52 +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.jaxws;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for the jaxws TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- */
-public class JAXWSDeliverable
- extends com.sun.ts.lib.deliverable.tck.TCKDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return JAXWSPropertyManager.getJAXWSPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return JAXWSPropertyManager.getJAXWSPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return JAXWSPropertyManager.getJAXWSPropertyManager();
- }
-
- public boolean supportsInterop() {
- return true;
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSPropertyManager.java
deleted file mode 100644
index f53340893e..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jaxws/JAXWSPropertyManager.java
+++ /dev/null
@@ -1,146 +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.jaxws;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- */
-public class JAXWSPropertyManager
- extends com.sun.ts.lib.deliverable.tck.TCKPropertyManager {
- private static JAXWSPropertyManager jteMgr = new JAXWSPropertyManager();
-
- private String sURLClass1;
-
- private String sURLClass2;
-
- private String sWebServerHost;
-
- private String sWebServerPort;
-
- private String sWebServerHost2;
-
- private String sWebServerPort2;
-
- private String httpSupportsEndpointPublish;
-
- private String httpSupportsEndpointPublish2;
-
- /**
- * This method returns the singleton instance of JAXWSPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return JAXWSPropertyManager - singleton property manager object
- */
- public final static JAXWSPropertyManager getJAXWSPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- jteMgr.initInteropProperties();
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of JAXWSPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return JAXWSPropertyManager - singleton property manager object
- */
- public final static JAXWSPropertyManager getJAXWSPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JAXWSPropertyManager getJAXWSPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- pTestProps.put("porting.ts.url.class.2",
- getProperty("porting.ts.url.class.2"));
- return pTestProps;
- }
-
- public void forwardValues() {
- // reverse all interop props
- setProperty("porting.ts.url.class.1", sURLClass1);
- setProperty("porting.ts.url.class.2", sURLClass2);
- setProperty("webServerHost", sWebServerHost);
- setProperty("webServerHost.2", sWebServerHost2);
- setProperty("webServerPort", sWebServerPort);
- setProperty("webServerPort.2", sWebServerPort2);
- setProperty("http.server.supports.endpoint.publish",
- httpSupportsEndpointPublish);
- setProperty("http.server.supports.endpoint.publish.2",
- httpSupportsEndpointPublish2);
- super.forwardValues();
- }
-
- public void reverseValues() {
- // reverse all interop props
- setProperty("porting.ts.url.class.1", sURLClass2);
- setProperty("porting.ts.url.class.2", sURLClass1);
- setProperty("webServerHost", sWebServerHost2);
- setProperty("webServerHost.2", sWebServerHost);
- setProperty("webServerPort", sWebServerPort2);
- setProperty("webServerPort.2", sWebServerPort);
- setProperty("http.server.supports.endpoint.publish",
- httpSupportsEndpointPublish2);
- setProperty("http.server.supports.endpoint.publish.2",
- httpSupportsEndpointPublish);
- super.reverseValues();
- }
-
- private void initInteropProperties() {
- sURLClass1 = getProperty("porting.ts.url.class.1", null);
- sURLClass2 = getProperty("porting.ts.url.class.2", null);
- sWebServerHost = getProperty("webServerHost", null);
- sWebServerPort = getProperty("webServerPort", null);
- sWebServerHost2 = getProperty("webServerHost.2", null);
- sWebServerPort2 = getProperty("webServerPort.2", null);
- httpSupportsEndpointPublish = getProperty(
- "http.server.supports.endpoint.publish", null);
- httpSupportsEndpointPublish2 = getProperty(
- "http.server.supports.endpoint.publish.2", null);
-
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSDeliverable.java
deleted file mode 100644
index 8e680475c1..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSDeliverable.java
+++ /dev/null
@@ -1,70 +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.jms;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-import java.util.Hashtable;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Dianne Jiao
- */
-public class JMSDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return JMSPropertyManager.getJMSPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return JMSPropertyManager.getJMSPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return JMSPropertyManager.getJMSPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
-
- if (htTSValidVehicles == null) {
- // TS hash table
- htTSValidVehicles = new Hashtable();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- }
- return htTSValidVehicles;
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSPropertyManager.java
deleted file mode 100644
index 71ff0c5587..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jms/JMSPropertyManager.java
+++ /dev/null
@@ -1,85 +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.jms;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Dianne Jiao
- */
-public class JMSPropertyManager extends AbstractPropertyManager {
- private static JMSPropertyManager jteMgr = new JMSPropertyManager();
-
- private JMSPropertyManager() {
- }
-
- /**
- * This method returns the singleton instance of JMSPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return JMSPropertyManager - singleton property manager object
- */
- public final static JMSPropertyManager getJMSPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of JMSPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return JMSPropertyManager - singleton property manager object
- */
- public final static JMSPropertyManager getJMSPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JMSPropertyManager getJMSPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * This method is called by the test harness to retrieve all properties needed
- * by a particular test.
- *
- * @param sPropKeys
- * - Properties to retrieve
- * @return Properties - all property/value pairs from the ts.jte file
- */
- public Properties getTestSpecificProperties(String[] sPropKeys)
- throws PropertyNotSetException {
- Properties pTestProps = getJteProperties();
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPADeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPADeliverable.java
deleted file mode 100644
index ba80764aa5..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPADeliverable.java
+++ /dev/null
@@ -1,91 +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.jpa;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.util.TestUtil;
-import java.io.File;
-import java.util.Map;
-import java.util.Properties;
-
-public class JPADeliverable extends AbstractDeliverable {
-
- private static String PERSISTENCE_ARCHIVE_FILE_EXT = ".jar";
-
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return JPAPropertyManager.getJPAPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return JPAPropertyManager.getJPAPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return JPAPropertyManager.getJPAPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-
- public String getAdditionalClasspath(String distDir) {
- String result = null;
- TestUtil
- .logMsg("Search for persistence archives under the current dist dir:"
- + distDir);
- File currentDistDirAsFile = new File(distDir);
- for (File aFile : currentDistDirAsFile.listFiles()) {
- if (!aFile.isDirectory()
- && aFile.getName().endsWith(PERSISTENCE_ARCHIVE_FILE_EXT)) {
- TestUtil.logMsg("Found persistence archive file: " + aFile.getName());
- if (result == null) {
- // the first persistence archive file in the current dist dir
- result = aFile.getAbsolutePath();
- } else {
- // we already have found other persistence archives in the current
- // dist dir
- result += File.pathSeparator + aFile.getAbsolutePath();
- }
- }
- }
- TestUtil.logMsg(
- "Will need to append the following to test run classpath: " + result);
- return result;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPAPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPAPropertyManager.java
deleted file mode 100644
index f9dd103adc..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jpa/JPAPropertyManager.java
+++ /dev/null
@@ -1,152 +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.jpa;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractPropertyManager;
-import com.sun.ts.lib.deliverable.PropertyNotSetException;
-import com.sun.ts.tests.jpa.common.PMClientBase;
-
-import java.util.Properties;
-
-public class JPAPropertyManager extends AbstractPropertyManager {
-
- private static JPAPropertyManager jteMgr = new JPAPropertyManager();
-
- /**
- * This method returns the singleton instance of JPAPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return JPAPropertyManager - singleton property manager object
- */
- public final static JPAPropertyManager getJPAPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of JPAPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return JPAPropertyManager - singleton property manager object
- */
- public final static JPAPropertyManager getJPAPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JPAPropertyManager getJPAPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null) {
- tsHome = getProperty("cts_home", null);
- }
- if (tsHome != null) {
- pTestProps.put("cts_home", tsHome);
- }
-
- // get persistence tck specific properties
- String mode = getProperty(PMClientBase.MODE_PROP, "standalone");
- String puName = getProperty(PMClientBase.PERSISTENCE_UNIT_NAME_PROP);
- String secondPUName = getProperty(
- PMClientBase.SECOND_PERSISTENCE_UNIT_NAME_PROP);
- String provider = getProperty(PMClientBase.JAVAX_PERSISTENCE_PROVIDER);
- String driver = getProperty(PMClientBase.JAVAX_PERSISTENCE_JDBC_DRIVER);
- String url = getProperty(PMClientBase.JAVAX_PERSISTENCE_JDBC_URL);
- String user = getProperty(PMClientBase.JAVAX_PERSISTENCE_JDBC_USER);
- String password = getProperty(PMClientBase.JAVAX_PERSISTENCE_JDBC_PASSWORD);
- String provider_specific = getProperty(
- PMClientBase.JPA_PROVIDER_IMPLEMENTATION_SPECIFIC_PROPERTIES);
- String errorMsg = "";
- if (mode == null) {
- errorMsg += PMClientBase.MODE_PROP + " is not set in ts.jte. ";
- }
- if (puName == null) {
- errorMsg += PMClientBase.PERSISTENCE_UNIT_NAME_PROP
- + " is not set in ts.jte. ";
- }
- if (secondPUName == null) {
- errorMsg += PMClientBase.SECOND_PERSISTENCE_UNIT_NAME_PROP
- + " is not set in ts.jte. ";
- }
- if (provider == null) {
- errorMsg += PMClientBase.JAVAX_PERSISTENCE_PROVIDER
- + " is not set in ts.jte. ";
- }
- if (driver == null) {
- errorMsg += PMClientBase.JAVAX_PERSISTENCE_JDBC_DRIVER
- + " is not set in ts.jte. ";
- }
- if (url == null) {
- errorMsg += PMClientBase.JAVAX_PERSISTENCE_JDBC_URL
- + " is not set in ts.jte. ";
- }
- if (user == null) {
- errorMsg += PMClientBase.JAVAX_PERSISTENCE_JDBC_USER
- + " is not set in ts.jte. ";
- }
- if (password == null) {
- errorMsg += PMClientBase.JAVAX_PERSISTENCE_JDBC_PASSWORD
- + " is not set in ts.jte. ";
- }
- if (provider_specific == null) {
- errorMsg += PMClientBase.JPA_PROVIDER_IMPLEMENTATION_SPECIFIC_PROPERTIES
- + " is not set in ts.jte. ";
- }
- if (errorMsg.length() > 0) {
- throw new PropertyNotSetException(errorMsg);
- } else {
- pTestProps.put(PMClientBase.MODE_PROP, mode);
- pTestProps.put(PMClientBase.PERSISTENCE_UNIT_NAME_PROP, puName);
- pTestProps.put(PMClientBase.SECOND_PERSISTENCE_UNIT_NAME_PROP,
- secondPUName);
- pTestProps.put(PMClientBase.JAVAX_PERSISTENCE_PROVIDER, provider);
- pTestProps.put(PMClientBase.JAVAX_PERSISTENCE_JDBC_DRIVER, driver);
- pTestProps.put(PMClientBase.JAVAX_PERSISTENCE_JDBC_URL, url);
- pTestProps.put(PMClientBase.JAVAX_PERSISTENCE_JDBC_USER, user);
- pTestProps.put(PMClientBase.JAVAX_PERSISTENCE_JDBC_PASSWORD, password);
- pTestProps.put(
- PMClientBase.JPA_PROVIDER_IMPLEMENTATION_SPECIFIC_PROPERTIES,
- provider_specific);
- }
- pTestProps.put("persistence.second.level.caching.supported",
- getProperty("persistence.second.level.caching.supported", "true"));
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFDeliverable.java
deleted file mode 100644
index 601b27dee6..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFDeliverable.java
+++ /dev/null
@@ -1,70 +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.jsf;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.ts.lib.deliverable.tck.TCKPropertyManager;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for a generic TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- * @author Kyle Grucci
- */
-public class JSFDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return JSFPropertyManager.getTCKPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return JSFPropertyManager.getTCKPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return JSFPropertyManager.getTCKPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFPropertyManager.java
deleted file mode 100644
index 4dcc409ee0..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsf/JSFPropertyManager.java
+++ /dev/null
@@ -1,96 +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.jsf;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractPropertyManager;
-import com.sun.ts.lib.deliverable.PropertyNotSetException;
-
-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, Ryan Lubke
- */
-public class JSFPropertyManager extends AbstractPropertyManager {
-
- private static JSFPropertyManager jteMgr = new JSFPropertyManager();
-
- private JSFPropertyManager() {
- }
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static JSFPropertyManager getTCKPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static JSFPropertyManager getTCKPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JSFPropertyManager getTCKPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
-
- pTestProps.put("cts_home", getProperty("cts_home"));
- pTestProps.put("jsf.core.tld.name", getProperty("jsf.core.tld.name"));
- pTestProps.put("jsf.html.basic.tld.name",
- getProperty("jsf.html.basic.tld.name"));
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBDeliverable.java
deleted file mode 100644
index c0ce9b349a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBDeliverable.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2017, 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.jsonb;
-
-import java.util.Map;
-import java.util.Properties;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-
-/**
- * This class serves as a place for JSONB Deliverable specific info.
- */
-public class JSONBDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return JSONBPropertyManager.getJSONBPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return JSONBPropertyManager.getJSONBPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return JSONBPropertyManager.getJSONBPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBPropertyManager.java
deleted file mode 100644
index c2c4b0317e..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonb/JSONBPropertyManager.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Copyright (c) 2017, 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.jsonb;
-
-import java.util.Properties;
-
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.AbstractPropertyManager;
-import com.sun.ts.lib.deliverable.PropertyNotSetException;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- */
-public class JSONBPropertyManager extends AbstractPropertyManager {
- private static JSONBPropertyManager jteMgr = new JSONBPropertyManager();
-
- /**
- * This method returns the singleton instance of JSONBPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return JSONBPropertyManager - singleton property manager object
- */
- public final static JSONBPropertyManager getJSONBPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of JSONBPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return JSONBPropertyManager - singleton property manager object
- */
- public final static JSONBPropertyManager getJSONBPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JSONBPropertyManager getJSONBPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null)
- tsHome = getProperty("cts_home", null);
- if (tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPDeliverable.java
deleted file mode 100644
index ff7cf6d62c..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPDeliverable.java
+++ /dev/null
@@ -1,72 +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.deliverable.jsonp;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a place for JSONP Deliverable specific info.
- *
- * @author Art Frechette
- */
-public class JSONPDeliverable extends AbstractDeliverable
-{
- public PropertyManagerInterface createPropertyManager(TestEnvironment te) throws Exception
- {
- return JSONPPropertyManager.getJSONPPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p) throws Exception
- {
- return JSONPPropertyManager.getJSONPPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception
- {
- return JSONPPropertyManager.getJSONPPropertyManager();
- }
-
- public boolean supportsAutoDeployment()
- {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin()
- {
- return false;
- }
-
- public boolean supportsInterop()
- {
- return false;
- }
-
- public Map getValidVehicles()
- {
- super.getValidVehicles();
-
- //add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles", new String[]{"standalone"});
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPPropertyManager.java
deleted file mode 100644
index f25692e39a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/jsonp/JSONPPropertyManager.java
+++ /dev/null
@@ -1,88 +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.deliverable.jsonp;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Art Frechette
- */
-public class JSONPPropertyManager extends AbstractPropertyManager {
- private static JSONPPropertyManager jteMgr = new JSONPPropertyManager();
-
- /**
- * This method returns
- * the singleton instance of JSONPPropertyManager which provides access
- * to all ts.jte properties. This is only called once by the test harness.
- *
- * @param env - TestEnvironment object from JavaTest
- * @return JSONPPropertyManager - singleton property manager object
- */
- public final static JSONPPropertyManager getJSONPPropertyManager (TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns
- * the singleton instance of JSONPPropertyManager which provides access
- * to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p - Properties object from JavaTest
- * @return JSONPPropertyManager - singleton property manager object
- */
- public final static JSONPPropertyManager getJSONPPropertyManager (Properties p) throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static JSONPPropertyManager getJSONPPropertyManager () throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1", getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
- if(tsHome == null)
- tsHome = getProperty("cts_home", null);
- if(tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
-
-
-
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTDeliverable.java
deleted file mode 100644
index b831399447..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTDeliverable.java
+++ /dev/null
@@ -1,70 +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.mgmt;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.porting.DeploymentInfo;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.SunRIDeploymentInfo;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Anand Dhingra
- */
-public class MGMTDeliverable extends AbstractDeliverable {
-
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return MGMTPropertyManager.getMGMTPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return MGMTPropertyManager.getMGMTPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return MGMTPropertyManager.getMGMTPropertyManager();
- }
-
- public Map getValidVehicles() {
- if (htTSValidVehicles == null) {
- // TS hash table
- htTSValidVehicles = new Hashtable();
- // add mgmt values
- htTSValidVehicles.put("tests_j2eetools_mgmt.service_eetest.vehicles",
- new String[] { "ejb" });
- }
- return htTSValidVehicles;
- }
-
- public DeploymentInfo getDeploymentInfo(String earFile,
- String[] sValidRuntimeInfoFilesArray) {
- DeploymentInfo info = null;
- try {
- info = new SunRIDeploymentInfo(earFile, sValidRuntimeInfoFilesArray);
- } catch (Exception e) {
- e.printStackTrace();
- }
- return info;
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTPropertyManager.java
deleted file mode 100644
index cb23cf4151..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/mgmt/MGMTPropertyManager.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.mgmt;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Kyle Grucci
- */
-public class MGMTPropertyManager extends AbstractPropertyManager {
- private static MGMTPropertyManager jteMgr = new MGMTPropertyManager();
-
- private MGMTPropertyManager() {
- }
-
- /**
- * This method returns the singleton instance of MGMTPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return MGMTPropertyManager - singleton property manager object
- */
- public final static MGMTPropertyManager getMGMTPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of MGMTPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return MGMTPropertyManager - singleton property manager object
- */
- public final static MGMTPropertyManager getMGMTPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static MGMTPropertyManager getMGMTPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String ctsHome = getProperty("cts_home", null);
- if (ctsHome != null) {
- pTestProps.put("cts_home", ctsHome);
- }
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIDeliverable.java
deleted file mode 100644
index 100efee712..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIDeliverable.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (c) 2017, 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.securityapi;
-
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.tck.TCKDeliverable;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for a generic TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- * @author
- */
-public class SecurityAPIDeliverable extends TCKDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return SecurityAPIPropertyManager.getSecurityAPIPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return SecurityAPIPropertyManager.getSecurityAPIPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return SecurityAPIPropertyManager.getSecurityAPIPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIPropertyManager.java
deleted file mode 100644
index a0dbc8dab2..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/securityapi/SecurityAPIPropertyManager.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Copyright (c) 2017, 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.securityapi;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.javatest.*;
-import java.util.*;
-import com.sun.ts.lib.deliverable.tck.TCKPropertyManager;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author
- */
-public class SecurityAPIPropertyManager extends TCKPropertyManager {
- private static SecurityAPIPropertyManager jteMgr = new SecurityAPIPropertyManager();
-
- /**
- * This method returns the singleton instance of SecurityAPIPropertyManager
- * which provides access to all ts.jte properties. This is only called once by
- * the test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return SecurityAPIPropertyManager - singleton property manager object
- */
- public final static SecurityAPIPropertyManager getSecurityAPIPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of SecurityAPIPropertyManager
- * which provides access to all ts.jte properties. This is only called by the
- * init() method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return SecurityAPIPropertyManager - singleton property manager object
- */
- public final static SecurityAPIPropertyManager getSecurityAPIPropertyManager(
- Properties p) throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static SecurityAPIPropertyManager getSecurityAPIPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- pTestProps.put("porting.ts.HttpsURLConnection.class.1",
- getProperty("porting.ts.HttpsURLConnection.class.1", null));
-
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null)
- tsHome = getProperty("cts_home", null);
- if (tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletDeliverable.java
deleted file mode 100644
index f81b44c79a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletDeliverable.java
+++ /dev/null
@@ -1,70 +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.deliverable.servlet;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-import com.sun.ts.lib.deliverable.tck.TCKDeliverable;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for a generic TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- * @author
- */
-public class ServletDeliverable extends TCKDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return ServletPropertyManager.getServletPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return ServletPropertyManager.getServletPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return ServletPropertyManager.getServletPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletPropertyManager.java
deleted file mode 100644
index 3ea21810fd..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/servlet/ServletPropertyManager.java
+++ /dev/null
@@ -1,100 +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.deliverable.servlet;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-import com.sun.ts.lib.deliverable.tck.TCKPropertyManager;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author
- */
-public class ServletPropertyManager extends TCKPropertyManager {
- private static ServletPropertyManager jteMgr = new ServletPropertyManager();
-
- /**
- * This method returns the singleton instance of ServletPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return ServletPropertyManager - singleton property manager object
- */
- public final static ServletPropertyManager getServletPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of ServletPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return ServletPropertyManager - singleton property manager object
- */
- public final static ServletPropertyManager getServletPropertyManager(
- Properties p) throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static ServletPropertyManager getServletPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- pTestProps.put("porting.ts.HttpsURLConnection.class.1",
- getProperty("porting.ts.HttpsURLConnection.class.1", null));
-
- String sTlsClientProtocol = getProperty("client.cert.test.jdk.tls.client.protocols", null);
- if (sTlsClientProtocol != null) {
- pTestProps.put("client.cert.test.jdk.tls.client.protocols", sTlsClientProtocol);
- }
-
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null)
- tsHome = getProperty("cts_home", null);
- if (tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandaloneDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandaloneDeliverable.java
deleted file mode 100644
index ae142fdb1b..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandaloneDeliverable.java
+++ /dev/null
@@ -1,69 +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.standalone;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for a standalone TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- * @author Kyle Grucci
- */
-public class StandaloneDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return StandalonePropertyManager.getStandalonePropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return StandalonePropertyManager.getStandalonePropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return StandalonePropertyManager.getStandalonePropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandalonePropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandalonePropertyManager.java
deleted file mode 100644
index ad1a865909..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/standalone/StandalonePropertyManager.java
+++ /dev/null
@@ -1,91 +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.standalone;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Kyle Grucci
- */
-public class StandalonePropertyManager extends AbstractPropertyManager {
- private static StandalonePropertyManager jteMgr = new StandalonePropertyManager();
-
- /**
- * This method returns the singleton instance of StandalonePropertyManager
- * which provides access to all ts.jte properties. This is only called once by
- * the test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return StandalonePropertyManager - singleton property manager object
- */
- public final static StandalonePropertyManager getStandalonePropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of StandalonePropertyManager
- * which provides access to all ts.jte properties. This is only called by the
- * init() method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return StandalonePropertyManager - singleton property manager object
- */
- public final static StandalonePropertyManager getStandalonePropertyManager(
- Properties p) throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static StandalonePropertyManager getStandalonePropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null)
- tsHome = getProperty("cts_home", null);
- if (tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKDeliverable.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKDeliverable.java
deleted file mode 100644
index a9e9ec1e52..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKDeliverable.java
+++ /dev/null
@@ -1,69 +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.tck;
-
-import com.sun.ts.lib.deliverable.AbstractDeliverable;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.javatest.TestEnvironment;
-
-import java.util.Map;
-import java.util.Properties;
-
-/**
- * This class serves as a default implementation of the Deliverable interface
- * for a generic TCK. TCKs are free to use this impl if it suits their needs.
- * Otherwise, it should be extended.
- *
- * @author Kyle Grucci
- */
-public class TCKDeliverable extends AbstractDeliverable {
- public PropertyManagerInterface createPropertyManager(TestEnvironment te)
- throws Exception {
- return TCKPropertyManager.getTCKPropertyManager(te);
- }
-
- public PropertyManagerInterface createPropertyManager(Properties p)
- throws Exception {
- return TCKPropertyManager.getTCKPropertyManager(p);
- }
-
- public PropertyManagerInterface getPropertyManager() throws Exception {
- return TCKPropertyManager.getTCKPropertyManager();
- }
-
- public boolean supportsAutoDeployment() {
- return false;
- }
-
- public boolean supportsAutoJMSAdmin() {
- return false;
- }
-
- public boolean supportsInterop() {
- return false;
- }
-
- public Map getValidVehicles() {
- super.getValidVehicles();
-
- // add default values
- htTSValidVehicles.put("tests.service_eetest.vehicles",
- new String[] { "standalone" });
-
- return htTSValidVehicles;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKPropertyManager.java b/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKPropertyManager.java
deleted file mode 100644
index 23055f7f4a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/deliverable/tck/TCKPropertyManager.java
+++ /dev/null
@@ -1,91 +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.tck;
-
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ts.lib.util.*;
-import com.sun.javatest.*;
-import java.util.*;
-import java.io.*;
-
-/**
- * This class serves as a well known place for harness, util, and porting
- * classes to retrieve property values.
- *
- * @author Kyle Grucci
- */
-public class TCKPropertyManager extends AbstractPropertyManager {
- private static TCKPropertyManager jteMgr = new TCKPropertyManager();
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called once by the
- * test harness.
- *
- * @param env
- * - TestEnvironment object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static TCKPropertyManager getTCKPropertyManager(
- TestEnvironment env) throws Exception {
- jteMgr.setTestEnvironment(env);
- return jteMgr;
- }
-
- /**
- * This method returns the singleton instance of TCKPropertyManager which
- * provides access to all ts.jte properties. This is only called by the init()
- * method in ManualDeployment.java
- *
- * @param p
- * - Properties object from JavaTest
- * @return TCKPropertyManager - singleton property manager object
- */
- public final static TCKPropertyManager getTCKPropertyManager(Properties p)
- throws Exception {
- jteMgr.setJteProperties(p);
- return jteMgr;
- }
-
- public final static TCKPropertyManager getTCKPropertyManager()
- throws Exception {
- return jteMgr;
- }
-
- /**
- * 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 {
- Properties pTestProps = super.getTestSpecificProperties(sPropKeys);
- String sJtePropVal = "";
- pTestProps.put("porting.ts.url.class.1",
- getProperty("porting.ts.url.class.1"));
- String tsHome = getProperty("TS_HOME", null);
- if (tsHome == null)
- tsHome = getProperty("cts_home", null);
- if (tsHome != null)
- pTestProps.put("cts_home", tsHome);
-
- return pTestProps;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/common/SunRIURL.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/common/SunRIURL.java
deleted file mode 100644
index 3a8ecf456c..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/common/SunRIURL.java
+++ /dev/null
@@ -1,93 +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.implementation.sun.common;
-
-import java.net.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.*;
-
-/**
- * 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) {
- TestUtil.logErr("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/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/AuthDataCallbackHandler.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/AuthDataCallbackHandler.java
deleted file mode 100644
index dd6f11ad7e..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/AuthDataCallbackHandler.java
+++ /dev/null
@@ -1,54 +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.lib.implementation.sun.javaee;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.NameCallback;
-import javax.security.auth.callback.PasswordCallback;
-
-public class AuthDataCallbackHandler implements CallbackHandler {
- private String user;
-
- private String password;
-
- public AuthDataCallbackHandler() {
- // Default constructor sets the user and password to j2ee
- // this is used for ejb3.0 dependency injection based tests and others
- user = "j2ee";
- password = "j2ee";
-
- }
-
- public AuthDataCallbackHandler(String usr, String pwd) {
- user = usr;
- password = pwd;
-
- }
-
- public void handle(Callback[] callbacks) {
- for (Callback cb : callbacks) {
- if (cb instanceof NameCallback) {
- NameCallback nc = (NameCallback) cb;
- nc.setName(user);
- } else if (cb instanceof PasswordCallback) {
- PasswordCallback pc = (PasswordCallback) cb;
- pc.setPassword(password.toCharArray());
- }
- }
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/GlassFishLoginContext.java.src b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/GlassFishLoginContext.java.src
deleted file mode 100644
index ba81b76c0a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/GlassFishLoginContext.java.src
+++ /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
- */
-
-package com.sun.ts.lib.implementation.sun.javaee;
-
-import com.sun.ts.lib.porting.TSLoginContextInterface;
-import com.sun.ts.lib.util.TestUtil;
-import com.sun.enterprise.security.auth.login.*;
-
-/**
- * TSLoginContext provides the implementation specific code for allowing a
- * program to login as a specific user.
- */
-public class GlassFishLoginContext implements TSLoginContextInterface {
-
- private int USERNAME_PASSWORD = 1;
-
- /**
- * Provides LoginContext needed to perform login.
- *
- */
- public GlassFishLoginContext() throws Exception {
- }
-
- /**
- * Performs login with username and password
- *
- * @param usr
- * the username to login
- * @param pwd
- * the password of user
- */
- public void login(String usr, String pwd) throws Exception {
- try {
- System.out.println("SunRI Login: " + usr + "/" + pwd);
- LoginContextDriver.doClientLogin(USERNAME_PASSWORD,
- new AuthDataCallbackHandler(usr, pwd));
- } catch (Exception e) {
- e.printStackTrace();
- throw e;
- }
- }
-
- /**
- * Performs Certificate based login
- *
- * Note: This method also uses keystore and keystore password from the TS
- * configuration file(ts.jte)
- *
- * @param alias
- * - alias is used to pick up the certificate from keystore
- */
- public void login(String useralias) throws Exception {
- // This method is deprecated.
- // Handling certificates based on user alias is
- // done through system property javax.net.ssl.keyStore and
- // javax.net.ssl.keyStorePassword. Runtime uses these system properties to
- // pickup the right certificates for login.
-
- }
-
- /**
- * Performs 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 useralias, String keystore, String keyPass)
- throws Exception {
-
- // This method is deprecated.
- // Handling certificates based on user alias is
- // done through system property javax.net.ssl.keyStore and
- // javax.net.ssl.keyStorePassword. Runtime uses these system properties to
- // pickup the right certificates for login.
-
- }
-
- /**
- * Performs logout
- */
- public Boolean logout() {
- Boolean result = new Boolean(false);
- try {
- LoginContextDriver.logout();
- result = true;
- } catch (Exception e) {
- e.printStackTrace();
- }
- return result;
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/RuntimeInfo.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/RuntimeInfo.java
deleted file mode 100644
index 9713f31056..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/RuntimeInfo.java
+++ /dev/null
@@ -1,30 +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.implementation.sun.javaee;
-
-import com.sun.ts.lib.porting.DeploymentInfo;
-
-public class RuntimeInfo {
- public final String getRuntimeInfo(DeploymentInfo info) {
- StringBuffer result = new StringBuffer(
- "*********************************************\n");
- result.append(
- "You must use the following information to deploy the application:\n\n");
- result.append(info.getContentAsXml());
- return result.toString();
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment.java
deleted file mode 100644
index 8d753daa43..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment.java
+++ /dev/null
@@ -1,56 +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.implementation.sun.javaee;
-
-import java.io.*;
-
-import com.sun.ts.lib.porting.*;
-import com.sun.ts.lib.deliverable.*;
-
-/**
- * This is an implementation of the TSDeploymentInterface. An implementation of
- * this class must be supplied by any Java EE implementation wishing to have
- * JavaTest (the harness which drives the TS tests) automatically deploy and
- * undeploy test applications. Providing this functionality enables the entire
- * test suite to be run without having to manually deploy/undeploy the Java EE
- * test applications prior to running the tests. This particular implementation
- * uses the deploy/undeploy semantics of Sun's Java EE reference implementation.
- *
- * @author Kyle Grucci
- */
-public class SunRIDeployment extends SunRIDeployment14
- implements 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 PropertyManagerInterface. Please
- * see Sun's implementation of this method (below) for an example.
- *
- * @param writer
- * The PrintWriter that should be used to log output.
- */
- public void init(PrintWriter out) {
- try {
- System.out.println("SunRIDeployment: in init");
- PropertyManagerInterface propMgr = DeliverableFactory
- .getDeliverableInstance().getPropertyManager();
- init(out, "", propMgr);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment14.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment14.java
deleted file mode 100644
index d559f30a0d..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIDeployment14.java
+++ /dev/null
@@ -1,871 +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.implementation.sun.javaee;
-
-import java.util.*;
-import java.io.*;
-import java.net.*;
-
-import com.sun.enterprise.deployment.*;
-import com.sun.enterprise.tools.packager.*;
-import com.sun.enterprise.tools.deployment.main.*;
-import com.sun.enterprise.tools.deployment.backend.*;
-import com.sun.enterprise.resource.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.*;
-import com.sun.ts.lib.deliverable.*;
-import com.sun.ejb.sqlgen.DBInfo;
-import com.sun.ejb.sqlgen.SQLGenerator;
-
-/**
- * This particular implementation uses the deploy/undeploy semantics of Sun's
- * Java EE reference implementation. This is a utility class used by both
- * SunRIDeployment and SunRIPortingServer.
- *
- * @author Kyle Grucci
- */
-public class SunRIDeployment14 {
- protected DeployTool deployTool = new DeployTool(false);
-
- protected ComponentPackager packager = new ComponentPackager();
-
- // public static TSDeployment deployTool = null;
- protected URL[] urls = new URL[1];
-
- protected PrintWriter Log = null;
-
- protected Hashtable htDeployedApps = new Hashtable();
-
- protected PropertyManagerInterface propMgr = null;
-
- protected String slastDeploymentHost = "";
-
- protected String slastDeploymentPort = "";
-
- protected File fRIEarFile = null;
-
- protected String sHarnessTempDir = "";
-
- protected String sRIAppName = "";
-
- // protected Application standaloneComponent = null;
- protected Hashtable htJNDIRefs = null;
-
- protected String sImplID = "";
-
- public void init(PrintWriter out, String id, PropertyManagerInterface pmi) {
- Log = out;
- sImplID = id;
- propMgr = pmi;
-
- try {
- sHarnessTempDir = propMgr.getProperty("harness.temp.directory");
- } catch (PropertyNotSetException pe) {
- Log.print(pe.getMessage());
- Log.print("error looking up property: harness.temp.directory");
- pe.printStackTrace();
- }
- }
-
- protected String[] setRunTimeInfo(String s, String sApp)
- throws TSDeploymentException {
- String[] sRunTimeFiles = null;
- Application toSet = null;
- StringTokenizer st = new StringTokenizer(s);
- int iCount = st.countTokens();
- String sAppName = sApp.substring(sApp.lastIndexOf(File.separator) + 1,
- sApp.lastIndexOf("."));
- String sSweptRuntimeFile = "";
- sRunTimeFiles = new String[iCount];
- // sAppNameOnly = (new File(sApp)).getName();
- File fApp = new File(sApp);
- sRIAppName = sHarnessTempDir + File.separator + sImplID + fApp.getName();
-
- try {
- // reset
- fRIEarFile = null;
- fRIEarFile = new File(sRIAppName);
- } catch (Exception ioe) {
- Log.print(ioe.getMessage());
- throw new TSDeploymentException(ioe.getMessage());
- }
-
- for (int ii = 0; ii < iCount; ii++) {
- // set runtime info for each file
- sRunTimeFiles[ii] = st.nextToken().trim();
-
- try {
- TestUtil.logHarness("fApp = " + fApp.getPath());
- TestUtil.logHarness("fRIFile = " + sRIAppName);
- packager.setRuntimeDeploymentInfo(fApp, new File(sRunTimeFiles[ii]),
- fRIEarFile);
- Log.print("setRuntimeInfo done with: " + sRunTimeFiles[ii]);
-
- // After the first time through, make sure we use the tmp ear
- // file
- if (fRIEarFile != null) {
- fApp = fRIEarFile;
- fRIEarFile = null;
- }
- } catch (Throwable t) {
- Log.print("*****************??????");
- Log.print(t.getMessage());
- Log.print("*****************??????");
- System.out.println("*****************??????");
- t.printStackTrace(Log);
- t.printStackTrace();
- System.out.println("Exception = " + t.getMessage());
- System.out.println("*****************??????");
- Log.print("Warning: Failed to set runtime info in " + sRunTimeFiles[ii]
- + " for application, " + sApp);
- throw new TSDeploymentException(t.getMessage());
- }
- }
- return sRunTimeFiles;
- }
-
- /**
- * This method is called by the test harness to deploy an .ear file into Sun
- * 's Java EE reference 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. This 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 {
- Application toDeploy = null;
- String bGenerateSQL = info.getProperty("generateSQL");
- String sDeployHost = info.getProperty("deployment_host");
- String sApp = info.getEarFile();
- String[] sRunTimeFileArray = info.getRuntimeFiles();
- String sRunTimeFiles = "";
- File clientClassesFile = null;
- // URL[] returnURL = new URL[1];
- String sTSDeploymentDir = sApp.substring(0,
- sApp.lastIndexOf(File.separator) + 1) + "ts_dep";
- File ctsDeployDir = new File(sTSDeploymentDir);
- boolean bDeployFlag = true;
- sRIAppName = sHarnessTempDir + File.separator + sImplID
- + (new File(sApp)).getName();
- // standaloneComponent = null;
-
- if (!ctsDeployDir.exists()) {
- if (!ctsDeployDir.mkdir()) {
- throw new TSDeploymentException(
- "Failed to create the cts deployment working directory: "
- + sTSDeploymentDir);
- }
- }
-
- // Set sRunTimeFiles string with contents of runtime files
- // array:
- if (sRunTimeFileArray != null) {
- for (int i = 0; i < sRunTimeFileArray.length; i++) {
- sRunTimeFiles += sRunTimeFileArray[i] + " ";
- }
- }
-
- // create client jar based on app name
- String sClientJarName = sApp.substring(sApp.lastIndexOf(File.separator) + 1,
- sApp.lastIndexOf(".") + 1) + "jar";
-
- // set RI specific runtime info for our app
- if (sRunTimeFiles != null)
- sRunTimeFileArray = setRunTimeInfo(sRunTimeFiles, sApp);
-
- // create the clientclasses directory (if it doesn't exist)
- clientClassesFile = new File(
- sTSDeploymentDir + File.separator + sClientJarName);
-
- Log.println("sApp = " + sApp);
-
- if (bGenerateSQL != null) {
- if (bGenerateSQL.equals("true")) {
- try {
- deployTool.doGenerateSQL(sRIAppName, sDeployHost, false);
- } catch (Exception e) {
- System.err.println("Failed to generate SQL: " + e.getMessage());
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage());
- }
- }
- }
-
- String sApplicationName = "";
-
- try {
-
- fRIEarFile = new File(sRIAppName);
- sApplicationName = com.sun.enterprise.deployment.archivist.ApplicationArchivist
- .getApplicationName(fRIEarFile);
- TestUtil.logHarness("Just got app named: " + sApplicationName);
- } catch (Exception ioe) {
- System.err.println(ioe.getMessage());
- ioe.printStackTrace(Log);
- throw new TSDeploymentException(ioe.getMessage());
- }
-
- try {
- // TestUtil.logHarness("About to check if app is installed: " +
- // sApplicationName);
-
- if (deployTool.getServerManager().isInstalled(sApplicationName,
- sDeployHost)) {
- TestUtil.logHarness(
- "App named : " + sApplicationName + "is currently installed.");
-
- // check here for developer flag to disable undeploy/redeploy
- bDeployFlag = (Boolean
- .valueOf(propMgr.getProperty("undeploy_redeploy_apps")))
- .booleanValue();
-
- if (!bDeployFlag) {
- TestUtil.logHarness(
- "Leaving current app deployed - will not redeploy app");
- return clientClassesFile.toString();
- } else {
- System.err.println(sApplicationName
- + " must be uninstalled before it can be re-deployed.");
- throw new TSDeploymentException(sApplicationName
- + " must be uninstalled before it can be re-deployed.");
- }
- }
-
- // use the old RI api still because we're so close to FCS
- // deployTool.deploy(toDeploy, sDeployHost, null, clientClassesFile);
- // TestUtil.logHarness("About to deploy: " + sApplicationName);
-
- deployTool.deploy(sApplicationName, fRIEarFile, sDeployHost, null,
- clientClassesFile);
- // TestUtil.logHarness("Completed deploy call: " + sApplicationName);
-
- } catch (MalformedURLException t) {
- System.err.println(t.getMessage());
- t.printStackTrace(Log);
- throw new TSDeploymentException(t.getMessage());
- } catch (Throwable t) {
- System.err.println(t.getMessage());
- t.printStackTrace(Log);
- t.printStackTrace();
- throw new TSDeploymentException(t.getMessage());
- }
-
- return clientClassesFile.toString();
- }
-
- /**
- * 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 {
- boolean bIsInstalled = false;
- String sDeployHost = p.getProperty("deployment_host");
- String sApp = p.getProperty("ear_file");
- Application toDeploy = null;
- sRIAppName = sHarnessTempDir + File.separator + sImplID
- + (new File(sApp)).getName();
-
- TestUtil.logHarnessDebug("Deployhost = " + sDeployHost);
- String sApplicationName = "";
-
- try {
- TestUtil.logHarnessDebug("isdeploy called with: " + sApp);
-
- File fApp = new File(sRIAppName);
-
- // if the ri ear does not exist, use the portable ear
- if (!fApp.exists()) {
- fApp = new File(sApp);
- TestUtil.logHarness("Using app from dist directory");
- }
- TestUtil.logHarnessDebug("isdeploy called with: " + sApp);
-
- TestUtil.logHarness("Before getting app name");
- sApplicationName = com.sun.enterprise.deployment.archivist.ApplicationArchivist
- .getApplicationName(fApp);
- TestUtil.logHarness(
- "After getting app name from archivist: " + sApplicationName);
-
- htDeployedApps.put(fApp.getName(), sApplicationName);
- } catch (Exception ioe) {
- Log.println(
- "Failed while checking if app was already deployed: " + sRIAppName);
- ioe.printStackTrace(Log);
- ioe.printStackTrace();
- throw new TSDeploymentException(ioe.getMessage());
- }
-
- try {
- if (deployTool.getServerManager().isInstalled(sApplicationName,
- sDeployHost)) {
- bIsInstalled = true;
- }
- } catch (Exception t) {
- Log.println(
- "Failed while checking if app was already deployed: " + sApp);
- t.printStackTrace();
- throw new TSDeploymentException(t.getMessage());
- }
-
- TestUtil.logHarness("isdeploy returning : " + bIsInstalled);
-
- return bIsInstalled;
- }
-
- /**
- * This method is called by test harness to undeploy an .ear file from Sun's
- * Java EE reference 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 {
- String sDeployHost = p.getProperty("deployment_host");
- String sApp = p.getProperty("ear_file");
- String sAppName = (new File(sApp)).getName();
- String sTSDeploymentDir = sApp.substring(0,
- sApp.lastIndexOf(File.separator) + 1) + "ts_dep";
- File ctsDeployDir = new File(sTSDeploymentDir);
- boolean bDeployFlag = true;
- sRIAppName = sHarnessTempDir + File.separator + sImplID
- + (new File(sApp)).getName();
-
- // remove any client jars if they exist
- if (ctsDeployDir.exists()) {
- File[] fclientFiles = ctsDeployDir.listFiles();
- for (int ii = 0; ii < fclientFiles.length; ii++) {
- if (fclientFiles[ii].isFile()) {
- if (fclientFiles[ii].delete())
- Log.println("Old Client Jar file, " + fclientFiles[ii].getName()
- + ", was successfully deleted.");
- else
- Log.println("Failed to delete old Client Jar file, "
- + fclientFiles[ii].getName() + ".");
- }
- }
- }
-
- sAppName = (String) htDeployedApps.get(sAppName);
- TestUtil.logHarnessDebug("About to try to undeploy Appname: " + sAppName);
-
- try {
- // check here for developer flag to disable undeploy/redeploy
- bDeployFlag = (Boolean
- .valueOf(propMgr.getProperty("undeploy_redeploy_apps")))
- .booleanValue();
-
- if (!bDeployFlag) {
- TestUtil.logHarness(
- "Leaving current app deployed - app will not be undeployed");
- return;
- }
-
- if (deployTool.getServerManager().isInstalled(sAppName, sDeployHost)) {
- deployTool.getServerManager().undeployApplication(sAppName,
- sDeployHost);
- Log.print(sAppName + " was uninstalled from " + sDeployHost);
- TestUtil.logHarness(sAppName + " was uninstalled from " + sDeployHost);
- } else {
- TestUtil.logHarnessDebug("Undeploy called with jar/war: " + sApp);
- TestUtil
- .logHarnessDebug(sAppName + " is not deployed on " + sDeployHost);
- Log.print(sAppName + " is not deployed on " + sDeployHost);
- throw new TSDeploymentException(
- sAppName + " is not deployed on " + sDeployHost);
- }
-
- // remove temporary ri .ear file
- // if(sApp.endsWith(".ear"))
- (new File(sRIAppName)).delete();
- } catch (Exception e) {
- Log.print("Undeployment failed!");
- e.printStackTrace(Log);
- e.printStackTrace();
- Log.print(e.getMessage());
- throw new TSDeploymentException(e.getMessage());
- }
- return;
- }
-
- /**
- * This method is called to deploy a connector (.rar file) to Sun's Java EE
- * reference 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 {
- String sDeployHost = p.getProperty("deployment_host");
- String sRarFileName = p.getProperty("rar_file");
-
- try {
-
- propMgr = DeliverableFactory.getDeliverableInstance()
- .getPropertyManager();
- String sRarPropName = sRarFileName.substring(
- sRarFileName.lastIndexOf(File.separator) + 1,
- sRarFileName.lastIndexOf(".rar"));
- String sRarName = sRarFileName
- .substring(sRarFileName.lastIndexOf(File.separator) + 1);
- String username = propMgr.getProperty("user1");
- String password = propMgr.getProperty("password1");
-
- // Following to be used by JDBC RA
- String connectionURL = propMgr.getProperty("connector_connectionURL");
- String xaDataSource = propMgr
- .getProperty("porting.ts.connector.xaDataSource.class");
- String serverName = propMgr.getProperty("connector_serverName");
- String portNumber = propMgr.getProperty("connector_portNumber");
- String sid = propMgr.getProperty("connector_sid");
- String dbName = propMgr.getProperty("connector_dbName");
-
- // First, deploy the adapter using the deploytool
- String args[] = new String[3];
- args[0] = "-deployConnector";
- args[1] = sRarFileName;
- args[2] = sDeployHost;
-
- TestUtil.logHarnessDebug("deployConnector: calling deploytool: " + args[0]
- + " " + args[1] + " " + args[2]);
- com.sun.enterprise.tools.deployment.main.Main.internalMain(args);
- TestUtil.logHarness("Connector: " + sRarFileName + " has been deployed");
-
- // Differentiate betweenn the JDBC Resource Adapter and TS EIS Resource
- // ADapter. Initialise properties accordingly.
- // Create connection factories using admintool
- // XA rar files have XADataSource, ServerName, PortNumber overridden, and
- // tx files
- // have ConnectionURL overridden.
-
- if (sRarPropName.startsWith("JDBC")) {
- String sJNDIName = propMgr.getProperty(sRarPropName);
- sJNDIName = sJNDIName.substring(("java:comp/").length());
-
- String ra_args[] = new String[7];
- ra_args[0] = "-addConnectorFactory";
- ra_args[1] = sJNDIName;
- ra_args[2] = sRarName;
- ra_args[3] = username;
- ra_args[4] = password;
- ra_args[5] = "-props";
- ra_args[6] = "ConnectionURL=" + connectionURL;
-
- if (sRarName.indexOf("xa") > 0) {
-
- // String xara_args[] = new String[5];
- String xara_args[] = new String[11];
- xara_args[0] = "-addConnectorFactory";
- xara_args[1] = sJNDIName;
- xara_args[2] = sRarName;
- xara_args[3] = username;
- xara_args[4] = password;
- xara_args[5] = "-props";
- xara_args[6] = "XADataSourceName=" + xaDataSource;
- xara_args[7] = "ServerName=" + serverName;
- xara_args[8] = "PortNumber=" + portNumber;
- xara_args[9] = "SID=" + sid;
- xara_args[10] = "DbName=" + dbName;
-
- TestUtil.logHarnessDebug("deployConnector: calling admintool: "
- + xara_args[0] + " " + xara_args[1] + " " + xara_args[2] + " "
- + xara_args[3] + " " + xara_args[4] + " " + xara_args[5] + " "
- + xara_args[6] + " " + xara_args[7] + " " + xara_args[8] + " "
- + xara_args[9] + " " + xara_args[10]);
- com.sun.enterprise.tools.admin.AdminTool.main(xara_args);
- TestUtil.logHarness(
- "XA Connection Factory created with JNDI name: " + xara_args[1]);
-
- } else {
-
- TestUtil.logHarnessDebug(
- "deployConnector: calling admintool: " + ra_args[0] + " "
- + ra_args[1] + " " + ra_args[2] + " " + ra_args[3] + " "
- + ra_args[4] + " " + ra_args[5] + " " + ra_args[6]);
- com.sun.enterprise.tools.admin.AdminTool.main(ra_args);
- TestUtil.logHarness(
- "Connection Factory created with JNDI name: " + ra_args[1]);
- }
-
- } else { // start of TSEIS
-
- String sJNDIName = propMgr.getProperty(sRarPropName);
- sJNDIName = sJNDIName.substring(("java:comp/").length());
- String ra_args[] = new String[5];
- ra_args[0] = "-addConnectorFactory";
- ra_args[1] = sJNDIName;
- ra_args[2] = sRarName;
- ra_args[3] = username;
- ra_args[4] = password;
-
- if (sRarName.indexOf("xa") > 0) {
- String xara_args[] = new String[5];
- xara_args[0] = "-addConnectorFactory";
- xara_args[1] = sJNDIName;
- xara_args[2] = sRarName;
- xara_args[3] = username;
- xara_args[4] = password;
-
- TestUtil.logHarnessDebug("deployConnector: calling admintool: "
- + xara_args[0] + " " + xara_args[1] + " " + xara_args[2] + " "
- + xara_args[3] + " " + xara_args[4]);
- com.sun.enterprise.tools.admin.AdminTool.main(xara_args);
- TestUtil.logHarness(
- "XA Connection Factory created with JNDI name: " + xara_args[1]);
-
- } else {
- TestUtil.logHarnessDebug("deployConnector: calling admintool: "
- + ra_args[0] + " " + ra_args[1] + " " + ra_args[2] + " "
- + ra_args[3] + " " + ra_args[4]);
- com.sun.enterprise.tools.admin.AdminTool.main(ra_args);
- TestUtil.logHarness(
- "Connection Factory created with JNDI name: " + ra_args[1]);
-
- }
- } // end of TSEIS
- } catch (Exception e) {
- TestUtil
- .logHarness("Deployment of Connector: " + sRarFileName + " failed");
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage());
- }
- }
-
- /**
- * This method is called to undeploy a connector (.rar file) from Sun's Java
- * EE reference 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 {
- String sDeployHost = p.getProperty("deployment_host");
- String sRarFileName = p.getProperty("rar_file");
-
- try {
- String sRarName = sRarFileName
- .substring(sRarFileName.lastIndexOf(File.separator) + 1);
- String sRarPropName = sRarFileName.substring(
- sRarFileName.lastIndexOf(File.separator) + 1,
- sRarFileName.lastIndexOf(".rar"));
-
- propMgr = DeliverableFactory.getDeliverableInstance()
- .getPropertyManager();
-
- // remove connection factory for the resource adatper
-
- String sJNDIName = propMgr.getProperty(sRarPropName);
- sJNDIName = sJNDIName.substring(("java:comp/").length());
-
- TestUtil.logHarness("sJNDIName is : " + sJNDIName);
-
- String args2[] = new String[2];
- args2[0] = "-removeConnectorFactory";
- args2[1] = sJNDIName;
- TestUtil.logHarnessDebug(
- "In SunRIDeploy: undeployConnector: calling with args: " + args2[0]
- + " " + args2[1]);
- com.sun.enterprise.tools.admin.AdminTool.main(args2);
- TestUtil.logHarness(
- "Connection Factory with JNDI name: " + args2[1] + " was removed.");
-
- TestUtil.logHarnessDebug("In SunRIDeploy: undeployConnector");
- String args[] = new String[3];
- args[0] = "-undeployConnector";
- args[1] = sRarName;
- args[2] = sDeployHost;
- TestUtil.logHarnessDebug(
- "In SunRIDeploy: undeployConnector: calling with args: " + args[0]
- + " " + args[1] + " " + args[2]);
- com.sun.enterprise.tools.deployment.main.Main.internalMain(args);
- TestUtil.logHarnessDebug(
- "Connector: " + sRarFileName + " has been undeployed");
-
- } catch (Exception e) {
- TestUtil.logHarness(
- "Undeployment of Connector: " + sRarFileName + " failed");
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage());
- }
- }
-
- /**
- * This method is called to check to see if a given connector (.rar file) is
- * deployed on Sun's Java EE reference 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 {
- String sDeployHost = p.getProperty("deployment_host");
- String sRarFileName = p.getProperty("rar_file");
- boolean bIsInstalled = false;
-
- try {
- TestUtil.logHarnessDebug("In SunRIDeploy: isConnectorDeployed");
- JarInstaller backend = deployTool.getServerManager()
- .getServerForName(sDeployHost);
- ConnectorInfo v = backend.listConnectors();
-
- int size = v.connectors.length;
-
- for (int ii = 0; ii < size; ii++) {
- String msg = "connector.info: " + (String) v.connectors[ii];
- TestUtil.logHarnessDebug(msg);
-
- String sRarName = sRarFileName
- .substring(sRarFileName.lastIndexOf(File.separator) + 1);
- TestUtil.logHarnessDebug(
- "In SunRIDeploy: isConnectorDeployed : sRarName = " + sRarName);
- if (((String) v.connectors[ii]).equals(sRarName)) {
- bIsInstalled = true;
- TestUtil.logHarnessDebug("Found connector!");
- break;
- }
- }
- TestUtil.logHarnessDebug(
- "In SunRIDeploy: isConnectorDeployed: returning" + bIsInstalled);
- return bIsInstalled;
- } catch (Exception e) {
- TestUtil.logHarness(
- "Checking if connector: " + sRarFileName + " is deployed - failed");
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage());
- }
- }
-
- /**
- * 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) {
- String executeArgs = p.getProperty("executeArgs");
- String sApp = p.getProperty("ear_file");
- String sEarName = sApp.substring(sApp.lastIndexOf(File.separator) + 1);
- sRIAppName = sHarnessTempDir + File.separator + sImplID + sEarName;
- String sClientClasspath = chooseValidStub(sEarName,
- p.getProperty("clientClasspath"));
-
- if (executeArgs == null)
- executeArgs = "-client " + sRIAppName + " -name "
- + p.getProperty("client_name") + " -stubs " + sClientClasspath;
- else
- executeArgs += " -client " + sRIAppName + " -name "
- + p.getProperty("client_name") + " -stubs " + sClientClasspath;
-
- // reset the property to nothing so it isn't added to the classpath
- p.put("clientClasspath", "");
-
- return executeArgs;
- }
-
- public Hashtable getInteropJNDINames(DeploymentInfo[] infoArray) {
- htJNDIRefs = new Hashtable();
-
- // if((System.getProperty("cts.harness.debug", "false")).equals("true"))
- if (TestUtil.harnessDebug) {
- for (int ii = 0; ii < infoArray.length; ii++) {
- TestUtil.logHarnessDebug("**** ii=" + ii
- + " ***********************************************************************************");
- TestUtil
- .logHarnessDebug(new RuntimeInfo().getRuntimeInfo(infoArray[ii]));
- TestUtil.logHarnessDebug(
- "***************************************************************************************");
-
- Vector resources = infoArray[ii].getAppClientResources();
- for (int i = 0; i < resources.size(); i++) {
- DeploymentInfo.AppClient appResource = (DeploymentInfo.AppClient) resources
- .elementAt(i);
-
- Hashtable jndiChanges = checkJNDINames(appResource.ejbs);
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
-
- /* Web Container */
- resources = infoArray[ii].getWebResources();
- for (int i = 0; i < resources.size(); i++) {
- DeploymentInfo.WebResource webResource = (DeploymentInfo.WebResource) resources
- .elementAt(i);
-
- Hashtable jndiChanges = checkJNDINames(webResource.ejbs);
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
-
- /* EJB Container */
- Vector ejbJars = infoArray[ii].getEjbJars();
- for (int y = 0; y < ejbJars.size(); y++) {
- DeploymentInfo.EJBJar ejbJar = (DeploymentInfo.EJBJar) ejbJars
- .elementAt(y);
- resources = ejbJar.getEjbResources();
- for (int i = 0; i < resources.size(); i++) {
- DeploymentInfo.Ejb ejbResource = (DeploymentInfo.Ejb) resources
- .elementAt(i);
-
- Hashtable jndiChanges = checkJNDINames(ejbResource.ejbs);
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
- }
-
- }
- }
-
- // TestUtil.logHarnessDebug("*****Returning the following Hashtable from
- // SunRIDeployment.getInteropJNDINames*****");
- // TestUtil.logHarnessDebug("***************************************************************************************");
-
- for (Enumeration e = htJNDIRefs.keys(); e.hasMoreElements();) {
- String sKey = (String) e.nextElement();
-
- TestUtil.logHarnessDebug("Original value: " + sKey);
- TestUtil
- .logHarnessDebug("Modified value: " + (String) htJNDIRefs.get(sKey));
- }
- // TestUtil.logHarnessDebug("***************************************************************************************");
-
- return htJNDIRefs;
- }
-
- private Hashtable checkJNDINames(Vector ejbRefs) {
- Hashtable jndiChanges = new Hashtable();
- for (int j = 0; j < ejbRefs.size(); j++) {
- DeploymentInfo.EjbReference ref = (DeploymentInfo.EjbReference) ejbRefs
- .elementAt(j);
- if (ref.jndi.startsWith("corbaname")) {
- int endPos = ref.jndi.lastIndexOf("#");
- // String newJNDI = ref.jndi.substring(0,endPos) + "#myfoo/" +
- String newJNDI = ref.jndi.substring(0, endPos) + "#"
- + ref.jndi.substring(endPos + 1);
- jndiChanges.put(ref.jndi, newJNDI);
- TestUtil.logHarnessDebug(
- "********\nold JNDI name" + ref.jndi + ", new JNDI name" + newJNDI);
- }
- }
- return jndiChanges;
- }
-
- /**
- * chooses a stub jar that belongs to the current vehicle test ear from a list
- * of stub jars separated by file.pathSeparator. This step is necessary for
- * vehicle tests only where multiple stub jars have been appended to the
- * clientClasspath. RI appclient container takes runtime info from the first
- * element in the stubs argument.
- *
- * @param earName
- * name of the ear file, not the full path. For example,
- * testConn_ejb_vehicle.ear
- * @param clientcp
- * client classpath (a list of stub jars)
- * @return full path to a single stub jar that belongs to the current vehicle
- * test ear
- *
- */
- protected String chooseValidStub(String earName, String clientcp) {
- if (clientcp == null) {
- return "";
- }
- // do nothing if not vehicle test 8/7/2002
- // other non-vehicle test directories may also have multiple appclients
- // so we check all types. 8/8/2002
- // if(earName.lastIndexOf("_vehicle") == -1) {
- // return clientcp;
- // }
- int pos = earName.lastIndexOf(".ear");
- String earBaseName = null;
- if (pos != -1) {
- earBaseName = earName.substring(0, pos);
- } else {
- earBaseName = earName;
- }
- StringTokenizer st = new StringTokenizer(clientcp, File.pathSeparator);
- String token = null;
- while (st.hasMoreTokens()) {
- token = st.nextToken();
- if (token.lastIndexOf(earBaseName) != -1) {
- return token;
- }
- }
- StringBuffer msgBuffer = new StringBuffer(600);
- msgBuffer.append("Could not choose a valid stub jar for ear: ")
- .append(earName);
- msgBuffer.append(" from existing clientClasspath: ").append(clientcp);
- msgBuffer.append(". Will use the existing one.");
- TestUtil.logHarness(msgBuffer.toString());
- return clientcp;
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java
deleted file mode 100644
index 598a00b26e..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIHttpsURLConnection.java
+++ /dev/null
@@ -1,195 +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.implementation.sun.javaee;
-
-import com.sun.ts.lib.porting.*;
-
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.SSLSession;
-
-// Implementation Specific Classes
-//import com.sun.net.ssl.HttpsURLConnection;
-//import com.sun.net.ssl.HostnameVerifier;
-//import com.sun.enterprise.security.KeyTool;
-
-import com.sun.ts.lib.util.*;
-import java.io.*;
-import java.net.*;
-
-/**
- * TSHttpsURLConnection provides the HTTPS specific featurs
- *
- */
-public class SunRIHttpsURLConnection implements TSHttpsURLConnectionInterface {
-
- private HttpsURLConnection httpsURLConnection = null;
-
- private HostnameVerifier hostNameVerifier = null;
-
- private URL url = null;
-
- public void SunRIHttpsURLConnection() {
- // do nothing;
- }
-
- /**
- * This method is used to a) open a HttpsURLConnection from a given URL b) set
- * the HostNameVerifier to default MyHostNameVerifier
- *
- * @param url
- * url used to open HttpsURLConnection
- */
- public void init(URL _url) throws IOException {
- url = _url;
- // KeyTool.initProvider();
- httpsURLConnection = (HttpsURLConnection) _url.openConnection();
- hostNameVerifier = new MyHostNameVerifier();
- httpsURLConnection.setHostnameVerifier(hostNameVerifier);
- }
-
- /**
- * Sets the value of the doInput field for this Connection
- *
- * @param doInput
- * - the new value (the default is false)
- */
- public void setDoInput(boolean doInput) {
- httpsURLConnection.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) {
- httpsURLConnection.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) {
- httpsURLConnection.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) {
- httpsURLConnection.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 httpsURLConnection.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 httpsURLConnection.getHeaderField(num);
- }
-
- /**
- * Disconnect connection
- */
- public void disconnect() {
- httpsURLConnection.disconnect();
- }
-
- /**
- * Returns an input stream that reads from the open connection
- *
- * @return InputStream - inputStream
- */
- public InputStream getInputStream() throws IOException {
- return httpsURLConnection.getInputStream();
- }
-
- /**
- * Returns an Output stream that writes to the open connection
- *
- * @return OutputStream - outputStream
- */
- public OutputStream getOutputStream() throws IOException {
- return httpsURLConnection.getOutputStream();
- }
-
- /**
- * This class is used to set HostNameVerifier
- *
- * HostnameVerifier provides a callback mechanism so that implementers of this
- * interface can supply a policy for handling the case where the host to
- * connect to and the server name from the certificate mismatch
- */
- public class MyHostNameVerifier implements HostnameVerifier {
-
- /**
- * Verify that the hostname from the URL is an acceptable match with the
- * value from the common name entry in the server certificate's
- * distinguished name. (i.e the httpsHostName == name entry in the server
- * certificate)
- *
- * For all practical reasons a HttpsServer can have a certificate with any
- * name on it. Because of this reason this implementation doesn't verify the
- * httpsHoseName with the name entry in server ceritificate .
- *
- * @param urlhostname
- * - the https hostname in the url
- * @param certHostName
- * - the name entry in the server certificate
- * @return boolean - this implementation returns true always.
- */
- public boolean verify(String urlhostname, String certHostName) {
-
- return true;
- }
-
- public boolean verify(String urlhostName, SSLSession sslSession) {
- return true;
- }
-
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIJMSAdmin.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIJMSAdmin.java
deleted file mode 100644
index 81850a56d5..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/SunRIJMSAdmin.java
+++ /dev/null
@@ -1,208 +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.implementation.sun.javaee;
-
-import java.util.*;
-import java.io.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.*;
-
-/**
- * This is an implementation of the TSJMSAdminInterface. An implementation of
- * this class must be supplied by any Java EE implementation wishing to have
- * JavaTest (the harness which drives the TS tests) automatically create and
- * remove JMS queues and topics. This particular implementation uses the
- * create/remove semantics of Sun's Java EE reference implementation.
- *
- * @author Kyle Grucci
- */
-public class SunRIJMSAdmin implements TSJMSAdminInterface {
- PrintWriter log = null;
-
- public void init(PrintWriter writer) {
- }
-
- /**
- * This method creates queues in a Java EE implementation.
- *
- * @param queues
- * queues to remove
- *
- */
- public void createQueues(String[] queues) throws TSJMSAdminException {
- }
-
- /**
- * This method removes topics from a Java EE implementation.
- *
- * @param topics
- * topics to remove
- *
- */
- public void createTopics(String[] topics) throws TSJMSAdminException {
- }
-
- /**
- * This method removes queues from a Java EE implementation.
- *
- * @param queues
- * queues to remove
- *
- */
- public void removeQueues(String[] queues) throws TSJMSAdminException {
- }
-
- /**
- * This method removes topics from a Java EE implementation.
- *
- * @param topics
- * topics to remove
- *
- */
- public void removeTopics(String[] topics) throws TSJMSAdminException {
- }
-
- /*
- * Uses adminTool to create a Queue Destination object
- *
- * @param q JNDI name of the Queue Destination object
- *
- */
- private void createQueue(String q) throws Exception {
- }
-
- /*
- * Uses adminTool to create a Topic Destination object
- *
- * @param q JNDI name of the Topic Destination object
- *
- */
- private void createTopic(String topic) throws Exception {
- }
-
- private void deleteDestination(String s) throws Exception {
- }
-
- // ===========
- /**
- * This method creates queueConnectionFactories in a Java EE implementation.
- *
- * Arguments passed as queueConnectionFactories[n],prop[n] where n = offset
- * and the props[n] string is equal to the needed name=value pairs. If more
- * than one property they should be space separated in the props string.
- *
- * @param queueConnectionFactories
- * queueConnectionFactories to create
- * @param props
- * properties for the connection if any
- */
- public void createQueueConnectionFactories(String[] queueConnectionFactories,
- String[] props) throws TSJMSAdminException {
- }
-
- /*
- * Uses adminTool to create a QueueConnectionFactory object
- *
- * @param qConnectionFactory JNDI name of the QueueConnectionFactory object
- *
- * @param props properties for the connection if any
- *
- */
- private void createQueueConnectionFactory(String qConnectionFactory,
- String props) throws Exception {
- }
-
- // ===========
- /**
- * This method creates topicConnectionFactories in a Java EE implementation.
- *
- * Arguments passed as topicConnectionFactories[n],prop[n] where n = offset
- * and the props[n] string is equal to the needed name=value pairs. If more
- * than one property they should be space separated in the props string.
- *
- * @param topicConnectionFactories
- * topicConnectionFactories to create
- * @param props
- * properties if any
- */
- public void createTopicConnectionFactories(String[] topicConnectionFactories,
- String[] props) throws TSJMSAdminException {
- }
-
- /*
- * Uses adminTool to create a TopicConnectionFactory object
- *
- * @param tConnectionFactory JNDI name of the TopicConnectionFactory object
- *
- * @param props properties, if any
- */
- private void createTopicConnectionFactory(String tConnectionFactory,
- String props) throws Exception {
- }
-
- // ===========
- /**
- * This method creates connectionFactories in a Java EE implementation.
- *
- * Arguments passed as connectionFactories[n],prop[n] where n = offset and the
- * props[n] string is equal to the needed name=value pairs. If more than one
- * property they should be space separated in the props string.
- *
- * @param connectionFactories
- * connectionFactories to create
- * @param props
- * properties if any
- */
- public void createConnectionFactories(String[] connectionFactories,
- String[] props) throws TSJMSAdminException {
- }
-
- /*
- * Uses adminTool to create a ConnectionFactory object
- *
- * @param connectionFactory JNDI name of the ConnectionFactory object
- *
- * @param props properties, if any
- */
- private void createConnectionFactory(String connectionFactory, String props)
- throws Exception {
- }
-
- /**
- * This method removes ConnectionFactories from a Java EE implementation.
- *
- * @param topics
- * JmsConnectionFactoryNames to remove
- *
- */
- public void removeJmsConnectionFactories(String[] jmsConnectionFactoryNames)
- throws TSJMSAdminException {
- }
-
- /**
- * This method will delete a JmsConnectory factory from a Java EE
- * implementation.
- *
- * @param factoryName
- * JmsConnectionFactoryName to remove
- *
- */
-
- private void deleteJmsConnectionFactory(String factoryName) throws Exception {
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeployment.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeployment.java
deleted file mode 100755
index f7659554c0..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeployment.java
+++ /dev/null
@@ -1,676 +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.implementation.sun.javaee.glassfish;
-
-import org.apache.tools.ant.*;
-
-import java.io.*;
-import java.util.*;
-import com.sun.ts.lib.porting.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.deliverable.*;
-
-import java.util.jar.JarFile;
-import java.util.jar.JarEntry;
-import org.jdom.input.SAXBuilder;
-import org.jdom.Document;
-import org.jdom.Element;
-import com.sun.ts.lib.implementation.sun.javaee.RuntimeInfo;
-
-/**
- *
- * This class implements the TSDeploymentInterface. It does so by copying
- * to/from the V3 autodeploy directory and delegates out to ant build files
- * under bin/xml/glassfish/deploy.xml
- *
- * @author Kyle Grucci
- *
- */
-public class AutoDeployment implements TSDeploymentInterface {
-
- protected static final String DEPLOYED_MODULES_FILE = "ts-deployed-modules";
-
- protected static String TEMP_DIR;
-
- protected static String SERVER_LOG = "server.log";
-
- private static String newLine = System.getProperty("line.separator", "\n"); // used
- // for
- // log
- // messages
-
- protected PrintWriter log; // Log to harness
-
- protected int iPortingSet = 1; // Porting set using this impl
- // of TSDeploymentInterface
-
- private String url = "deployer:???:???:999"; // URI for DM
-
- protected Hashtable htJNDIRefs = null;
-
- protected Hashtable htDeployedModules = // Map ear files to IDs so we
- new Hashtable(); // can later undeploy
-
- protected PropertyManagerInterface propMgr; // Properties from ts.jte
-
- protected String deployStateFile;
-
- private String sDepNumber = "1";
- /*
- * 1. Need to handle common apps, we can do this programatically
- *
- *
- *
- * /
- *
- * /**
- *
- * Static initialization of this class
- *
- */
- static {
- TestUtil.initJavaTest();
- TEMP_DIR = System.getProperty("java.io.tmpdir");
- if (TEMP_DIR != null && TEMP_DIR.endsWith(File.separator)) {
- TEMP_DIR = TEMP_DIR.substring(0, TEMP_DIR.length() - 1);
- }
- }
-
- /**
- *
- * Initializes logging output, gets the Deliverable instance
- *
- * @param writer
- * PrintWriter for harness tracing
- *
- * @return void
- *
- */
- @Override
- public void init(PrintWriter writer) {
-
- this.log = writer;
- TestUtil.logHarness("AutoDeployment.init()");
-
- iPortingSet = TSDeployment.iPortingSet;
- TestUtil.logHarness("AutoDeployment: Using porting set #" + iPortingSet);
-
- try {
- propMgr = DeliverableFactory.getDeliverableInstance()
- .getPropertyManager();
-
- String portingString = String.valueOf(iPortingSet);
- // initDeployTestUtils(portingString);
-
- String portClass = "porting.ts.deploy2.class." + iPortingSet;
- TestUtil.logHarness("Using " + portClass);
-
- } catch (Exception e) {
- e.printStackTrace();
- TestUtil.logHarness(
- "Creation of TSDeployment implementation instance failed."
- + " Please check the values of 'porting.ts.deploy2.class.1' and"
- + " 'porting.ts.deploy2.class.2'");
- }
- }
-
- private void antSetup(String archive, Project p, String propsNumber) {
- String tsHome = propMgr.getProperty("ts.home", "/");
- String pkgNameMinusArchive = archive.substring(
- archive.indexOf(File.separator + "dist" + File.separator) + 6,
- archive.lastIndexOf(File.separator));
- // String sBuildFile = tsHome + File.separator + "src" + File.separator +
- // pkgNameMinusArchive + File.separator + "build.xml";
-
- String deployHandlerBuildFile;
-
- if (iPortingSet == 1) {
- p.setProperty("deploy.dir",
- propMgr.getProperty("impl.vi.deploy.dir", ""));
- deployHandlerBuildFile = tsHome + File.separator + "bin" + File.separator
- + "xml" + File.separator + "impl" + File.separator
- + propMgr.getProperty("impl.vi", "glassfish") + File.separator
- + "deploy.xml";
- } else {
- p.setProperty("deploy.dir",
- propMgr.getProperty("impl.ri.deploy.dir", ""));
- deployHandlerBuildFile = tsHome + File.separator + "bin" + File.separator
- + "xml" + File.separator + "impl" + File.separator
- + propMgr.getProperty("impl.ri", "glassfish") + File.separator
- + "deploy.xml";
- }
-
- TestUtil.logHarnessDebug(
- "antsetup: deploy.dir = " + p.getProperty("deploy.dir"));
-
- File buildFile = new File(deployHandlerBuildFile);
- p.setUserProperty("ant.file", buildFile.getAbsolutePath());
- p.init();
- ProjectHelper helper = ProjectHelper.getProjectHelper();
- p.addReference("ant.projectHelper", helper);
- helper.parse(p, buildFile);
-
- DefaultLogger consoleLogger = new DefaultLogger();
- consoleLogger.setErrorPrintStream(System.err);
- consoleLogger.setOutputPrintStream(System.out);
- consoleLogger.setMessageOutputLevel(Project.MSG_INFO);
- p.addBuildListener(consoleLogger);
- }
-
- private void antSetupFromInfo(DeploymentInfo info, Project p) {
- String archive = info.getEarFile();
- sDepNumber = info.getProperty("deployment.props.number");
-
- p.setProperty("archive.file", archive);
- antSetup(archive, p, sDepNumber);
- }
-
- private void antSetupFromProps(Properties props, Project p) {
- String archive = props.getProperty("ear_file");
- sDepNumber = props.getProperty("deployment.props.number");
-
- p.setProperty("archive.file", archive);
- antSetup(archive, p, sDepNumber);
- }
-
- @Override
- public String deploy(DeploymentInfo info) throws TSDeploymentException {
-
- // what about interop - do we need to autodeploy directories
- // we need to determine if the archives are interop or rebuildable and set
- // the
- // correct props
- Project p = new Project();
- antSetupFromInfo(info, p);
-
- String javaeeLevel = propMgr.getProperty("javaee.level", "full");
- if (javaeeLevel.contains("full")) {
- //Sets file name to be used while generating client stubs
- String archiveFile =p.getProperty("archive.file");
- String applicationName = this.getAppNameFromApplicationXML(archiveFile);
- if (applicationName == null) { // if we didn't have an ear or there was no
- // application-name use the old scheme
- applicationName = archiveFile.substring(archiveFile.lastIndexOf(File.separator) + 1,
- archiveFile.lastIndexOf("."));
- }
-
- p.setProperty("deploy.app.name", applicationName);
- p.setProperty("get.stub.clients", "true");
-
- String sEarFile = info.getEarFile();
- String sTSDeploymentDir = sEarFile.substring(0,
- sEarFile.lastIndexOf(File.separator) + 1) + "ts_dep";
- p.setProperty("get.stub.clients.ts_dep", sTSDeploymentDir);
- }
-
- try {
-
- p.executeTarget("-deploy");
- } catch (Throwable t) {
- log("Deployment failed for: " + info.getEarFile());
- t.printStackTrace();
- throw new TSDeploymentException(t.getMessage()
- + System.getProperty("line.separator") + getServerLogContents());
- }
-
- return "";
-
- }
-
- @Override
- public void undeploy(Properties p) throws TSDeploymentException {
- // String sArchive = p.getProperty("ear_file");
- TestUtil.logHarness("AutoDeployment.undeploy()");
- // initDeployTestUtils(p.getProperty("deployment.props.number"));
-
- Project pr = new Project();
- antSetupFromProps(p, pr);
-
- try {
- pr.executeTarget("-undeploy");
- } catch (Throwable t) {
- log("Undeployment failed for: " + p.getProperty("ear_file"));
- t.printStackTrace();
- throw new TSDeploymentException(t.getMessage()
- + System.getProperty("line.separator") + getServerLogContents());
- }
- }
-
- @Override
- public boolean isDeployed(Properties p) throws TSDeploymentException {
-
- sDepNumber = p.getProperty("deployment.props.number");
- String sArchive = p.getProperty("ear_file");
- TestUtil.logHarness("AutoDeployment.isDeployed()");
- String archiveNameOnly = sArchive
- .substring(sArchive.lastIndexOf(File.separator) + 1);
- TestUtil.logHarnessDebug("$$$$$$$$$$$$$ " + archiveNameOnly);
- String autoDeployDir;
-
- if (archiveNameOnly.startsWith("vi_built_")) {
- archiveNameOnly = archiveNameOnly.substring(9);
- }
-
- if (iPortingSet == 1) {
- autoDeployDir = propMgr.getProperty("impl.vi.deploy.dir",
- "UNSET glassfish.deploy.dir");
- } else {
- autoDeployDir = propMgr.getProperty("impl.ri.deploy.dir",
- "UNSET glassfish.deploy.dir");
- }
-
- TestUtil.logHarnessDebug("isdeployed: deploy.dir = " + autoDeployDir);
-
- if ((new File(
- autoDeployDir + File.separator + archiveNameOnly + "_deployed"))
- .exists()) {
- TestUtil.logHarnessDebug("isdeployed: returning true");
- return true;
- } else {
- TestUtil.logHarnessDebug("isdeployed: returning false");
- return false;
- }
- }
-
- @Override
- public void deployConnector(Properties p) throws TSDeploymentException {
-
- TestUtil.logHarness("AutoDeployment.deployConnector()");
-
- p.setProperty("ear_file", p.getProperty("rar_file"));
-
- Project pr = new Project();
- antSetupFromProps(p, pr);
-
- try {
- pr.executeTarget("-deploy");
- } catch (Throwable t) {
- t.printStackTrace();
- throw new TSDeploymentException(t.getMessage());
- }
-
- }
-
- @Override
- public void undeployConnector(Properties p) throws TSDeploymentException {
- TestUtil.logHarness("AutoDeployment.undeployConnector()");
- p.setProperty("ear_file", p.getProperty("rar_file"));
- undeploy(p);
- }
-
- @Override
- public boolean isConnectorDeployed(Properties p)
- throws TSDeploymentException {
- TestUtil.logHarness("AutoDeployment.isConnectorDeployed()");
- p.setProperty("ear_file", p.getProperty("rar_file"));
- return isDeployed(p);
- }
-
- @Override
- public String getAppClientArgs(Properties p) {
-
- String sAppName = null;
- String executeArgs = p.getProperty("executeArgs");
- String sApp = p.getProperty("ear_file");
- String sClientname = p.getProperty("client_name");
-
- if (sApp.endsWith(".ear")) { // Check for an application-name in the
- // application.xml
- sAppName = getAppNameFromApplicationXML(sApp);
- }
-
- String sTSDeploymentDir = sApp.substring(0,
- sApp.lastIndexOf(File.separator) + 1) + "ts_dep";
-
- if (sAppName == null) { // if we didn't have an ear or there was no
- // application-name use the old scheme
- sAppName = sApp.substring(sApp.lastIndexOf(File.separator) + 1,
- sApp.lastIndexOf("."));
- }
-
- if (sAppName.startsWith("vi_built_")) {
- // strip off the vi_built_ string
- sAppName = sAppName.substring(9);
- sTSDeploymentDir = sApp.substring(0, sApp.lastIndexOf(File.separator) + 1)
- + "ts_dep_vi_built";
- sClientname = sClientname.substring(9);
- }
-
- sApp = sTSDeploymentDir + File.separator + sAppName + "Client.jar";
-
- if (executeArgs == null) {
- executeArgs = sApp + ",arg=-name,arg=" + sClientname + " -classpath "+ propMgr.getProperty("javaee.home", "/") + "/lib/gf-client.jar" + ":" + sApp + " org.glassfish.appclient.client.AppClientGroupFacade " ; // +
- // "
- // -stubs
- // "
- // +
- // sClientClasspath;
- } else {
- executeArgs = sApp + ",arg=-name,arg=" + sClientname + " -classpath "+ propMgr.getProperty("javaee.home", "/") + "/lib/gf-client.jar" + ":" + sApp + " org.glassfish.appclient.client.AppClientGroupFacade "
- + " " + executeArgs; // + " -name " + p.getProperty("client_name"); //
- // + " -stubs " + sClientClasspath;
- }
- // reset the property to nothing so it isn't added to the classpath
- // p.put("clientClasspath", "");
- return executeArgs;
-
- }
-
- public Hashtable getInteropJNDINames(DeploymentInfo[] infoArray) {
- htJNDIRefs = new Hashtable();
- StringBuffer buf = null;
- if (TestUtil.harnessDebug) {
- for (int ii = 0; ii < infoArray.length; ii++) {
- buf = new StringBuffer("**** ii=" + ii
- + " ********************************************" + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- buf.append((new RuntimeInfo().getRuntimeInfo(infoArray[ii])) + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- TestUtil.logHarnessDebug(buf.toString());
-
- // 1.3 version of runtime paring code
- // Vector resources =
- // infoArray[ii].getAppClientResources();
- // for(int i = 0; i< resources.size(); i++) {
- // DeploymentInfo.AppClient appResource =
- // (DeploymentInfo.AppClient)
- // resources.elementAt(i);
- // Hashtable jndiChanges =
- // checkJNDINames(appResource.ejbs);
- // if(!jndiChanges.isEmpty()) {
- // htJNDIRefs.putAll(jndiChanges);
- // }
- // }
- List resources = infoArray[ii].getAppClientRuntimeDDs();
- for (int i = 0; i < resources.size(); i++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.SunApplicationClient appResource = (com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.SunApplicationClient) resources
- .get(i);
- Hashtable jndiChanges = checkJNDINames(appResource.getEjbRef());
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
-
- // 1.3 version of runtime paring code
- // /* Web Container */
- // resources = infoArray[ii].getWebResources();
- // for(int i = 0; i< resources.size(); i++) {
- // DeploymentInfo.WebResource webResource =
- // (DeploymentInfo.WebResource)
- // resources.elementAt(i);
- // Hashtable jndiChanges =
- // checkJNDINames(webResource.ejbs);
- // if(!jndiChanges.isEmpty()) {
- // htJNDIRefs.putAll(jndiChanges);
- // }
- // }
- resources = infoArray[ii].getWebRuntimeDDs();
- for (int i = 0; i < resources.size(); i++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.web.SunWebApp webResource = (com.sun.ts.lib.implementation.sun.javaee.runtime.web.SunWebApp) resources
- .get(i);
- Hashtable jndiChanges = checkJNDINames(webResource.getEjbRef());
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
-
- // 1.3 version of runtime paring code
- // /* EJB Container */
- // Vector ejbJars = infoArray[ii].getEjbJars();
- // for(int y= 0; y< ejbJars.size(); y++) {
- // DeploymentInfo.EJBJar ejbJar =
- // (DeploymentInfo.EJBJar)ejbJars.elementAt(y);
- // resources = ejbJar.getEjbResources();
- // for(int i = 0; i< resources.size(); i++) {
- // DeploymentInfo.Ejb ejbResource =
- // (DeploymentInfo.Ejb) resources.elementAt(i);
- // Hashtable jndiChanges =
- // checkJNDINames(ejbResource.ejbs);
- // if(!jndiChanges.isEmpty()) {
- // htJNDIRefs.putAll(jndiChanges);
- // }
- // }
- // }
- // }
- List ejbJars = infoArray[ii].getEjbRuntimeDDs();
- for (int y = 0; y < ejbJars.size(); y++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.SunEjbJar ejbJar = (com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.SunEjbJar) ejbJars
- .get(y);
- resources = ejbJar.getEnterpriseBeans().getEjb();
-
- for (int i = 0; i < resources.size(); i++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.Ejb ejbResource = (com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.Ejb) resources
- .get(i);
- Hashtable jndiChanges = checkJNDINames(ejbResource.getEjbRef());
- if (!jndiChanges.isEmpty()) {
- htJNDIRefs.putAll(jndiChanges);
- }
- }
- }
-
- } // end for loop
- } // end if debug
- buf = new StringBuffer(
- "***** Returning the following Hashtable from SunRIDeployment.getInteropJNDINames *****"
- + newLine);
- buf.append(
- "***************************************************************************************"
- + newLine);
- for (Enumeration e = htJNDIRefs.keys(); e.hasMoreElements();) {
- String sKey = (String) e.nextElement();
- buf.append("Original value: " + sKey + newLine);
- buf.append("Modified value: " + (String) htJNDIRefs.get(sKey) + newLine);
- }
- buf.append(
- "***************************************************************************************"
- + newLine);
- TestUtil.logHarnessDebug(buf.toString());
-
- return htJNDIRefs;
- }
-
- private void addJNDIName(String jndiName, Hashtable jndiChanges) {
- if (jndiName.startsWith("corbaname")) {
- int endPos = jndiName.lastIndexOf("#");
- // Example JNDI Name:
- // String newJNDI = ref.jndi.substring(0, endPos) + "#myfoo/" +
- // ref.jndi.substring(endPos + 1);
- String newJNDI = jndiName.substring(0, endPos) + "#"
- + jndiName.substring(endPos + 1);
- jndiChanges.put(jndiName, newJNDI);
- TestUtil.logHarnessDebug("******** old JNDI name \"" + jndiName
- + "\", new JNDI name \"" + newJNDI + "\"");
- }
- }
-
- private Hashtable checkJNDINames(List ejbRefs) {
- Hashtable jndiChanges = new Hashtable();
- if (ejbRefs == null || ejbRefs.size() == 0) {
- return jndiChanges;
- }
- Object o = ejbRefs.get(0);
- if (o instanceof com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.EjbRef) {
- for (int j = 0; j < ejbRefs.size(); j++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.EjbRef ref = (com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.EjbRef) ejbRefs
- .get(j);
- String jndiName = ref.getJndiName();
- addJNDIName(jndiName, jndiChanges);
- }
- } else if (o instanceof com.sun.ts.lib.implementation.sun.javaee.runtime.web.EjbRef) {
- for (int j = 0; j < ejbRefs.size(); j++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.web.EjbRef ref = (com.sun.ts.lib.implementation.sun.javaee.runtime.web.EjbRef) ejbRefs
- .get(j);
- String jndiName = ref.getJndiName();
- addJNDIName(jndiName, jndiChanges);
- }
- } else if (o instanceof com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.EjbRef) {
- for (int j = 0; j < ejbRefs.size(); j++) {
- com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.EjbRef ref = (com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.EjbRef) ejbRefs
- .get(j);
- String jndiName = ref.getJndiName();
- addJNDIName(jndiName, jndiChanges);
- }
- }
- return jndiChanges;
- }
-
- private String getAppNameFromApplicationXML(String archivePathAndName) {
- /*
- * Read the application.xml jar entry and look for the
- * /application/application-name element. If it exists return its textual
- * content else return null. Allowing users the ability to specify an
- * application name is new feature in JavaEE 6.0.
- */
- String appName = null;
- JarFile jarFile = null;
- try {
- jarFile = new JarFile(archivePathAndName);
- JarEntry appEntry = jarFile.getJarEntry("META-INF/application.xml");
- if (appEntry != null) {
- SAXBuilder builder = new SAXBuilder();
- Document doc = builder.build(jarFile.getInputStream(appEntry));
- Element root = doc.getRootElement();
- appName = root.getChildTextNormalize("application-name",
- root.getNamespace());
- }
- } catch (Exception e) {
- // if any errors occur just log a message and return null
- TestUtil.logHarness(
- "Error parsing application.xml looking for application-name, returning null");
- } finally {
- if (jarFile != null) {
- try {
- jarFile.close();
- } catch (Exception e) {
- }
- }
- }
- TestUtil.logHarness(
- "getAppNameFromApplicationXML() returning \"" + appName + "\"");
- return appName;
- }
-
- private void log(String s) {
- log.println("GF Deployment: " + s);
- }
-
- /**
- * Fetch the entire contents of a text file, and return it in a String. This
- * style of implementation does not throw Exceptions to the caller.
- *
- * @param aFile
- * is a file which already exists and can be read.
- */
- public String getServerLogContents() {
- // ...checks on aFile are elided
- StringBuilder contents = new StringBuilder();
- File serverLog;
- String aFile = "";
- int logLineCount;
-
- try {
- if (iPortingSet == 1) {
- serverLog = new File(
- new File(propMgr.getProperty("impl.vi.deploy.dir", "")).getParent()
- + File.separator + "logs" + File.separator + SERVER_LOG);
- } else {
- serverLog = new File(
- new File(propMgr.getProperty("impl.ri.deploy.dir", "")).getParent()
- + File.separator + "logs" + File.separator + SERVER_LOG);
- }
-
- logLineCount = countLines(serverLog);
-
- contents.append("************************************************");
- contents.append(System.getProperty("line.separator"));
- contents.append("GLASSFISH SERVER LOG CONTENTS: Last 200 lines");
- contents.append(serverLog.getPath());
- contents.append(System.getProperty("line.separator"));
- contents.append("************************************************");
- contents.append(System.getProperty("line.separator"));
-
- // use buffering, reading one line at a time
- // FileReader always assumes default encoding is OK!
- BufferedReader input = new BufferedReader(new FileReader(serverLog));
- try {
- String line = null; // not declared within while loop
- /*
- * readLine is a bit quirky : it returns the content of a line MINUS the
- * newline. it returns null only for the END of the stream. it returns
- * an empty String if two newlines appear in a row.
- */
- int iCurrentLine = 1;
- System.err.println("line count = " + logLineCount);
- // only print the last 200 lines
- // start at linecount -(linecount-200)
- while ((line = input.readLine()) != null) {
-
- if (iCurrentLine > logLineCount - 200) {
- // log.println(line);
- contents.append(iCurrentLine + ": " + line);
- contents.append(System.getProperty("line.separator"));
- }
- iCurrentLine++;
- }
-
- contents.append("************************************************");
- contents.append(System.getProperty("line.separator"));
- contents.append("END OF GLASSFISH SERVER LOG CONTENTS");
- contents.append(serverLog.getPath());
- contents.append(System.getProperty("line.separator"));
- contents.append("************************************************");
- contents.append(System.getProperty("line.separator"));
-
- } finally {
- input.close();
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- return contents.toString();
-
- }
-
- private int countLines(File file) throws IOException {
- Reader reader = new InputStreamReader(new FileInputStream(file));
-
- int lineCount = 0;
- char[] buffer = new char[4096];
- for (int charsRead = reader.read(buffer); charsRead >= 0; charsRead = reader
- .read(buffer)) {
- for (int charIndex = 0; charIndex < charsRead; charIndex++) {
- if (buffer[charIndex] == '\n')
- lineCount++;
- }
- }
- reader.close();
- return lineCount;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentSeparateVM.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentSeparateVM.java
deleted file mode 100644
index 45b9b4aaae..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentSeparateVM.java
+++ /dev/null
@@ -1,128 +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.implementation.sun.javaee.glassfish;
-
-import java.util.*;
-import com.sun.ts.lib.porting.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.deliverable.*;
-import org.jdom.input.SAXBuilder;
-import org.jdom.Document;
-import org.jdom.Element;
-
-import java.rmi.*;
-import java.net.*;
-
-/**
- * This is an implementation of the TSDeploymentInterface. An implementation of
- * this class must be supplied by any J2EE implementation wishing to have
- * JavaTest (the harness which drives the TS tests) automatically deploy and
- * undeploy test applications. Providing this functionality enables the entire
- * test suite to be run without having to manually deploy/undeploy the J2EE test
- * applications prior to running the tests. This particular implementation uses
- * the deploy/undeploy semantics of Sun's J2EE reference implementation.
- *
- * @author Kyle Grucci
- */
-public class AutoDeploymentSeparateVM extends AutoDeployment {
- private AutoDeploymentServerInterface deploymentServer = null;
-
- private Map extraParameters = new HashMap();
-
- private void getDeploymentServer() throws TSDeploymentException {
- String sHost = "";
- String sPort = "2002";
-
- // lookup server here or in suitesynchronizer?
- try {
- sHost = InetAddress.getLocalHost().getHostName();
- try {
- sPort = propMgr.getProperty("harness.deployment.server.port");
- TestUtil.logHarnessDebug("harness.deployment.server.port = " + sPort);
- } catch (PropertyNotSetException pe) {
- log.print(pe.getMessage());
- log.print("error looking up property: sun.porting_server.port");
- log.print("Defaulting to port #: " + sPort);
- }
-
- // Do a lookup of our porting server
- deploymentServer = (AutoDeploymentServerInterface) Naming
- .lookup("rmi://" + sHost + ":" + sPort + "/AutoDeploymentServer");
-
- extraParameters.put("porting_set", new Integer(iPortingSet));
- deploymentServer.init(propMgr.getJteProperties(), extraParameters);
-
- } catch (java.net.MalformedURLException me) {
- log.print(me.getMessage());
- me.printStackTrace();
- throw new TSDeploymentException(me.getMessage(), me);
- } catch (java.net.UnknownHostException ue) {
- log.print(ue.getMessage());
- log.print("unknown host: " + sHost);
- ue.printStackTrace();
- throw new TSDeploymentException(ue.getMessage(), ue);
- } catch (NotBoundException nbe) {
- log.print(nbe.getMessage());
- nbe.printStackTrace();
- throw new TSDeploymentException(nbe.getMessage(), nbe);
- } catch (java.rmi.RemoteException e) {
- TestUtil.logHarness("Failed to deploy using " + "AutoDeploymentServer: "
- + e.getMessage());
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage(), e);
- }
- }
-
- /**
- * This method is called by the test harness to deploy an .ear file 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.
- */
- public String deploy(DeploymentInfo info) throws TSDeploymentException {
- String classpath = null;
-
- try {
- if (deploymentServer == null)
- getDeploymentServer();
-
- // send deploy info across to proxy
- classpath = deploymentServer.deploy(info);
- } catch (java.rmi.RemoteException e) {
- TestUtil.logHarness("Failed to deploy using " + "AutoDeploymentServer: "
- + e.getMessage());
- e.printStackTrace();
- throw new TSDeploymentException(e.getMessage());
- }
-
- return classpath;
-
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServer.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServer.java
deleted file mode 100644
index defb6b3db6..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServer.java
+++ /dev/null
@@ -1,155 +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.implementation.sun.javaee.glassfish;
-
-import java.rmi.*;
-import java.rmi.server.*;
-import java.rmi.registry.*;
-import java.util.*;
-import java.io.*;
-
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.*;
-import com.sun.ts.lib.deliverable.*;
-
-/**
- * This is an implementation of the TSDeploymentInterface. An implementation of
- * this class must be supplied by any J2EE implementation wishing to have
- * JavaTest (the harness which drives the TS tests) automatically deploy and
- * undeploy test applications. Providing this functionality enables the entire
- * test suite to be run without having to manually deploy/undeploy the J2EE test
- * applications prior to running the tests. This particular implementation uses
- * the deploy/undeploy semantics of Sun's J2EE reference implementation.
- *
- * @author Kyle Grucci
- */
-
-public class AutoDeploymentServer extends UnicastRemoteObject
- implements AutoDeploymentServerInterface
-
-{
-
- private static AutoDeploymentServer deploymentServer = null;
-
- private PropertyManagerInterface propMgr = null;
-
- private static String sPort = "2002";
-
- private static int iPort = 2002;
-
- private AutoDeployment standardDeploy = null;
-
- public AutoDeploymentServer() throws java.rmi.RemoteException {
- }
-
- public static void main(String args[]) {
- if (args.length == 2) {
- if (args[0].equalsIgnoreCase("-port"))
- sPort = args[1];
- }
-
- // Create a new instance
- try {
- deploymentServer = new AutoDeploymentServer();
- iPort = Integer.parseInt(sPort);
- } catch (NumberFormatException nfe) {
- nfe.printStackTrace();
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- // Start the RMIRegistry on port 2002 and bind myself
- try {
- Registry registry = LocateRegistry.createRegistry(iPort);
- TestUtil.logHarness(
- "AutoDeploymentServer: Registry has been created on port: "
- + iPort);
- registry.rebind("AutoDeploymentServer", deploymentServer);
- TestUtil.logHarness(
- "AutoDeploymentServer: deploymentServer has been bound to the Registry");
- } catch (Exception e) {
- TestUtil.logHarness("Failed to bind deploymentServer");
- e.printStackTrace();
- }
- }
-
- /**
- * 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 (below) for an example.
- *
- * @param writer
- * The PrintWriter that should be used to log output.
- */
- public void init(Properties jteProps, Map extraParameters)
- throws RemoteException {
- try {
- TestUtil.logHarnessDebug("AutoDeploymentServer: in init");
-
- jteProps.setProperty("s1as.targets", "server");
- propMgr = DeliverableFactory.getDeliverableInstance()
- .createPropertyManager(jteProps);
-
- if (standardDeploy == null) {
- standardDeploy = new AutoDeployment();
- }
-
- Integer portingSetInteger = (Integer) extraParameters.get("porting_set");
-
- TestUtil.logHarness("AutoDeploymentServer: iPortingSet = "
- + portingSetInteger.intValue());
- TSDeployment.iPortingSet = portingSetInteger.intValue();
- standardDeploy.init(new PrintWriter(System.out));
- } catch (Exception e) {
- e.printStackTrace();
- }
-
- TestUtil.logHarnessDebug("AutoDeploymentServer: leaving init");
- }
-
- /**
- * This method is called by the test harness to deploy an .ear file into Sun
- * 's J2EE reference 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. This 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 RemoteException {
- try {
- return standardDeploy.deploy(info);
- } catch (TSDeploymentException e) {
- e.printStackTrace();
- throw new RemoteException(e.getMessage(), e);
- }
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServerInterface.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServerInterface.java
deleted file mode 100644
index 4b7d39f1ef..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/glassfish/AutoDeploymentServerInterface.java
+++ /dev/null
@@ -1,28 +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.implementation.sun.javaee.glassfish;
-
-import java.util.Map;
-import java.util.Properties;
-import com.sun.ts.lib.porting.DeploymentInfo;
-
-public interface AutoDeploymentServerInterface extends java.rmi.Remote {
- public void init(Properties jteProps, Map extraProps)
- throws java.rmi.RemoteException;
-
- public String deploy(DeploymentInfo info) throws java.rmi.RemoteException;
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/SunRIDeploymentInfo.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/SunRIDeploymentInfo.java
deleted file mode 100644
index 9e98d54c7f..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/SunRIDeploymentInfo.java
+++ /dev/null
@@ -1,421 +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.lib.implementation.sun.javaee.runtime;
-
-import jakarta.xml.bind.*;
-import com.sun.ts.lib.porting.DeploymentInfo;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.app.*;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.*;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.*;
-import com.sun.ts.lib.implementation.sun.javaee.runtime.web.*;
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-import com.sun.ts.lib.deliverable.DeliverableFactory;
-import org.xml.sax.*;
-import javax.xml.parsers.*;
-import javax.xml.transform.sax.*;
-import java.io.*;
-import java.util.*;
-import com.sun.ts.lib.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.
- *
- * @author Mark Roth, Kyle Grucci, Ryan O'Connell
- */
-public class SunRIDeploymentInfo
- implements DeploymentInfo, java.io.Serializable {
-
- private static final String EJB_PARSE_PKG = "com.sun.ts.lib.implementation.sun.javaee.runtime.ejb";
-
- private static final String WEB_PARSE_PKG = "com.sun.ts.lib.implementation.sun.javaee.runtime.web";
-
- private static final String APP_PARSE_PKG = "com.sun.ts.lib.implementation.sun.javaee.runtime.app";
-
- private static final String APC_PARSE_PKG = "com.sun.ts.lib.implementation.sun.javaee.runtime.appclient";
-
- private static final String EJB_RUNTIME_FILE = "sun-ejb-jar.xml";
-
- private static final String WEB_RUNTIME_FILE = "sun-web.xml";
-
- private static final String APC_RUNTIME_FILE = "sun-application-client.xml";
-
- private static final String APP_RUNTIME_FILE = "sun-application.xml";
-
- // Maps DD filename (String) ->
- // com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.SunEjbJar interfaces
- private Map ejbRuntimeData = new HashMap();
-
- // Maps DD filename (String) ->
- // com.sun.ts.lib.implementation.sun.javaee.runtime.web.SunWebApp interfaces
- private Map webRuntimeData = new HashMap();
-
- // Maps DD filename (String) ->
- // com.sun.ts.lib.implementation.sun.javaee.runtime.app.SunApplication
- // interfaces
- private Map appRuntimeData = new HashMap();
-
- // Maps DD filename (String) ->
- // com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.SunApplicationClient
- // interfaces
- private Map appClientRuntimeData = new HashMap();
-
- /** The ear file to deploy to the server */
- private String earFile;
-
- /** The runtime files being analyzed */
- private String[] runtimeFiles;
-
- protected DeploymentInfo[] prevDeployInfos = null;
-
- /**
- * Creates a new deployment information object.
- *
- * @param earFile
- * Full path to the ear file being deployed
- * @param runtimeFiles
- * Array of full paths to runtime.xml files to analyze.
- *
- * @exception IOException
- * Thrown if an IO error occured while analyzing runtime
- * information.
- * @exception DeploymentInfo.ParseException
- * Thrown if a parsing error occured while analyzing runtime
- * information.
- */
- public SunRIDeploymentInfo(String earFile, String[] runtimeFiles)
- throws IOException, DeploymentInfo.ParseException {
- this.earFile = earFile;
- this.runtimeFiles = runtimeFiles;
-
- // default is to not generate sql for this ear
- setProperty("generateSQL", "false");
-
- unmarshalFiles(runtimeFiles);
- }
-
- /**
- * A temporary properties list, until all information can be provided by this
- * API.
- */
- protected Properties properties = new Properties();
-
- /**
- * 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) {
- properties.setProperty(key, 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) {
- return properties.getProperty(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) {
- prevDeployInfos = infos;
- }
-
- public DeploymentInfo[] getPreviousInfos() {
- return prevDeployInfos;
- }
-
- /**
- * Returns the ear file to deploy
- */
- public String getEarFile() {
- return earFile;
- }
-
- /**
- * Returns the list of runtime files to be deployed
- */
- public String[] getRuntimeFiles() {
- return runtimeFiles;
- }
-
- /**
- * Returns a Map that maps runtimne deployment descriptor filename Strings to
- * concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.SunEjbJar interface.
- */
- public Map getEjbRuntimeData() {
- return ejbRuntimeData;
- }
-
- /**
- * Returns a Map that maps runtimne deployment descriptor filename Strings to
- * concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.web.SunWebApp interface.
- */
- public Map getWebRuntimeData() {
- return webRuntimeData;
- }
-
- /**
- * Returns a Map that maps runtimne deployment descriptor filename Strings to
- * concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.app.SunApplication
- * interface.
- */
- public Map getAppRuntimeData() {
- return appRuntimeData;
- }
-
- /**
- * Returns a Map that maps runtimne deployment descriptor filename Strings to
- * concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.SunApplicationClient
- * interface.
- */
- public Map getAppClientRuntimeData() {
- return appClientRuntimeData;
- }
-
- private List makeList(Map aMap) {
- List result = new ArrayList();
- if (aMap == null) {
- return result;
- }
- Iterator i = aMap.values().iterator();
- while (i.hasNext()) {
- result.add(i.next());
- }
- return result;
- }
-
- /**
- * Returns a List of concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.appclient.SunApplicationClient
- * interface.
- */
- public List getAppClientRuntimeDDs() {
- return makeList(appClientRuntimeData);
- }
-
- /**
- * Returns a List of concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.app.SunApplication
- * interface.
- */
- public List getAppRuntimeDDs() {
- return makeList(appRuntimeData);
- }
-
- /**
- * Returns a List of concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.web.SunWebApp interface.
- */
- public List getWebRuntimeDDs() {
- return makeList(webRuntimeData);
- }
-
- /**
- * Returns a List of concrete implementations of the
- * com.sun.ts.lib.implementation.sun.javaee.runtime.ejb.SunEjbJar interface.
- */
- public List getEjbRuntimeDDs() {
- return makeList(ejbRuntimeData);
- }
-
- private String normalizeFile(String fileName) {
- int index = fileName.lastIndexOf(File.separator);
- index++;
- int index2 = fileName.indexOf(".sun-");
- if (index2 == -1) {
- index2 = fileName.length();
- }
- String result = fileName.substring(index, index2);
- return result;
- }
-
- private void unmarshalFiles(String[] files)
- throws DeploymentInfo.ParseException {
- String file = "";
- try {
- int numFiles = (files == null) ? 0 : files.length;
- for (int i = 0; i < numFiles; i++) {
- file = files[i];
- if (file.endsWith(EJB_RUNTIME_FILE)) {
- this.ejbRuntimeData.put(normalizeFile(file),
- (SunEjbJar) (unmarshalFile(EJB_PARSE_PKG, file)));
- } else if (file.endsWith(WEB_RUNTIME_FILE)) {
- this.webRuntimeData.put(normalizeFile(file),
- (SunWebApp) (unmarshalFile(WEB_PARSE_PKG, file)));
- } else if (file.endsWith(APP_RUNTIME_FILE)) {
- this.appRuntimeData.put(normalizeFile(file),
- (SunApplication) (unmarshalFile(APP_PARSE_PKG, file)));
- } else if (file.endsWith(APC_RUNTIME_FILE)) {
- this.appClientRuntimeData.put(normalizeFile(file),
- (SunApplicationClient) (unmarshalFile(APC_PARSE_PKG, file)));
- } else {
- TestUtil.logHarnessDebug(
- "Warning unknown file type found in unmarshalFiles (String[])");
- TestUtil.logHarnessDebug("\tfile name is \"" + file
- + "\", Ignoring file and continuing...");
- }
- if (TestUtil.harnessDebug) {
- TestUtil.logHarnessDebug("###################");
- TestUtil.logHarnessDebug("### DD file key was \"" + file + "\"");
- TestUtil.logHarnessDebug(
- "### DD file key is \"" + normalizeFile(file) + "\"");
- TestUtil.logHarnessDebug("###################");
- }
- }
- } catch (Exception e) {
- TestUtil.logHarness("Error unmarshalling file \"" + file + "\"");
- e.printStackTrace();
- throw new DeploymentInfo.ParseException(
- "Error unmarshalling file \"" + file + "\"");
- }
- }
-
- private String getAppserverLibDir() {
- String libDir = File.separator + "j2eetck" + File.separator + "lib";
- try {
- PropertyManagerInterface propMgr = DeliverableFactory
- .getDeliverableInstance().getPropertyManager();
- String ctsDtdDirectory = propMgr.getProperty("ts.home", libDir);
- libDir = ctsDtdDirectory + File.separator + "lib";
- } catch (Exception e) {
- e.printStackTrace();
- }
- return libDir;
- }
-
- public class MyResolver implements EntityResolver {
- public InputSource resolveEntity(String publicId, String systemId) {
- int index = systemId.lastIndexOf('/');
- if (index == -1) { // should never happen
- index = systemId.lastIndexOf('\\');
- }
- String fileName = systemId.substring(index + 1);
- String libDir = getAppserverLibDir();
- String result = systemId;
- if (fileName.endsWith(".xsd")) {
- result = libDir + File.separator + "schemas" + File.separator
- + fileName;
- } else if (fileName.endsWith(".dtd")) {
- result = libDir + File.separator + "dtds" + File.separator + fileName;
- } else {
- TestUtil.logHarnessDebug("No match for \"" + systemId + "\"");
- }
- if (new File(result).exists()) {
- TestUtil
- .logHarnessDebug("Entity Resolver Returning \"" + result + "\"");
- return new InputSource(result);
- }
- TestUtil.logHarnessDebug(
- "Entity Resolver could not find \"" + result + "\", returning null");
- return null;
- }
- }
-
- private Object unmarshalFile(String pkg, String aFile) throws Exception {
- SAXParserFactory spf = SAXParserFactory.newInstance();
- // TestUtil.logHarnessDebug("********************************************************************************");
- // TestUtil.logHarnessDebug("**** Factory is namespace aware \"" +
- // spf.isNamespaceAware() + "\"");
- spf.setNamespaceAware(true);
- // TestUtil.logHarnessDebug("**** Factory is namespace aware \"" +
- // spf.isNamespaceAware() + "\"");
- SAXParser saxParser = spf.newSAXParser();
- // TestUtil.logHarnessDebug("**** Parser is namespace aware \"" +
- // saxParser.isNamespaceAware() + "\"");
- // TestUtil.logHarnessDebug("********************************************************************************");
- XMLReader xmlReader = saxParser.getXMLReader();
- xmlReader.setEntityResolver(new MyResolver());
- SAXSource source = new SAXSource(xmlReader, new InputSource(aFile));
- JAXBContext jc = JAXBContext.newInstance(pkg);
- Unmarshaller um = jc.createUnmarshaller();
- TestUtil.logHarnessDebug("Unmarshalling file \"" + aFile + "\"");
- Object tree = um.unmarshal(source);
- return tree;
- }
-
- /**
- * Returns a String that conatains the contents of all the runtime XML files.
- */
- public String getContentAsXml() {
- String NL = System.getProperty("line.separator", "\n");
- int numFiles = (runtimeFiles == null) ? 0 : runtimeFiles.length;
- org.jdom.input.SAXBuilder builder = new org.jdom.input.SAXBuilder(false);
- builder.setEntityResolver(new MyResolver());
- File runtimeFile = null;
- Writer writer = new StringWriter();
- org.jdom.output.XMLOutputter out = new org.jdom.output.XMLOutputter(
- org.jdom.output.Format.getPrettyFormat());
- for (int i = 0; i < numFiles; i++) {
- try {
- writer.write(
- "*******************************************************************"
- + NL);
- writer.write("File: \"" + runtimeFiles[i] + "\"" + NL);
- runtimeFile = new File(runtimeFiles[i]);
- org.jdom.Document doc = builder.build(runtimeFile);
- out.output(doc, writer);
- writer.write(NL);
- } catch (Exception e) {
- e.printStackTrace();
- try {
- writer.write(
- "*******************************************************************"
- + NL);
- writer.write(NL + NL + "Error processing file \"" + runtimeFiles[i]
- + "\"" + NL + NL);
- writer.write(
- "*******************************************************************"
- + NL);
- } catch (Exception ee) {
- } // keep processing runtime files
- }
- }
- try {
- writer.close();
- } catch (Exception e) {
- }
- return writer.toString();
- }
-
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/jaxb-cust.xml b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/jaxb-cust.xml
deleted file mode 100644
index 3dcb4c993a..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/javaee/runtime/jaxb-cust.xml
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
-
-
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jersey/TSWebConfiguration.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jersey/TSWebConfiguration.java
deleted file mode 100644
index 87c0fa021c..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jersey/TSWebConfiguration.java
+++ /dev/null
@@ -1,399 +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.implementation.sun.jersey;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.Vector;
-
-import com.sun.ts.lib.deliverable.PropertyManagerInterface;
-
-import com.sun.ts.lib.util.TestUtil;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-/**
- * This is a utility class that borrowed from Kyle Grucci's original work in
- * TSRuntimeConfiguration.java. It is called to replace any configurable
- * properties in the web xml files with the implementation specific values
- * specified in ts.jte. A copy is made of each web xml file (with the
- * substituted values) in the same location with file extension .new.
- *
- * @author Dianne Jiao
- */
-public class TSWebConfiguration {
-
- // whether running with s1as or j2sdkee RI
- private static Boolean runningS1AS;
-
- public final static String WEB_XML = "web.xml.template";
-
- private File tempFile;
-
- private PrintWriter log;
-
- private static Hashtable htReplacementProps = new Hashtable();
-
- private Hashtable htReplacerTable = new Hashtable();
-
- private static String sTempDir = "";
-
- private StringReplacer replacer = new StringReplacer();
-
- private static File jteFile = new File(System.getProperty("TS_HOME")
- + File.separator + "bin" + File.separator + "ts.jte");
-
- private static String servlet_adaptor = "servlet_adaptor";
-
- private static String implementation_name = "jaxrs_impl_name";
-
- private PropertyManagerInterface propMgr;
-
- static Properties props;
-
- static List props_name = Arrays.asList("servlet_adaptor");
-
- public TSWebConfiguration() {
- System.out.println("Dummy TSWebConfiguration Conctructor");
- }
-
- public static void main(String[] args) {
-
- TSWebConfiguration webconfig = new TSWebConfiguration();
-
- implementation_name = webconfig.findProps(implementation_name);
- System.out.println("++++++++++++=" + implementation_name);
-
- servlet_adaptor = webconfig.findProps(servlet_adaptor);
- servlet_adaptor = servlet_adaptor.replace(".class", "").replace("/", ".");
- System.out
- .println("Replacement value for servlet_adaptor =" + servlet_adaptor);
-
- PrintWriter logOut = new PrintWriter(System.out, true);
-
- File fileList = new File(System.getProperty("TS_HOME") + File.separator
- + "bin" + File.separator + "jaxrs_filelist");
-
- try {
- BufferedReader input = new BufferedReader(new FileReader(fileList));
-
- try {
- String line = null; // not declared within while loop
- while ((line = input.readLine()) != null) {
- System.out.println("Processing file " + line);
- File file = new File(
- System.getProperty("TS_HOME") + File.separator + line);
- try {
- htReplacementProps.put("servlet_adaptor", servlet_adaptor);
- webconfig.sweepwebFile(file);
- System.out.println("Done with file " + file.toString());
- } catch (Exception e) {
- e.printStackTrace();
- System.out
- .println("Failed to modify xml files with correct settings. "
- + "Please check the values of");
- }
- }
- } finally {
- input.close();
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- System.exit(0);
- }
-
- String findProps(String prop) {
- System.out.println("Processing jte file");
- String replace = null;
-
- try {
- BufferedReader input = new BufferedReader(new FileReader(jteFile));
-
- try {
- String line = null;
- while ((line = input.readLine()) != null) {
- if (line.startsWith(prop)) {
- replace = line.split("=")[1];
- return replace;
- }
- }
- } finally {
- input.close();
- }
- } catch (IOException ex) {
- ex.printStackTrace();
- }
- return null;
- }
-
- /// I am here now
- public String sweepwebFile(File file)
- throws FileNotFoundException, IOException {
- if (htReplacerTable != null && !(htReplacerTable.isEmpty())) {
- htReplacerTable = replaceOnWebInfoStrings(htReplacerTable);
- }
- String dir = file.getParent();
- File xml = new File(dir + File.separator + file.getName());
-
- return replacer.replace(file, htReplacementProps, htReplacerTable, dir);
- }
-
- final class StringReplacer {
-
- public String sFindString; // string we are searching for
-
- public String sReplaceString; // replace sFindString with this
-
- public String sDirString;
-
- public String sFileNameStringToReplace;
-
- public String sNewFileNameString;
-
- public int iHowMany = -1;
-
- public String[] sFileList;
-
- public boolean bNewFile = false;
-
- private Hashtable htFindAndReplace = null;
-
- private Hashtable htCustomTable = null;
-
- private Vector vInfoObjects = new Vector();
-
- private Vector vMatchingInfoObjects = new Vector();
-
- private Vector vNonMatchingInfoObjects = new Vector();
-
- private boolean bSomethingWasReplaced = false;
-
- public String replace(File file, Hashtable htStrings,
- Hashtable htReplacerTable, String sTempDir) {
- String[] sFileList = null;
- htFindAndReplace = htStrings;
- htCustomTable = htReplacerTable;
- String sTemp = "";
- ReplacementInfo ri = null;
- String sNewFileName = "";
- StringBuffer sFoundBuffer = new StringBuffer();
- char c;
- bSomethingWasReplaced = false;
- BufferedReader fReader = null;
- BufferedWriter fNewWriter = null;
- try {
- vInfoObjects = new Vector();
- String sKey = "";
- // create ReplacementInfo objects
- for (Enumeration e = htFindAndReplace.keys(); e.hasMoreElements();) {
- sKey = (String) e.nextElement();
- vInfoObjects.addElement(
- new ReplacementInfo(sKey, (String) htFindAndReplace.get(sKey)));
- }
- // add in the table the custom table of replacement strings
- // if any
- if (htCustomTable != null) {
- for (Enumeration e = htCustomTable.keys(); e.hasMoreElements();) {
- sKey = (String) e.nextElement();
- vInfoObjects.addElement(
- new ReplacementInfo(sKey, (String) htCustomTable.get(sKey)));
-
- }
- }
- // reader of the file that we're searching
- fReader = new BufferedReader(new FileReader(file));
- System.out.println("File to read: " + file.getAbsolutePath());
- StringWriter sWriter = new StringWriter();
- // stores new file contents
-
- // The following code is here to account for the fact that we
- // have some properties to replace which are substrings of other
- // properties. We need to be sure that we will be able to
- // replace either. Thus, we check the char after certain props
- // to see if they continue to match another property. If so,
- // then we will replace with the longer property value
- boolean bCheckForDot = false;
- String sHold = "";
- int iCharRead; // holds each char that we read
- vMatchingInfoObjects.addAll(vInfoObjects);
- while ((iCharRead = fReader.read()) != -1) {
- c = (char) iCharRead;
-
- if (bCheckForDot) {
- if (c != '.') {
- // hold the dot and let the old processing happen
- sHold = new String((new Character(c)).toString());
- System.out.println("sHold = " + sHold);
- } else {
- sFoundBuffer.append(c);
- bCheckForDot = false;
- continue;
- // since there is no need to just check .
- }
- } else {
- if (sHold != null) {
- // just write the char that we were holding. This
- // assumes that this char is not the beginning of a
- // string we want to replace
- sWriter.write(sHold);
- sHold = null;
- }
-
- sFoundBuffer.append(c);
- }
-
- sTemp = new String(sFoundBuffer);
-
- // get all ris that still match
- for (Enumeration e = vMatchingInfoObjects.elements(); e
- .hasMoreElements();) {
-
- ri = (ReplacementInfo) e.nextElement();
- if (ri.sFind.startsWith(sTemp)) {
- if (ri.sFind.equals(sTemp)) {
-
- // what if we have a substring of another string that
- // we are searching for?
-
- System.out.println(
- "REPLACER:MATCH found: " + ri.sFind + " matches " + sTemp);
- ri.foundOccurance();
- bSomethingWasReplaced = true;
- sWriter.write(ri.sReplace);
- // reset sFoundBuffer
- sFoundBuffer = new StringBuffer();
- // reset matchers to all again
- vMatchingInfoObjects.removeAllElements();
- vMatchingInfoObjects.addAll(vInfoObjects);
- break;
- }
- } else {
- vNonMatchingInfoObjects.addElement(ri);
- // the char that we just read causes our string not
- // to match the string we're looking for. Write the
- // old string to the new file and reset sFoundBuffer.
- // this will never happen!!!
- }
- }
- // remove all non-matching ri's
- vMatchingInfoObjects.removeAll(vNonMatchingInfoObjects);
- vNonMatchingInfoObjects.removeAllElements();
- // reset everything if there are none left matching
- if (vMatchingInfoObjects.isEmpty()) {
- sWriter.write(sTemp);
- sFoundBuffer = new StringBuffer();
- vMatchingInfoObjects.removeAllElements();
- vMatchingInfoObjects.addAll(vInfoObjects);
- }
- }
- fReader.close();
- if (bSomethingWasReplaced) {
- sNewFileName = sTempDir + File.separator + "web.xml."
- + implementation_name;
- System.out.println("New filename:" + sNewFileName);
- fNewWriter = new BufferedWriter(
- new FileWriter(new File(sNewFileName)));
- fNewWriter.write(sWriter.toString());
- fNewWriter.flush();
- } else {
- sNewFileName = null;
- }
- } catch (Exception e) {
- e.printStackTrace();
- } finally {
- if (fNewWriter != null) {
- try {
- fNewWriter.close();
- } catch (IOException exp) {
- }
- }
- }
- return sNewFileName;
- }
-
- class ReplacementInfo {
-
- private int iFoundOccurances = 0;
-
- private String sFind = null;
-
- private String sReplace = null;
-
- ReplacementInfo(String sFindString, String sReplaceString) {
- sFind = sFindString;
- sReplace = sReplaceString;
- iFoundOccurances = 0;
- }
-
- public void foundOccurance() {
- iFoundOccurances++;
- if (TestUtil.harnessDebug) {
- System.out.println("we found an occurance #" + iFoundOccurances
- + " of '" + sFind + "'");
- }
- }
- }
- }
-
- /**
- * Parse the HashTable which contains strings retrieved via calls into the
- * porting classes for deployment. We must substitute on these strings prior
- * to substituting them into the web.xml.
- */
- private Hashtable replaceOnWebInfoStrings(Hashtable extras) {
-
- boolean changeIt = false;
-
- String searchFor[] = { "servlet_adaptor" };
-
- for (Enumeration e = extras.keys(); e.hasMoreElements();) {
- String sKey = (String) e.nextElement();
- String val = (String) extras.get(sKey);
- String oldJndi = val;
- changeIt = false;
- String buff = null;
- int startPos = 0;
- for (int i = 0; i < searchFor.length; i++) {
- System.out.println("\n###Searching for=" + searchFor[i]);
- if ((startPos = val.lastIndexOf(searchFor[i])) != -1) {
- changeIt = true;
- String startBuff = val.substring(0, startPos);
- buff = (String) htReplacementProps.get(searchFor[i]);
- val = startBuff + buff
- + val.substring(startPos + searchFor[i].length());
- }
- }
- if (changeIt) {
- extras.put((String) sKey, val);
- System.out.println(
- "\n###\nold webInfo Val=" + oldJndi + "\nNew webInfo Val = " + val);
- }
- }
- return extras;
- }
-}
diff --git a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jms/SunRIJMSObjects.java b/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jms/SunRIJMSObjects.java
deleted file mode 100644
index 3b1c6ee77b..0000000000
--- a/glassfishtck/src/main/java/com/sun/ts/lib/implementation/sun/jms/SunRIJMSObjects.java
+++ /dev/null
@@ -1,149 +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.lib.implementation.sun.jms;
-
-import java.util.*;
-import java.io.*;
-import javax.naming.*;
-import jakarta.jms.*;
-import com.sun.ts.lib.util.*;
-import com.sun.ts.lib.porting.*;
-
-/**
- * This is an implementation of the TSJMSObjectsInterface. An implementation of
- * this class must be supplied by any JMS implementation wishing to get JMS
- * adminsitered objects: ConnectionFactories, queues and topics.
- *
- * @author Dianne Jiao
- */
-
-public class SunRIJMSObjects implements TSJMSObjectsInterface {
- private static Context jndiContext = null;
-
- private static QueueConnectionFactory qcf = null;
-
- private static TopicConnectionFactory tcf = null;
-
- private static ConnectionFactory cf = null;
-
- private jakarta.jms.Topic testTopic = null;
-
- private jakarta.jms.Queue testQueue = null;
-
- private void getJNDIContext() throws Exception {
-
- if (jndiContext == null) {
- try {
- TestUtil.logTrace("Getting initial context");
- jndiContext = new InitialContext();
- } catch (javax.naming.NamingException ne) {
- TestUtil.logErr("Could not create JNDI context because: ", ne);
- TestUtil.printStackTrace(ne);
- throw ne;
- }
- }
- }
-
- /**
- * This method allows individual implementation to get the Queue
- */
-
- public jakarta.jms.Queue getQueue(String name) throws Exception {
- getJNDIContext();
-
- try {
- testQueue = (jakarta.jms.Queue) jndiContext.lookup(name);
- } catch (Exception e) {
- TestUtil.logErr("Failed to lookup Queue");
- TestUtil.printStackTrace(e);
- throw e;
- }
- return testQueue;
- }
-
- /**
- * This method allows individual implementation to get the Topic
- */
-
- public Topic getTopic(String name) throws Exception {
- getJNDIContext();
-
- try {
- testTopic = (Topic) jndiContext.lookup(name);
- } catch (Exception e) {
- TestUtil.logErr("Failed to lookup Topic");
- TestUtil.printStackTrace(e);
- throw e;
- }
- return testTopic;
- }
-
- /**
- * This method allows individual implementation to get the
- * QueueConnectionFactory
- */
-
- public QueueConnectionFactory getQueueConnectionFactory(String name)
- throws Exception {
- getJNDIContext();
-
- try {
- qcf = (QueueConnectionFactory) jndiContext.lookup(name);
- } catch (Exception e) {
- TestUtil.logErr("Failed to lookup QueueConnectionFactory");
- TestUtil.printStackTrace(e);
- throw e;
- }
- return qcf;
- }
-
- /**
- * This method allows individual implementation to get the
- * TopicConnectionFactory
- */
-
- public TopicConnectionFactory getTopicConnectionFactory(String name)
- throws Exception {
- getJNDIContext();
-
- try {
- tcf = (TopicConnectionFactory) jndiContext.lookup(name);
- } catch (Exception e) {
- TestUtil.logErr("Failed to lookup TopicConnectionFactory");
- TestUtil.printStackTrace(e);
- throw e;
- }
- return tcf;
- }
-
- /**
- * This method allows individual implementation to get the ConnectionFactory
- */
-
- public ConnectionFactory getConnectionFactory(String name) throws Exception {
- getJNDIContext();
-
- try {
- cf = (ConnectionFactory) jndiContext.lookup(name);
- } catch (Exception e) {
- TestUtil.logErr("Failed to lookup ConnectionFactory");
- TestUtil.printStackTrace(e);
- throw e;
- }
- return cf;
- }
-}